Simple code snippet of DropDownList

Amatya
Posted by Amatya under ASP.NET category on | Points: 40 | Views : 325
<form id=”form1” runat=”server”>
<div>
<asp:DropDownList id=”ddlCountry” DataSourceID=”srcCountry” DataTextField=”Country”
DataValueField=”CountryId”
Runat=”server” />
<asp:SqlDataSource
id=”CountryScr”
SelectCommand=”SELECT CountryScr, Country FROM Country”
ConnectionString=”<%$ ConnectionStrings:Country %>”
Runat=”server” />
</div>
</form>
</body>
</html>


Hope it will be helpful for beginners

Comments or Responses

Login to post response