Click here to Skip to main content
15,867,141 members
Please Sign up or sign in to vote.
1.22/5 (3 votes)
See more:
public static List<string> GetCompletionList()
{

//here we want to use viewstate /session to store a value

}

please help if any solution is it.
Posted
Comments
ZurdoDev 5-Feb-15 14:17pm    
What's the problem?

1 solution

C#
public static List GetCompletionList(string Name)
{

 HttpContext.Current.Session["Name"]= Name;
 HttpContext.Current.ViewState["Name"]=Name;

}


and Retrive It


"cs"
public static List GetCompletionList()
{
   String Name = HttpContext.Current.Session["Name"].Tostring()
   string abc = HttpContext.Current.ViewState["Name"].Tostring()

}</pre>
 
Share this answer
 
v2

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