I have 2 web pages. First page has a textbox and a button control.
when I enter test and click on the button , system goes to the second page. And in the second page I want to access the Textbox in the first page. When I try to do this I get the following error.
"Object reference not set to an instance of an object. Following is my code :
Dim txt As New TextBox
' Find the server name on the previous page
txt = CType(Page.PreviousPage.FindControl("TextBox2"), TextBox)
If Not IsNothing(txt) Then
Response.Write("[Name Not available]")
I know I could do this with session, but I want to use the Page.PreviousPage.FindControl. Any help is greatly appreciated
View Complete Post