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 4089 times
|
|
|