The SqlDataSource control enables you to use a Web control to access data located in a relational database, including Microsoft SQL Server and Oracle databases. The SqlDataSource control uses ADO.NET classes to interact with any database supported by ADO.NET. You can use the SqlDataSource control with other controls that display data, such as the GridView, FormView and DetailsView controls to display and manipulate data using little or no code.
Questions tagged [sqldatasource]
967 questions
0
votes
2 answers
How to set parameters for SqlDataSource UpdateCommand
For a Gridview:
I am trying to use a stored procedure for the first time in a SQLDataSource for the UpdateCommand:

Baxter
- 5,633
- 24
- 69
- 105
0
votes
1 answer
Execute sqldatasource after page loads without a button
So on my IssueRequest.aspx page I have a form that the customer can fillout that issues a work request to my company. However, I need to make sure that they filled out their account info which by default upon account creation equals "" in each…

Neth Munson
- 57
- 1
- 8
0
votes
1 answer
add a textBox in GridView and the textbox retrieves data from a collection not from a dataSource
I want to add a textBox in GridView knowing that the textbox retrieves data from a collection like ArrayList or List(OF ..) not from a dataSource (ASP.net)

Yassine edouiri
- 281
- 3
- 14
- 30
0
votes
2 answers
Editing parameters in sqldatasource
I want to create a dynamic select command in an SQLDataSource. It should read a value from the URL sent using get, grab it and stick it into the select command.
My sqldatadource is in my aspx page and looks like this

kev670
- 810
- 2
- 18
- 37
0
votes
6 answers
howto ASP.NET SQL query where DateTime greater than?
On my asp.net project I use SQLDataSource to connect to a DB,
I want to filter rows with a DateTime field (PublishDate) from the last 7 days
(So I see books with PublishDate greater than DateTime.Now - 7 days)
you can see in the screen capture what…

RanH
- 740
- 1
- 11
- 31
0
votes
0 answers
Updating records using stored procedure .. in ASP.NET no access to the RowUpdating event
I'm facing a problem with updating rows in SQL Server
When I want to update columns from a grid to a table in the SQL Server database using a stored procedure I have a problems with the onclick button (for the update). It will call a RowUpdating…

Yassine edouiri
- 281
- 3
- 14
- 30
0
votes
1 answer
ASP.NET DropDownList + SQL Query not showing anything
I have 5 dropdown lists and am trying to make it so if I choose a certain value on a certain dropdown list, it won't show that specific item on the following dropdown lists.
I am doing this through a specific SQL query on each dropdown list's data…

yotsubanned
- 31
- 6
0
votes
2 answers
Change Gridview Datasource using ASP .NET SQLDATASOURCE
i have a gridview automaticly connecting with sqldatasource1, etc. For the grid, I also have a search textbox If the user needs to filter the records it calls an another ((sqldatasource2-another procuder)) and put it in the same gridview ..,so i…

Yassine edouiri
- 281
- 3
- 14
- 30
0
votes
1 answer
Dynamically using SQL statements for SQLDataSource
I may or may not have a pretty simple question here for you guys. Basing my if-else statements off of the existence of a string, I am trying to either call a SELECT statement with a parameter or not and pass them both to the same resulting…

se_brandon
- 228
- 10
- 25
0
votes
1 answer
write some javascript code in response.write when SqlDataSource1_Deleted
i have a notification j-query plugin .. i taste it in my page (working 100%)
but when i want to use it in a event SqlDataSource1_Deleted with the response.write method it does not work
Protected Sub SqlDataSource1_Deleted(ByVal sender As Object,…

Yassine edouiri
- 281
- 3
- 14
- 30
0
votes
1 answer
asp.net textbox in ItemTemplate, update sqldatasource
I am a beginner in asp.net. I want to update the data in the database. But nothing happens. I used google and found that the problem can be solved through the ObjectDataSource, but I'm not sure.

NikolayS
- 73
- 1
- 6
0
votes
1 answer
Dynamic query in ASP.Net (WHERE clause in SQLDataSource)
I'm currently trying to loop through an array (two values) and use both values in a query inside the loop. Please see code below. Right now my code doesn't work. I'm trying to populate dynamically the "appType" parameter within the…

Mark Marina
- 713
- 4
- 12
- 26
0
votes
2 answers
Change Gridview Datasource or Select statement ijn code?
I have a gridview with sqldatasource, etc. For the grid, I also have
a search textbox. If the user needs to filter the records, I want to
dynamically adjust the SELECT statement for the SqlDataSource using a sql procedure with a parametre can take…

Yassine edouiri
- 281
- 3
- 14
- 30
0
votes
5 answers
How to set a GUID field from C# code
There is a parameter in InsertParameters. When I try to set it I get an error::
Implicit conversion from data type sql_variant to uniqueidentifier is not allowed. Use the CONVERT function to run this query
Here is my code in c#:
String complexID =…

Karadous
- 1,555
- 3
- 26
- 37
0
votes
2 answers
How to use value selected by Sql Data Source in C# code
I am retrieving the email id of the user in SqlDataSource and want to send an email to this email ID. Below is the code for the SQL Data Source.

techblog
- 529
- 2
- 5
- 16