really, it was not working.
first i changed: autoeventwireup="true"
some modifications in your code, connection string, i am using pubs, mainly:
can you adjust yours?
<%@ Page Language="
vb" autoeventwireup="true" Debug="True" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.OleDb" %>
<%@ import Namespace="System.Data.SqlClient" %>
<script runat="server">
sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
dim myConnection as new oleDBConnection ("Provider=SQLOLEDB.1;Password=xxx;Persist Security Info=True;User ID=sa;Initial Catalog=pubs;Data Source=xx")
myConnection.open
dim cmd as oleDBCommand
dim rdr as oleDBDataReader
cmd= new oleDBCommand ("SELECT au_lname FROM authors",myConnection)
'myConnection.open()
rdr=cmd.ExecuteReader(CommandBehavior.Closeconnect ion)
with Names
.DataSource=rdr
.DataTextField="au_lname"
.DataValueField="au_lname"
.DataBind()
End with
rdr.close()
end sub
</script>
<html>
<head>
<title>Students</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="french">
</head>
<form method="post" runat="server" name="names" language="JavaScript">
<body bgcolor="#666666">
<div align="center">
<asp:DropDownList id="Names" runat="server" size="1" style="text-align: right; font-family:Arial; font-size:8pt; letter-spacing:-1pt; font-variant:small-caps" tabindex="5" >
</asp:DropDownList>
</div>
</form>
</html>
----------------------
wagner reatto