-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathddl.aspx
31 lines (27 loc) · 805 Bytes
/
ddl.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
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Collections.Generic" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Page_Load(Object sender, EventArgs e)
{
List<string> vals = new List<string>{"One", "Two", "One Two Three Four"};
testList.DataSource = vals;
testList.DataBind();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>ASP.NET WebForms Databound Dropdown List</title>
</head>
<body>
<div>
This tests a simple data bind from page load.
<br/><br/><br/>
<form runat="server">
<asp:DropDownList ID="testList" runat="server" />
</form>
</div>
<div style="margin-top:30px;"> </div>
</body>
</html>