Xpode.com        Click here to Print this article.

How to bind sqldatasource in code behind

How to rebind sqldatasource in code behind with dropdown.

How to bind sqldatasource at runtime

Syntax:

Dim dv As System.Data.DataView = CType(SqlDataSourceID.Select(DataSourceSelectArguments.Empty), System.Data.DataView)

Example:

Dim dv As System.Data.DataView = CType(CompSource.Select(DataSourceSelectArguments.Empty), System.Data.DataView)

Dim drv As System.Data.DataRowView = dv(0)

'DropDownList1.DataSource = dv

DropDownList1.DataBind()

http://
http://

Contributed by:
Rohit kakria
I am software developer

Resourse address on xpode.com
http://www.xpode.com/Print.aspx?Articleid=318

Click here to go on website