title: ASP.NET Login control, how to query user-specific data
body: <p>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?</p>
  
  <p>ASPNETDB.MDF is the database, I have created another table with some additional fields for the user.</p>
  
  <p>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?</p>
  
  <p>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?</p>
  
  <p>Basically I want to show data to the user in a gridview so the user can edit it.</p>