how can we reslove this 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 19: { Line 20: var nametxt = PreviousPage.FindControl("NameTextBox") as TextBox; Line 21: NameLable.Text = nametxt.Text; Line 22: } Line 23: }
how can we reslove this error
ReplyDeleteObject 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 19: {
Line 20: var nametxt = PreviousPage.FindControl("NameTextBox") as TextBox;
Line 21: NameLable.Text = nametxt.Text;
Line 22: }
Line 23: }
Make Default.aspx page as start page. Watch again, if you don't understand what I am talking about.
Delete