forked from WebApps-Cascadia/bit285-data-exploration
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataSource.aspx
More file actions
35 lines (29 loc) · 1.05 KB
/
Copy pathDataSource.aspx
File metadata and controls
35 lines (29 loc) · 1.05 KB
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
<%@ Page Language="C#"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Categories</title>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
ArrayList Sections = new ArrayList();
Sections.Add("Organic Produce");
Sections.Add("Baking");
Sections.Add("Soups");
Sections.Sort();
//ddlSections.DataSource = Sections;
ddlSections.DataBind();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="ddlSections" runat="server" DataSourceID="CategoriesDataSource" DataTextField="CategoryName" DataValueField="CategoryID">
<asp:ListItem>ddlCategories</asp:ListItem>
</asp:DropDownList>
<asp:AccessDataSource ID="CategoriesDataSource" runat="server" DataFile="~/App_Data/grocertogo.mdb" SelectCommand="SELECT * FROM [Categories]"></asp:AccessDataSource>
</div>
</form>
</body>
</html>