Form Field Filled?

Results 1 to 2 of 2

Thread: Form Field Filled?

  1. #1
    polarbear Guest

    Default Form Field Filled?

    Hi,<BR><BR>When coding an ASP page, I will like to know if a text field in a form has been filled in since some fields on the form itself are marked optional. How do I check for it? I understand that the code below will produce an error message if the text field with the name &#039address&#039 is not filled in.<BR><BR>If (Response.Form("address") = "") Then<BR> .....<BR>End If<BR><BR>Please advice. Thanks.

  2. #2
    Join Date
    Dec 1969

    Default RE: Form Field Filled?

    Response.Form does not exist so i&#039ll assume you meant Request.Form. I would use something like:<BR><BR>If Request("address") &#060;&#062; "" then<BR> &#039do something with it<BR>End If<BR><BR>... the &#039.Form&#039 is optional unless you want to make sure you&#039re only grabbing an item off of the form.<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