Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 8th, 2007, 05:29 PM
Registered User
 
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default display no heading if null

Hi all,

I've got a problem where I want a statement to go like this...

if the value of the returned data is null, then display nothing, else display the data title and the data value.

here's the page i'm talking about

http://www.ceas.sunysb.edu/new/Conta...spx?PersonId=1

the field to look at is awards but i would like to have this statement work for all the field that are listed.

Thanks!
 
Old January 8th, 2007, 06:23 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

It would look something like this:

If TypeOf [value] Is DBNull then
//Do something
else
//Do Something else
End If

if (([value].GetType() == DBNull)) {
    // Do something
}
else {
    // Do Something else
}

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature





Similar Threads
Thread Thread Starter Forum Replies Last Post
'style.display' null or not an object sheel331 Javascript 5 May 7th, 2008 11:41 AM
display Null or Not an object error kishy449 Classic ASP Professional 1 September 4th, 2007 01:21 PM
Avoid null display ajaidass ADO.NET 2 January 17th, 2007 03:54 PM
Display all NULL columns hm_naveen Oracle 2 January 5th, 2007 09:50 AM
Display 0 currency as Null String echovue Access 5 August 11th, 2005 02:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.