S
slinky
This I know is basic stuff, but I can't get it to work me. What I'm
trying to do is have a DropDownList populated by an array. I'm using
Visual Web Studio Express 2005. I need to put the below code somewhere
in my main code. Thanks in advance!
_________________________________________________
Public arrData As String() = {"Yankees", "Mets", "Cardinals"}
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Page.DataBind()
End Sub
________________________________________________
<%@ Page Language="VB" EnableSessionState="True" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<aspropDownList ID="DropDownList1" runat="server"
EnableViewState="False" Width="271px"
OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
OnDataBinding="arrData" OnDataBound="Page_Load">
</aspropDownList></div>
</form>
</body>
</html>
trying to do is have a DropDownList populated by an array. I'm using
Visual Web Studio Express 2005. I need to put the below code somewhere
in my main code. Thanks in advance!
_________________________________________________
Public arrData As String() = {"Yankees", "Mets", "Cardinals"}
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Page.DataBind()
End Sub
________________________________________________
<%@ Page Language="VB" EnableSessionState="True" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<aspropDownList ID="DropDownList1" runat="server"
EnableViewState="False" Width="271px"
OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
OnDataBinding="arrData" OnDataBound="Page_Load">
</aspropDownList></div>
</form>
</body>
</html>