I am developing a project in ASP.Net. How to retrieve data using C# from certain table (SQL database) based on user_id after user log in. And how to display the data into text box and label after user click Show button?

>How to retrieve data using C# from certain table (SQL database) based on user_id after user log in.

SQL text,

SELECT * FROM tablename WHERE userid=@userid

and classes from System.Data.SqlClient namespace.

>And how to display the data into text box and label after user click Show button?

Write your code in the button's click handler.


>how to display the data into text box and label after user click Show button?

Write your code in the button's click handler.

Can you give me the code?

>Can you give me the code?

Nope. That's not help. That would be doing your homework for you.
Read the forum rules. You need to show effort, and what better way than posting the code that you have tried so far?