Click here to Skip to main content
15,911,132 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have a gridview that is populated. I also have a dynamic hyperlink column that the user clicks on. When they click on this link, I want the value of that cell to be stored in a session. I need this session variable to load data on the new page.

Any answer will be higly appreciated
Posted
Updated 10-May-12 6:19am
v2
Comments
Sandeep Mewara 10-May-12 12:40pm    
And where are you stuck when you tried it?

1 solution

You can achieve it using code behind layer as:

C#
MyDataItem item = (MyDataItem)GridView1.Rows[GridView1.SelectedIndex].DataItem;
Session["myItem"] = item;
 
Share this answer
 
Comments
khosnur 10-May-12 16:17pm    
Thank u very much for ur answer. Sir can u tell me what is MyDataItem is it Data Type and .DataItem is it like .toString()

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