•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 397,590 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,949 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 8124 | Replies: 3
![]() |
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?
pardon the codes i cannot find the textbox to put the codes in.
Thanks
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
Re: An unhandled exception occurred during the execution of the current web request.
#2
Jul 8th, 2005
Well first off you close the dtrworks and then call it two lines later. And you dim profile as nothing?
profile.DataBind()
... dtrWorks.Close() Dim profile profile.DataSource = dtrworks profile.DataTextField = "img_name" profile.DataTextField = "img_age" profile.DataTextField = "img_sch"
profile.DataBind()
Assistant Manager, Regional Pharmacy Information Systems
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
Re: An unhandled exception occurred during the execution of the current web request.
#3
Jul 8th, 2005
Re: An unhandled exception occurred during the execution of the current web request.
#4
Jul 8th, 2005
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
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
•
•
•
•
Originally Posted by ozeona
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?
Assistant Manager, Regional Pharmacy Information Systems
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
advertising ajax asp blog browser browsing community data design development devices dom domains feed firefox google html india intel internet legal linux marketing microsoft mobile applications mozilla multimedia news office php privacy reader report research search security software sql sun video w3c weather web web development wiki xml xoap yahoo youtube
- Request for the permission of type 'System.Web.AspNetHostingPermission' [...] failed. (ASP.NET)
- web form not working please help (ASP.NET)
- 'Object variable or With block variable not set' Error (ASP.NET)
- Prblem with sql sever connection (ASP.NET)
- help connecting a form to a database.. error message (ASP.NET)
- ADO.NET Specified cast is not valid (ASP.NET)
- loads htm but not aspx (ASP.NET)
- Create Windows Authentication (VB.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: how to invoke postback
- Next Thread: <@ import Namespace "MathService"> , or was not found.


Linear Mode