ASP.Net - VB - Controls

Gradient Row Effect
Date : 06 Jun 2011
Views : 319

The following code snippet demonstrates how to create a gradient effect using the RowCreated event. The backcolor for each row is adjusted using the row index everytime a row is created. This creates a gradient effect.

DetailsView Paging Example
Date : 25 May 2011
Views : 510

The following code snippet demonstrates how to apply paging to a detailsview control using the PageIndexChanging event.

GridView RowDataBound Event Example
Date : 25 May 2011
Views : 3287

The following code snippet demonstrates how to use the RowDataBound event to modify the value shown in a cell.

GridView Sorting Example
Date : 25 May 2011
Views : 614

The following code snippet demonstrates how to sort a gridview control using the Sorting event.

GridView Paging Example
Date : 25 May 2011
Views : 661

The following code snippet demonstrates how to apply paging to a gridview control using the PageIndexChanging event.

Populate TreeNode Using The TreeNodePopulate Event
Date : 24 May 2011
Views : 396

The following code snippet demonstrates how to use the TreeNodePopulate event to populate the nodes in the TreeView control.

Get Selected TreeNode
Date : 24 May 2011
Views : 259

The following code snippet demonstrates how to get the selected TreeNode using the SelectedNodeChanged event.

Bind Object To DropDownList
Date : 24 May 2011
Views : 352

The following code snippet demonstrates how to bind an object to a dropdownlist control.

Add TreeNodes To TreeView Control
Date : 27 Apr 2011
Views : 258

The following code sample demonstrates how to add TreeNode objects to a TreeView control.

FileUpload Example
Date : 19 Apr 2011
Views : 700

This code snippet shows how to upload a file using the FileUpload control.

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 - VB Snippets

The following code snippet demonstrates how to use the RowDataBound event to modify the value shown in a cell.

This code snippet shows how to get the selected row index of a GridView control using the RowCommand event.

This code snippet shows how to bind a DataTable object to a GridView control.

This code snippet shows how to bind a DataTable object to a DropDownList control.

This code snippet shows how to get the selected date from a Calendar control using the SelectionChanged event.

This code snippet show how to add a row number to a GridView control using the RowCreated event.

This code snippet shows how to highligh a selected GridView row using the RowCommand Event.

This code snippet shows how to populate a DataTable object using the SqlDataAdapter class.

This code snippet shows how to populate a GridView control with data from an Xml file using the DataSet class.

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