I have a problem that I'm stumped as to how to trouble shoot.
I have a "scan.aspx" page with a dropdownlist that's populated at page load with a list of student ID's. The focus is also set to this object on page load. On selectedindexchange, I'm firing code that inserts a record into a history...
Ahhh... I was declaring it as: "Dim dataReader As System.Data.IDataReader"
If I use "Dim dataReader As SqlDataReader" and "If dataReader.HasRows Then" it fixes my problem.
Like I said, I'm a n00b. :P
KizMar
------------
http://www.maximizetech.com
I'm having an issue with a data reader skipping the first returned record. I've double checked the SQL statment and I know it is actually skipping the first record.
I noticed that if I remove the "If dataReader.Read Then..." statement from around my data bind, it works, but then I can't set the...
When I did that I didn't see why it was firing it twice. I just figured it out though... with .NET 2003 I had to put "OnClick="btnUpdate_Click" in the button tag on the HTML side... evidently with .NET 2005 (ASP 2.0) you don't have to do that. When I removed the onclick event of the botton in...
By the way, it looks like it's firing all of the events like ..._Click and ...__SelectedIndexChanged twice. I have no clue why it's doing this.
KizMar
------------
http://www.maximizetech.com
I just converted a web app from .NET 2003 (ASP.NET / VB.NET) to .NET 2005. I'm noticing now that a couple events are firing twice now for no reason (they weren't doing this before I converted them).
I have no clue why they're firing twice, there's no code that would call the sub again, but it...
I've been working on this ASP.NET (2003) app for a couple weeks now, adding pages and such... today when I added a new web form and tried to view it using my IIS web service, it's giving me the following error:
The resource cannot be found.
Description: HTTP 404. The resource you are looking...
I need to search multiple (over 200) tables for information. At the moment I'm having to search through the tables until I find a certain column name, then I search that column for certain values.
Is there a way to shorten this process, or at least figure out which tables have this column? I...
I figured it out... there's two <form>'s in the aspx file. *DOH!!*
I will be modifying the VB based on some of the code you posted above though, thank you much!!
KizMar
------------
http://www.maximizetech.com
Here's the full code behind:
Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Data.SqlClient
Public Class serveMeal
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer...
Well it's trying to do something... I'm getting "Error: '__EVENTTARGET' is null or not an object". This only happens when I'm using the "AutoPostBack" option. If I'm not using autopostback, it doesn't appear to do anything.
Would IsPostBack effect this issue at all, or should I not even have to...
.NET really makes me feel stupid. I'm trying to make a simple form with one dropdown box, populated but data from a SQL server database.
The drop down is populating fine, but the OnSelectedIndexChanged event isn't working the way I would think it should.
Here's my aspx.vb:
<form...
This is driving me INSANE!!! I can't get .NET 2003 to stop re-formatting my HTML when I either view it in design view or run the project. It keeps re-tabbing everything and there's no rhyme or reason to it.
I've gone through all the options and don't see anything else to stop it from changing...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.