Select Page

C# Articles

Insert records with GridView and SqlDataSource using the FooterRow

If you want to add records to your database using a gridview (the gridview should already have at least one record with this method), you can use the GridView FooterRow as a container to hold the controls for the user to enter new data. You will then use the...

Nice C# class for ADO.net databinding

Nice class with a couple of methods to handle execution of a stored procedure with an array of parameters or a regular query and return a dataset object, all you need do is pass in the connection string when creating the connection. [codesyntax lang="csharp"] using...

Set parameter value of SqlDataSource to SelectedValue of another page control

You have a DetailsView control with edit / add and all the other goodness enabled, but when adding a new record you want a non-visible field to get it's value from another control like the SelectedValue of a GridView or a DropDownList in the InsertParameters...

Bind a Dataset to a Listbox using OleDbDataAdapter

Need to bind a web control to an OleDb data source in your C# web application, here's the magic. In this case I am binding a ListBox control with an ID of ListBox1 to the ProductName field in the Products table of our old friend the Northwind database. These are the...