Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




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()
Share this article   |    Print    |    Article read by 4108 times
Author:
Rohit kakria
I am software developer
Related Articles:
Related Interview Questions: No related interview question