943,768 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 4866
  • ASP.NET RSS
Nov 12th, 2008
0

Index was out of range. Must be non-negative and less than the size of the collection

Expand Post »
asp.net Syntax (Toggle Plain Text)
  1. singlecourse = Session("singlecourse")
  2. ename.Text = singlecourse.CourseName
  3. Session("testname") = singlecourse.CourseName
  4. Seclist = que.GetSection(singlecourse.CourseCode)
  5. Qnolist = que.GetQnumber(singlecourse.CourseCode)
  6. Session("totsec") = Seclist
  7. Session("totqno") = Qnolist
  8. Session("queslist") = queslist
  9. t1.Text = Profile.Ttime
  10. pos = InStr(t1.Text, ":")
  11. h1.Value = t1.Text.Substring(0, pos - 1)
  12. 'h2.Value = t1.Text.Substring(pos, 2)
  13. h2.Value = Right(t1.Text, t1.Text.Length - pos)
  14. End If
  15. Else
  16. ViewState("qno") = CType(Session("summary"), Integer)
  17. Session("summary") = ""
  18. summbtn.Visible = True
  19. queslist = Session("queslist")
  20. ename.Text = Session("testname")
  21. t1.Text = Session("etime")
  22. pos = InStr(t1.Text, ":")
  23. h1.Value = t1.Text.Substring(0, pos - 1)
  24. h2.Value = t1.Text.Substring(pos, 2)
  25. End If
  26.  
queserial.Text = "Question : " + CType(queslist.Item(ViewState("qno")).QNo, String) & " of " & queslist.Count(Error : Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index)
aquestion.Text = queslist.Item(ViewState("qno")).Question
Last edited by peter_budo; Nov 12th, 2008 at 5:55 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kausar4u is offline Offline
1 posts
since Nov 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: ASP.net - Flash Postback problem : Please Help
Next Thread in ASP.NET Forum Timeline: Uploading Files!!!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC