When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles [1.x] [2.0]
ASPFAQs.com
Message Board
Related Web Technologies
User Tips!
Coding Tips
Search

Sections:
Book Reviews
Sample Chapters
Commonly Asked Message Board Questions
Headlines from ASPWire.com
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Security
Stump the SQL Guru!
Web Hosts
XML Info
Information:
Advertise
Feedback
Author an Article
Technology Jobs



















internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers
ASP ASP.NET ASP FAQs Message Board Feedback ASP Jobs
Print this page.

WEB AND SOFTWARE APPLICATION DEVELOPER
CALIFORNIA STATE UNIVERSITY, LONG BEACH
US-CA-Long Beach

Justtechjobs.com Post A Job | Post A Resume

Published: Tuesday, March 16, 1999

Poor Man's IsNull
By Tim Sullivan


If all you want to see is if the variable is "blank", try using this nifty function instead of messing around with "IsNull".

- continued -

function PoorMansIsNull(str) Dim blankStr blankStr = trim("" & str) if blankStr = "" then PoorMansIsNull = True else PoorMansIsNull = False end if end function

The ("" & ) before the request variable forces VB to convert NULLS to blank strings. Maybe a little more overhead, but much easier to code and understand. You can use this nifty little function to determine if form fields are blank or not. For example, if you wanted to tell if the user entered his or her name in a field in a form, you could write the following code:

If PoorMansIsNull(Request("txtName")) then
	Response.Write("You didn't enter your name!")
else
	Response.Write("Thanks for entering your name.")
end if

Enjoy!


Windows Internet Technology | ASP.NET [1.x] [2.0] | ASPMessageboard.com | ASPFAQs.com | Advertise | Feedback | Author an Article

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers