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

Recommended Answers

All 3 Replies

Well first off you close the dtrworks and then call it two lines later. And you dim profile as nothing?

...
dtrWorks.Close()

Dim profile
profile.DataSource = dtrworks
profile.DataTextField = "img_name"
profile.DataTextField = "img_age"
profile.DataTextField = "img_sch"

profile.DataBind()

hm.. yea... looks like im doing it in a java way.

btw, is there a way to click on the itemlist den other info from the database (including text and flash file links) to display on the same page?

Yes.

If it is in the DB, you can display it in ASP.Net. How you want to, is up to you.

Logic and programmatic pseudo-code it to determine when you want to fire a particular event to display and how you want to display it.

Good Luck

hm.. yea... looks like im doing it in a java way.

btw, is there a way to click on the itemlist den other info from the database (including text and flash file links) to display on the same page?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.