How can i add Session value in codebehind. I have tried doing it this way but the session does nt have any value.
x is string.
td1.InnerHtml = "<a href=\"Search.aspx\" onClick=\"Session['catvalue']=" + x + "\">" + x +</a>
Thank you in advance!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since you’re using ASP.NET, you would be better off with an ASP:Link and calling an ASP.NET code behind function.
In your
.aspxpageIn your
.aspx.cspage (codebehind)