Hi Everyone

I'm a new bee in C#. I'm using ASP.NET with C# for an application. I want to know how to take values from a database(sqlserver) and store it in session variables in .net. Can anyone pl help?

Thanks in Advance

Dear,

public string GetUserFirstName(your params...)
{
//use ADO.NET to work with your database
}
......
Session.Add("SessionName", GetUserFirstName(your params));
......

For more questions, I recommend to start your threads in ASP.NET form at http://www.daniweb.com/forums/forum18.html

Be a part of the DaniWeb community

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