Tagged Questions
5
votes
4answers
630 views
What's the purpose of Datasets?
I want to understand the purpose of datasets when we can directly communicate with the database using simple SQL statements.
Also, which way is better? Updating the data in dataset and then ...
5
votes
3answers
3k views
Clear cache in SqlDataSource
I need to manually clear the cache on a SqlDataSource with caching enabled. I've tried setting EnableChaching = false, and CacheDuration = 0 (as well as = 1) and none seem to expire the content ...
5
votes
2answers
1k views
Gridview why all visible rows are set to dirty?
I'm using the BulkEditGridView control as discussed http://roohit.com/site/showArc.php?shid=bbb62, and it's perfect for my needs. The problem I'm having is that whenever I save, every visible row (I ...
5
votes
1answer
126 views
GridView with merged cells
I need to display data in grid view with merged rows for some columns. Please help me to prepare a grid view in below defined format:
And the original data comes from database is in below format:
...
4
votes
2answers
1k views
empty gridview although the sqldatasource has values
I have really weird situation.
I've created new aspx page, and without using ANY custom logic objects (everything created with visual studios wizards) tried to create grid view from sqldatasource.
...
4
votes
1answer
3k views
How to use User.Identity.Name as a parameter for SqlDataSource in ASP.NET?
For SqlDataSource I can configure the external source for the incoming paramater.
For example it might be a QueryString, Session, Profile and so on.
However I do not have an option to use User as a ...
4
votes
2answers
324 views
How to sanitize a query string when used with a databound repeater control?
Given the following URL:
domain.com/page.aspx?id=123
How can I sanitize that query string value when it is used on a Databound Control such as a repeaters SqlDataSource?
<asp:SqlDataSource ...
4
votes
1answer
54 views
Access The Data Retrieved
I have been trying to find an answer to this question now for days and I find it hard to believe that this can't be done.
I want to get to the DataSet/DataTable that is built when a ...
3
votes
1answer
3k views
Converting a DBNull to boolean when binding to checkbox in a detailsview control
This is kind of silly but I have a DetailsView that binds to a record in my database using a sqlDataSource. My problem is that the field I'm binding to is a bit field, (i,e 1 or 0) that at present ...
3
votes
2answers
2k views
Skip setting value of sql parameter in SqlDataSource in WebForm
I am making a WebForm in asp.net and I want to display gridview with data from asp:SqlDataSource
My problem becomes when I try to skip (pass null) values for some of the Parameters.
Here is some ...
3
votes
4answers
2k views
Dynamic WHERE clauses in a SqlDataSource
I'm using a SqlDataSource in a very simple application. I'm allowing the user to set several search parameters for the SDS's select command via TextBoxes, one TextBox per parameter (think ...
3
votes
2answers
4k views
SQLDatasource parameters
How can i set sql parameters for an sqlDatasource in the code behind?
I am trying like this:
int id=1;
SqlDataSource1.SelectCommand = "SELECT * FROM categ WHERE id=@id";
...
3
votes
1answer
7k views
The GridView 'GridView1' fired event Sorting which wasn't handled
I have created a gridview using toolbox in c#,
it is able to show & sort the items in my sqldatasource, but when I change the sqldatasource as it can be seen in the below code, it displays the ...
3
votes
1answer
540 views
ASP.NET Insert Problem
I am trying to start learning ASP.NET after a few years of PHP experience and I am having trouble getting the basics down.
I am just trying to insert a row into a MS SQL Server Compact 4.0 database ...
3
votes
3answers
11k views
How to set SelectedValue of DropDownList in GridView EditTemplate
I am trying to do this as asked earlier. The only difference that I found is additional List item that was included in above code.
I tried to use AppendDataBoundItems=true but it is still not ...