Blank values

Results 1 to 3 of 3

Thread: Blank values

  1. #1

    Default Blank values

    Is there a way to force a blank value to an assigned request.form object? By this I mean...I have tried the following without any luck.<BR><BR>&#060;%if request.form("additional")="" then<BR>request.form("additional") = "No value"<BR>end if%&#062;<BR><BR>Obviously this is incorrect as it doesnt work. Any ideas?<BR><BR>Thanks,<BR>John

  2. #2
    Join Date
    Dec 1969

    Default RE: Blank values

    &#060;%<BR>dim thisvalue<BR>if request.form("additional")="" then <BR>thisvalue= "No value" <BR>else<BR>thisvalue=request.form("additional") <BR>end if<BR>%&#062; <BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default Or, slightly better...

    &#060;%<BR>thisvalue = Request("additional")<BR>If thisvalue = "" Then thisvalue = "No value"<BR>%&#062;<BR><BR>You only have to get the value by name from the recordset (a relatively expensive operation, since it has to do the by-name lookup) one time this way.<BR><BR>Rule: Any time you need to get a value by name from one of the various common components more than once, use a variable. That applies to<BR> Request("xxx")<BR> AnyRecordSet("yyy")<BR> SomeDictionary("www")<BR> Session("zzz")<BR> Application("aas")<BR> and probably more I didn&#039;t think of<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts