This is my Code and any ideas would be appreciated
if ((objRdr["RSurvey4"] != DBNull.Value))
{
string VarRSurvey4 = (string)objRdr["RSurvey4"].ToString();
RSurvey4.Items.FindByText(VarRSurvey4).Selected =true;
}
This is the Error
Object reference not set to an instance of an object. 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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 130: {
Line 131: string VarRSurvey4 = (string)objRdr["RSurvey4"].ToString();Line 132: RSurvey4.Items.FindByText(VarRSurvey4).Selected = true; Line 133:
Line 134: // RSurvey4.Items.FindByText((string)objRdr["RSurvey4"]); |
Source File:c:\inetpub\vhosts\risktechipra.com.au\httpdocs\inspectionsAdd.aspx Line:132