BoulderBum,
Yes, I know that we're talking microseconds, which is why I said "I doubt I need to worry about the speed of the application"...but I still avoid writing loops when they are not needed...especially loops within loops, which is what that is.
If the switch had been the easiest...
Sirius,
In truth, with PHP, I can always use empty($var) or isset($var) and get a true/false from that the "correct" way without using @. I almost never use @. The point is that I CAN. Yes, someone who wants to do bad programming can use @ all over the place, use autoglobals and open the...
I probably won't go back to the drawing board on this project when it comes to how I read the data, but if I do any future .NET projects, I'll make sure to try out the DataSet to see if I can get away with undefined indexes.
Mostly, though, my question was not as much about possible solutions...
Hey eggy,
Yes, that code is in C#...if you're using C#, then "this" should always be defined even if it doesn't give you access to this.User...because everything is within classes in .NET...However, I know next to nothing about VB, though, so if it's VB, I don't know what you'd put there...
Hey SiriusBlackOp,
Sorry for the confusion...oRset is an IDataReader. The name is a result of habit from old ASP, and that name has simply stuck with me as I always think of them as record-sets regardless of what type of object it is. I should probably just call it oData, but old habits die...
Not sure if this is what you are looking for...I copied most of the below from an excerpt from "The Beer House" which is an ASP.NET 2.0 project associated with a book.
Anyway, in order to keep users from accessing pages they shouldn't...in the Page_Load of each page that you need to control...
The are too many freaking data types in .NET.
Anyway, Array.Exists looks like it's only to find values, not an index...so SOL there...and probably wouldn't have worked anyway since the IDataReader isn't just an array, but some other type of collection of who knows what data type (or at least I...
Before I even messed with try/catch, I tried doing:
if( oRset["subscrID"] != null && oRset["subscrID"] != DBNull.Value ) {
// execute code
}
For everything else I've done in C#, .NET, testing a variable against null in an if statement almost always bypassed the error. However, for some...
Okay, in my database, users have a many-to-many relationship with the mailing list categories, so that each user can pick any number of categories that they want to receive Newsletters on. When viewing the list of categories that they can select, I do an OUTER JOIN in my SQL query so that I can...
you should be able to generate the data directly after submitting to the database...all on the same page:
=> User submits confirmation
--next page
=> Gather data and submit to database, then use the same variables--that you just used to submit to the database--to create your confirmation...
The document.getElementsByTagName("TD") returns an array of tags, not a single property...so you can't use the style attribute on that alone...you have to loop through all the TD tags:
function changeSize() {
var arrTDTags = document.getElementsByTagName("td")...
Having a window AlwaysRaised requires a "signed script"...the user gets a dialog box confirming that they want to allow it...
Check out:
http://developer.netscape.com/viewsource/goodman_sscripts.html
What other code are you executing on your page, because if it's popping back to the top of the page, it sounds like you are "submitting" the page and it's refreshing.
if you have a submit button, and you are clicking that, then the form will submit unless you are returning false to...
At first it looked like you forgot to identify where you were in the array with the [i], but that's the TGML. Anyway...
I've never messed with this before, so I'm not sure of the distinction between the anchors array and the links array...they are both valid arrays. However, the anchors array...
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.