I have 2 pages:
Page1 - prompt user for input
Public ReadOnly Property getInput() As String
Get
getInput = txtInput.Text & " "
End Get
End Property
Page2 - display result upon input
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not (PreviousPage.getInput = " ") Then
Dim rpData As New clsACData
GridView1.DataSource = rpData.GetDeceasedReport(PreviousPage.getInput)
GridView1.DataBind()
End If
End Sub
I set GridView1 to be sortable. However, when I try to sort Gridview1 result, I receive this error:
"use the new keyword to create an object instance"
"check to determine if the object is null before calling the method"
It looks like PreviousPage.getInput() value only exist upon PageLoad. How can I solve this?
Thanks.
Page1 - prompt user for input
Public ReadOnly Property getInput() As String
Get
getInput = txtInput.Text & " "
End Get
End Property
Page2 - display result upon input
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not (PreviousPage.getInput = " ") Then
Dim rpData As New clsACData
GridView1.DataSource = rpData.GetDeceasedReport(PreviousPage.getInput)
GridView1.DataBind()
End If
End Sub
I set GridView1 to be sortable. However, when I try to sort Gridview1 result, I receive this error:
"use the new keyword to create an object instance"
"check to determine if the object is null before calling the method"
It looks like PreviousPage.getInput() value only exist upon PageLoad. How can I solve this?
Thanks.