I can’t figure what is wrong with this code:
DataRow[] rowArray = new DataRow[tempTable.Rows.Count];
String expression = "ID != " + index.ToString();
rowArray = tempTable.Select(expression);
I get an error stating: “Cannot interpret token '!' at position 4.”
How should I write the...
I have a datatable that is created on the fly. I need to be able to delete a row from it based on a value that is passed into a method as an argument.
sort of like:
private void deletion(string val){
then delete from the datatable where column 4 = val
}
Can this be done? If so how?
I have a datatable that I'm using as a shopping cart. I need to be able to remove rows from this datatable. I have an aspx page that displays the datatables contents and I have a button which I want the user to be able to click to remove that particular record. The button's CommandParameter is...
Is it possible to bind a gridview to a datatable which is created and populated in the OnLoad event? If so some examples or some direction would be greatly appreciated
I am trying to set a parameter for a datasource using the "Define Parameters" Dialog box with a value from a session variable which is holding a datatable with 2 columns (col1 and col2). How can I access the session variable's col2 value? I've tried using "Cart.col2" (Cart is the name of the...
I have created a shopping cart to hold the selected pdf PrimaryID to be emailed to a user. But I'm not sure how to go about creating the selected PDF from data residing in the database and attaching them to an email. I need to pull the data from the database based on the primaryID in the...
I have a menu in my masterpage that is bound to a siteMapDatasource that has the following layout:
Home
MenuItem1
MenuItem2
MenuItem3
SubMenuItem1
SubMenuItem2
SubMenuItem3
the SubMenuItems pop-up when the mouse hovers over MenuItem3.
Here's my problem. Whenever I click on one...
I have two SQLDataSources I'll call them SQL1 and SQL2.
SQL1 returns all from a table and is the datasource for a datalist.
SQL2 is used as Datasource for a listbox inside my datalist. But I want to add a where clause that filters the rows returned based on a field returned in SQL1.
Is this...
I have a junction table that holds an employeeID and DepartmentID. Sort of like:
EmpID DeptID
1 200
1 300
1 110
2 300
2 200
I would like to write an SQL statement that would return the following dataset with one record for each...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.