Author: iioannou | Posted on: 3/10/2010 6:12:43 AM | Views : 325

Hi all,


I am using this code which works perfect when I type username and the studentid in my textboxes in the first page.Now after pressing the button to go to the second page , the two labels display the values of the textboxes in the first page BUT when I am pressing a button in my second page I get this error :
Object reference not set to an instance of an object. 


My code which is in the second page load event is :  
Label1.Text = "Name:" + CType(PreviousPage.FindControl("txtusername"), TextBox).Text
Label2.Text = "Student ID:" + CType(PreviousPage.FindControl("txtstudentid"), TextBox).Text


Is there any option to make this labels keep their values ??
 


 
...

Go to the complete details ...