ASP.Net - C# - Database

Get List Of Database Providers
Date : 29 Apr 2011
Views : 477

The following code snippet gets a list of all installed database providers.

Update Database Table Using SqlCommandBuilder
Date : 29 Apr 2011
Views : 767

The following code snippet demonstrates how to update a single database table in SqlServer using the SqlCommandBuilder class.

Get Commands From SqlCommandBuilder
Date : 29 Apr 2011
Views : 348

The following code snippet demonstrates how to get the Update, Insert and Delete commands from an SqlCommandBuilder object.

DataView Get Modified Rows From DataTable
Date : 27 Apr 2011
Views : 567

The following code snippet demonstrates how to use the DataView class to get all modified rows from a DataTable object. This example gets the original rows without the new changes. It can be used to find out which rows have changed.

DataView Example 1
Date : 27 Apr 2011
Views : 392

The following code sample demonstrates how to use the DataView class to filter and sort a DataTable object.

SqlDataSource With ControlParameter Example 1
Date : 26 Apr 2011
Views : 405

The following code snippet demonstrates how to use a ControlParameter object to bind data displayed in a GridView control to the selected value of a DropDownList control.

SqlDataSource Example 1
Date : 26 Apr 2011
Views : 356

This code snippet shows how to bind a GridView control to an SqlDataSource control.

DataTable Schema To Xml
Date : 13 Apr 2011
Views : 368

This code snippet will save a DataTable schema to an Xml file.

DataTable Select Method Example 1
Date : 13 Apr 2011
Views : 936

The select method of the DataTable class can be used to filter a DataTable object that has been populated with data. In this example the select method is used to get employess whos FirstName is John.

Call A Store Procedure
Date : 10 Apr 2011
Views : 454

This code snippet shows how to call a Store Procedure.

1

New Snippets

Update Content Label Text From Master Page ASP.Net - C# Miscellaneous

The following code snippet demonstrates how to update the Text property of a Label control located in a page which uses a master page from within the master page code behind file.

HTML Table Paging Javascript Navigation

The following code snippet demonstrates how to apply paging to a HTML table element.

Get Textarea Data Length Javascript Miscellaneous

The following code snippet demonstrates how to display the data length of a textarea element as the user types in data.

Custom TextBox Control With BackColor Hover C# Controls

The following code snippet demonstrates how to create a custom TextBox control, which can change its background color when a user hovers over the TextBox control.

TextBox Validating Event C# Controls

The following code snippet demonstrates how to validate TextBox controls using the Validating event.

Bing Map Control C# - Windows Mobile Controls

This simple code snippet demonstrates how to set the latitude and longitude for the Bing Map control.

Count Down Timer C# - Windows Mobile Miscellaneous

This code snippet demonstrates how to use the DispatcherTimer class to create a count down timer.

Edit And Update A listView Control ASP.Net - C# Controls

The following code snippet demonstrates how to bind a ListView control to a DataTable object and allow the user to edit rows using the ItemEditing and ItemUpdating events of the listView control. This example uses a Microsoft SQL Server and connects to the sample AdventureWorks database.

Remove All Options From Select Javascript Miscellaneous

The following code snippet demonstrates how to clear a select element and remove all options from it.

ListView With DataPager ASP.Net - C# Controls

The following code snippet demonstrates how to page through a ListView control using the DataPager control.

Bind ListView To DataTable ASP.Net - C# Controls

The following code snippet demonstrates how to bind a ListView control to a DataTable object. It also shows how to use the ItemTemplate to display the data.

XmlWriterSettings Example ASP.Net - C# XML

The following code snippet shows how to indent Xml data when using the XmlWriter class.

Deserialize Object From Xml File ASP.Net - VB XML

The following code snippet demonstrates how to deserialize an object from an Xml file and cast the object back into its original type.

Serialize Object To Xml ASP.Net - VB XML

The following code snippet demonstrates how to serialize an object and save it to an Xml file using the XmlSerializer class.

Save And Load Images Drawn On Canvas C# - Windows Mobile Graphics

The following code snippet demonstrates how to draw on a canvas. The canvas image can then be saved and loaded. Images are saved to isolated storage.

Top ASP.Net - C# Snippets

This code snippet shows how to populate a gridview control from a datatable object and allow a user to edit the rows and save the changes.

This code snippet shows how to get a DropDownList controls selected value using the SelectedIndexChanged event.

This code snippet writes a file directly to the HTTP response output stream using the WriteFile method.

This code snippet shows how to dynamically add a row to a GridView Control using the PreRender event. The Example shows how to add a new row which displays full employee details below a selected gridview row.

This code snippet shows how to populate a gridview control with data from a datatable object.

This code snippet exports a GridView to a MS Word document as a download.

This code snippet loads xml data from a string and then saves it to an xml file. It also sends the xml data to the browser.

This code snippet loops through all the headers from the HttpRequest object and displays its value.

This code snippet shows how to add text to the day cell in a Calendar control. It uses the OnDayRender event to add text to a day cell from a DataTable object.

The following code snippet demonstrates how to bind a ListView control to a DataTable object. It also shows how to use the ItemTemplate to display the data.