Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am declaring a variable at class level and assining some value to that variable on
DropDown Selected Index Change event and when i click on submit button the variable does
not contain any value.

Can any one explain me what could be the issue.

Thanks in advance....
Posted
Comments
Prakash Thirumoorthy 27-Feb-13 4:28am    
question is not clear. provide more information with your coding...
Orcun Iyigun 27-Feb-13 4:31am    
Can you post your DropDown Selected Index Change and button click events?

Hi Susheel

You can use Session to store per user, so it will be accessible in all your pages.

On the other hand, if just need it on a specific page, you can save it in ViewState and can get it in post back.

Or you can use static variable.

Regards
Willington
 
Share this answer
 
Try usong ViewState("VS_Name"). It is same as varible only.

For eg:

ViewState("Name")="Vardhan Desai"

txtName.Text=ViewState("Name")
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900