views:

829

answers:

2

Hi,

I have installed a Login control in ASP.NET/C# in login.aspx and after the user has logged in, it takes him to the member.aspx page. All works perfectly fine but what should I do if I want to query a database for some user-specific data? How would I do that?

ASPNETDB.MDF is the database, I have created another table with some additional fields for the user.

So after the member.aspx has been loaded I put a LoginName control so extract the user's name but how can I use this to query the database for some info?

I tried calling the database with owner user/pwd but it doesn't work. It says "Login failed for ". Is there any other way of doing that?

Basically I want to show data to the user in a gridview so the user can edit it.

A: 

Since you are already using the ASP.NET login system, you could take a look at the Profile system.

Henk Holterman
That's what I was looking for. Thank you!
A: 

You can use profiles but if you have more spefic requirement then you can inherit the login control and create your controls.

jalpesh
Profile system is enough for what I'm doing right now but where can I learn more about inheriting the login control and creating my own controls? I would appreciate a source with examples.