Tutorial :how to store value of session into a variable



Question:

Thanks a lot to all for helping me ...

Plz some one tell me .. How to assign value of session into a variable . I have a session which calculates no of rows in gridview . As below

session["cont"] = GridView1.Rows.Count ; Then in another function ,

I want to store this in Variable K ;


Solution:1

Have you tried:-

int K = (int)Session["cont"];  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »