PreviousPage.getInput() value only exist upon PageLoad?

newbeee

Member
Joined
Sep 27, 2007
Messages
19
Programming Experience
Beginner
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.
 
Thread moved to ASP.Net section.
 
Forgive me, I'm very new. It's something that I run into so I thought I'd ask. Why wouldn't it consider an ASP.NET?

Thanks.
 
Back
Top