jazz
jazz

Reputation: 73

how to store value of session into a variable

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 ;

Upvotes: 0

Views: 1208

Answers (1)

AnthonyWJones
AnthonyWJones

Reputation: 189457

Have you tried:-

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

Upvotes: 1

Related Questions