Reputation: 449
Is there any way to bind a objectdatasource to an html select tag with runat=server attribute.
<select size="1" id='standard' onchange="toggleOption(this)" name='standard' class='custom-select' >
Upvotes: 0
Views: 553
Reputation: 820
Try this
as like as an asp dropdown list box
<select size="1" id="standard" runat="server" onchange="toggleOption(this)" name='standard' class='custom-select' >
C# Code
standard.DataTextField = "title";
standard.DataValueField = "val";
standard.DataSource = SrCity;
standard.DataBind();
Upvotes: 1