Good day,

I am facing a trouble with my project. i want to load the database in my session but i dont have idea on how to do it.

session["getName"] = _BLL.GetName(_myEntities);
Response.Redirect("otherpage.aspx",false);

on my master page.

myLabel.Text = session["getName"].ToString();

that's my code. i want to get the record on the database. i mean whole record.

Recommended Answers

_BLL.GetName(_myEntities); i hope this method returns string. Quick watch this..
myLabel.Text = session["getName"].ToString(); needs to return string... Check the is null condition with string and then convert it to string.

Jump to Post

All 2 Replies

_BLL.GetName(_myEntities); i hope this method returns string. Quick watch this..
myLabel.Text = session["getName"].ToString(); needs to return string... Check the is null condition with string and then convert it to string.

thanks for the reply..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.