netpicker9
01-26-2007, 08:57 AM
Display.aspx.vb
Public shared EmpNo, EmpName as string
Protected Sub Page_Load
If Not Me.IsPostBack Then
Dim obj as SomeDll.ClsEmp
EmpNo = obj.GetNO()
EmpName = obj.GetName()
End if
End sub
In this page (Display.aspx), I have 2 dropdown and a button which cases Postback to the same page (Display.aspx)
If I click button or select dropdown, I am able to print the EmpNo, EmpName values to the form..
But, If I left the page for sometime, without taking any action on it and later If I click button, the EmpNo, EmpName variable are showing NULL values..
I used Public Shared to define these variables..
What is the best way to store variable values.. I can't use Sessions or store variable info in database..
Suggest me..
thanks
Public shared EmpNo, EmpName as string
Protected Sub Page_Load
If Not Me.IsPostBack Then
Dim obj as SomeDll.ClsEmp
EmpNo = obj.GetNO()
EmpName = obj.GetName()
End if
End sub
In this page (Display.aspx), I have 2 dropdown and a button which cases Postback to the same page (Display.aspx)
If I click button or select dropdown, I am able to print the EmpNo, EmpName values to the form..
But, If I left the page for sometime, without taking any action on it and later If I click button, the EmpNo, EmpName variable are showing NULL values..
I used Public Shared to define these variables..
What is the best way to store variable values.. I can't use Sessions or store variable info in database..
Suggest me..
thanks