I am passing form fields to an ASP page via post from a HTML page. The form on the HTML page is huge and contains about 100 form fields. I want to iterate through the form fields via ASP ONLY retreiving the fields that contain actual values. Below is my code, which currently retreives ALL form fields from the passed HTML form (except for name, preview.x, and preview.y). <% 'iterate through each form field from passed html form, exclude specific fields shown below Dim fldName For Each fldName in Request.Form if (fldName <> "preview.x") AND (fldName <> "preview.y") AND (fldName <> "name") AND _ (fldName <> "ext") AND (fldName <> "dept") AND (fldName <> "date") then Response.Write fldName & ": " & _ Request.Form(fldName) & "<br />" end if Next %> Thanks very much!
Try ... if len(Request.Form(fldName)) > 0 then Response.Write fldName & ": " & _ Request.Form(fldName) & "<br />" end if ...