hello!!

i want to read username from database then pass the username in session how its possible using c# in asp.net??

Your c# code for reading from a DB wil be slightly different based on the DB (sql, oracle, MS Access, etc...) and your approach (having the SQL select in your web app vs runing a stored procedure and having the SQL code in your DB).

For the session...

Session["someValue"] = assign the value that you read from the DB.

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.