i added gridview control to my page & added a sqldatasource to it, but i don't want to display all of the database values, i want to display a specific user values, how can i do this in select datasource wizard?, i want to add
Session["username"] as a condition to my select query.
i added gridview control to my page & added a sqldatasource to it, but i don't want to display all of the database values, i want to display a specific user values, how can i do this in select datasource wizard?, i want to add
Session["username"] as a condition to my select query.
Refer to the following. In the following example ID has been used. You may use username or any other value.
Add a GridView and fo to the SqlDataSource Wizard.
Member
8 Points
29 Posts
how to add session["somevalue"] as a parameter in where clause to my gridview .
May 06, 2014 03:12 AM|kranthikumar88|LINK
i added gridview control to my page & added a sqldatasource to it, but i don't want to display all of the database values, i want to display a specific user values, how can i do this in select datasource wizard?, i want to add Session["username"] as a condition to my select query.
please resolve my issue
Star
10596 Points
1379 Posts
Re: how to add session["somevalue"] as a parameter in where clause to my gridview .
May 06, 2014 10:55 PM|Sam - MSFT|LINK
Hi,
Greetings!
Refer to the following. In the following example ID has been used. You may use username or any other value.
Add a GridView and fo to the SqlDataSource Wizard.
Now, check out the source:
Create a Session variable:
Make sure the Key specified for the Session must be same in my case it is Session["ID"].
Best Regards!