I have a page that fills in a text box and also a grid with data. the first issue was each time the page refreshed, all of the text boxes and the GridView were then blank. I solved that by using Session vars to hold the key data elements then repopulaing them when it reloaded each time. I knwo ther eis abetter way. But now If I go to another page and fome back the code above is not even runign since there is no page reload but yet the data in eveything is blank.
So what the best way to do this? I saw something about View state but then it said that was not to hold values?
also what is "good" book to learn .NET 4?
So what the best way to do this? I saw something about View state but then it said that was not to hold values?
also what is "good" book to learn .NET 4?
Code:
'came back from ChoosePerson form
If Session("PersonType") = "Employee" Then
'fill the grid
Me.txtEnterpriseID.Text = Session("EmployeeEnterpriseID")
Call FindEmployee()
If Session("GotNominatorName") <> "" Then
Me.txtNominator.Text = Session("GotNominatorName")
End If
Session("PersonType") = ""
'Session("EmployeeEnterpriseID") = ""
End If
If Session("PersonType") = "Nominator" Then
Me.txtNominator.Text = Session("NominatorFullName")
'Session("NominatorFullName") = ""
Session("PersonType") = ""
'relaod the grid if
If Session("EmployeeEnterpriseID") <> "" Then
Call FindEmployee()
End If
End If
[code]
DougP