LoginID as parameter to GridView or Dataset

G

Guest

I am VB developer learning ASP.net.
What is the best way to do the following.
User logs in against our companies SQL Server to check if they have
permissions in our Security table.
If successful, I want the "login" name or ID to feed a parameter in the
GridView to return a recordset or dataset of their data.
I have already setup my data connection to our company's SQL server and the
GridView (or dataset??) is already configured with a Select statment against
the needed table. I just dont know how to pass the loginID to the GridView.
Please help.

thanks in advance.
 
S

Siva M

You may want to use parameterized SELECT statement, login name being the
parameter here. An example could be found here:

http://quickstarts.asp.net/QuickStartv20/aspnet/doc/data/databases.aspx (See
Filtering Data section)

Hope this is what you are looking for.

I am VB developer learning ASP.net.
What is the best way to do the following.
User logs in against our companies SQL Server to check if they have
permissions in our Security table.
If successful, I want the "login" name or ID to feed a parameter in the
GridView to return a recordset or dataset of their data.
I have already setup my data connection to our company's SQL server and the
GridView (or dataset??) is already configured with a Select statment against
the needed table. I just dont know how to pass the loginID to the GridView.
Please help.

thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top