Community discussion forum

index out of range

  • 1 year ago
    Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index Source Error: Line 87: h2.Value = Right(t1.Text, t1.Text.Length - pos) Line 88: End If Line 89: **queserial.Text = "Question : " + CType(queslist.Item(ViewState("qno")).QNo, String) & " of " & queslist.Count**Line 90: aquestion.Text = queslist.Item(ViewState("qno")).Question Line 91: If queslist.Item(ViewState("qno")).Option1 = " " Then
    Post was edited on 13/11/2008 11:44:44 Report abuse
  • 1 year ago
    Usually this error is generated whenever there is no value or negative value is encountered. My suggestion to u is use line by line debugging and check the value of each variables.
  • 1 year ago
    Saif, Are you referring the value which is in the size f the collection elements ??

Post a reply

Enter your message below

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

Want to stay in touch with what's going on? Follow us on twitter!