I am trying to pass a value from txtSearch.Text in a web form named EditAptDetails.aspx to another web form named frmCreateAptForExistingClient.aspx, and then display the value being passed in the textbox named txtPhone.Text
Here is the code that I am using
' Pass value of txtSearch.text to another page
Response.Redirect("frmCreateAptForExistingClient.aspx?Parameter=" + txtSearch.Text)
'Receive value from another page and display in txtPhone.Text
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
txtPhone.Text = Request.QueryString("Parameter").ToString()
End Sub
System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 26: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Line 27: 'Put user code to initialize the page here
Line 28: txtPhone.Text = Request.QueryString("Parameter").ToString()
Line 29: End Sub
Line 30:
|