hi im a newbie in asp.net(learn 2 days ago) n still havent fully grasp the concept of asp.net yet. I ran into some problems here but i dunno what is it.
i've tried looking at the other post but could not really find the error in mine .Can you please guide me?
<%@ Import nameSpace = "System.Data" %>
<%@ Import NameSpace="System.Data.ODBC" %>
<script language="VB" runat="Server">
Sub page_Load(Sender as Object, E as EventArgs)
if not ispostback Then
Dim ConODBC As OdbcConnection
Dim cmdSelect as OdbcCommand
Dim dtrworks As OdbcDataReader
Dim connStr, sql as String
connStr ="Driver={MySQL ODBC 3.51 Driver};server=192.168.2.14;Port=3306; DATABASE=vome; option=0"
ConODBC = New OdbcConnection(ConnStr)
conODBC.Open()
cmdSelect = New OdbcCommand( "SELECT * FROM worklist", conODBC)
dtrworks = cmdSelect.ExecuteReader()
linklist.DataSource = dtrworks
linklist.DatatextField = "img_title"
linklist.DatavalueField = "img_link"
linklist.DataBind()
dtrWorks.Close()
Dim profile
profile.DataSource = dtrworks
profile.DataTextField = "img_name"
profile.DataTextField = "img_age"
profile.DataTextField = "img_sch"
profile.DataBind()
dtrWorks.Close()
conODBC.Close
End If
End Sub
</script>
<html>
<head>
<title> Trial Test</title></head>
<body>
<form id="form1" runat="server">
<table>
<tr>
<td>
<font size =11>
<asp:listbox autopostback="true" BackColor="#CCCCCC" Font-Name="Arial" Font-Size="10" ForeColor="#FFFFFF" id="linklist" Rows="3" runat="server" SelectionMode="single"></asp:listbox>
<br>
<asp:textBox id="Profile" readonly="true" dir="ltr" runat="server">
</asp:textBox>
</font>
</td>
</tr>
</table>
</form>
</body>
</html>
pardon the codes i cannot find the textbox to put the codes in.
Thanks