asp.net 4.0

Style properties of GridView control

Property

Type

Description

AlternatingRowStyle

TableItemStyle

You can use this property to get a reference to the TableItemStyle object that enables you to define the style properties for every other row in the table.

EditRowStyle

TableItemStyle

You can use this property to get a reference to the TableItemStyle object that enables you to define the style properties …

Learn more

State properties of GridView control

Property

Type

Description

BottomPagerRow

GridViewRow

The property is used to get a GridViewRow object that represents the bottom pager row in the control.

Columns

DataControlFieldCollection

 

You can use the property to get a collection of objects that represent the columns in the control. If columns are auto-generated the collection will be empty. From the DataControlFiled class …

Learn more

Visual properties of GridView control

Property

Type

Description

BackImageUrl

string

Use it to get or set the URL to an image to display in the background

Caption

string

The property is used to get or set the text to render in an HTML caption element in a GridView control. With this property you can make the control more accessible to users of assistive …

Learn more

Behavioral properties of GridView control

Property
Type
Description

AllowPaging
bool
The control will support paging if you set it to true

AllowSorting
bool
The control will support sorting if you set it to true

AutoGenerateColumns
bool
By default its value is true i.e. columns will be automatically created for each filed in the data source.

AutoGenerateDeleteButton
bool
If you set it to true the control will include a button …

Learn more

How to get IP address in ASP.NET

Whenever a browser sends a request for a page, it also sends a number of other headers to the script, containing information such as the browser type. It also includes information such as the visitors IP address.

In ASP.NET you can get the IP address of your users from the Request.ServerVariables collection. The following ASP.NET code will display the …

Learn more