Community discussion forum

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

  • 1 year ago
    Plz solve my problem code is... singlecourse = Session("singlecourse") ename.Text = singlecourse.CourseName Session("testname") = singlecourse.CourseName Seclist = que.GetSection(singlecourse.CourseCode) Qnolist = que.GetQnumber(singlecourse.CourseCode) Session("totsec") = Seclist Session("totqno") = Qnolist Session("queslist") = queslist t1.Text = Profile.Ttime pos = InStr(t1.Text, ":") h1.Value = t1.Text.Substring(0, pos - 1) 'h2.Value = t1.Text.Substring(pos, 2) h2.Value = Right(t1.Text, t1.Text.Length - pos) End If Else ViewState("qno") = CType(Session("summary"), Integer) Session("summary") = "" summbtn.Visible = True queslist = Session("queslist") ename.Text = Session("testname") t1.Text = Session("etime") pos = InStr(t1.Text, ":") h1.Value = t1.Text.Substring(0, pos - 1) h2.Value = t1.Text.Substring(pos, 2) End If 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 Regards Kausar

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

We'd love to hear what you think! Submit ideas or give us feedback