display all fields in form except...

Discussion in 'C#' started by sdsvtdriver, Jan 7, 2007.

  1. #1
    Hi Gurus,

    This must be a simple thing to do, however I'm new to ASP.

    basically, I have a mail script that sends the results of a form filled out by a user to an email address.

    after the form is submitted, the asp displays a summary of the information provided. I like that, however I want one item from the form to either not be displayed, or be masked (it will be confidential #).

    the summary is created by:

    what is the proper format to say 'for each name in fieldorder except <name of excluded field>'?
     
    sdsvtdriver, Jan 7, 2007 IP
  2. kajakske

    kajakske Well-Known Member

    Messages:
    139
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    165
    #2
    <% for each name in fieldOrder %>
    <% if name <> "PUTNAMEOFFIELDHERE" then %>
    <tr valign="top">
    <td><b><% = name %></b></td>
    <td><% = Request.Form(name) %></td>
    </tr>
    <% end if %>​
    <% next %>
     
    kajakske, Jan 8, 2007 IP