-
Notifications
You must be signed in to change notification settings - Fork 0
/
!_DropDownList.aspx
43 lines (33 loc) · 1.32 KB
/
!_DropDownList.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="!_DropDownList.aspx.cs" Inherits="WebApplication_A.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>DropDownList</title>
</head>
<body>
<form id="form1" runat="server">
Country with HTML:
<asp:DropDownList ID="lstItems" runat="server">
<asp:ListItem Text="India" Value="IN"></asp:ListItem>
<asp:ListItem Text="Australia" Value="AU"></asp:ListItem>
<asp:ListItem Text="USA" Value="US"></asp:ListItem>
</asp:DropDownList>
<br />
Country onLoad:
<asp:DropDownList ID="lstCountry" runat="server">
</asp:DropDownList>
<br />
States onClick:
<asp:DropDownList ID="LstStates" runat="server">
</asp:DropDownList>
<asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_Click" />
<br />
Names From Text Box:
<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
<asp:Button ID="btnAddName" runat="server" Text="Add Name" OnClick="btnAddName_Click" />
<br />
<asp:DropDownList ID="lstNames" runat="server">
</asp:DropDownList>
</form>
</body>
</html>