More than one form.

Discussion in 'ASP General' started by CK, Oct 21, 2004.

  1. CK

    CK Guest

    Hi All,
    I encounter one problem with my asp scrits. In my HTML file, I
    have two forms. Which is <form name="form1".....> </form> and <form name =
    "form2...> and using Post Method.
    When I use the request.form in my asp script. How i can trace the
    value from form 1 and form 2. Please advice. Thanks.

    Regards,
    C.K.
     
    CK, Oct 21, 2004
    #1
    1. Advertising

  2. Have a hidden variable in both, give different values. On your posted page,
    check for this value

    <form name="form1" action="some.asp">
    <input type=hidden name=formName value=form1>


    <form name="form2" action="some.asp">
    <input type=hidden name=formName value=form2>


    On the some.asp

    <%
    If Request.Form("formName") = "form1" Then
    .. do something
    ElseIf Request.Form("formName") = "form2" Then
    .. do something else
    End if
    %>

    --
    Manohar Kamath
    Editor, .netWire
    www.dotnetwire.com


    "CK" <> wrote in message
    news:...
    > Hi All,
    > I encounter one problem with my asp scrits. In my HTML file, I
    > have two forms. Which is <form name="form1".....> </form> and <form name =
    > "form2...> and using Post Method.
    > When I use the request.form in my asp script. How i can trace the
    > value from form 1 and form 2. Please advice. Thanks.
    >
    > Regards,
    > C.K.
    >
    >
    >
    >
     
    Manohar Kamath, Oct 21, 2004
    #2
    1. Advertising

  3. CK

    CK Guest

    Thanks for your help. :)

    Regards,
    C.K.

    "Manohar Kamath" <> wrote in message
    news:...
    > Have a hidden variable in both, give different values. On your posted

    page,
    > check for this value
    >
    > <form name="form1" action="some.asp">
    > <input type=hidden name=formName value=form1>
    >
    >
    > <form name="form2" action="some.asp">
    > <input type=hidden name=formName value=form2>
    >
    >
    > On the some.asp
    >
    > <%
    > If Request.Form("formName") = "form1" Then
    > .. do something
    > ElseIf Request.Form("formName") = "form2" Then
    > .. do something else
    > End if
    > %>
    >
    > --
    > Manohar Kamath
    > Editor, .netWire
    > www.dotnetwire.com
    >
    >
    > "CK" <> wrote in message
    > news:...
    > > Hi All,
    > > I encounter one problem with my asp scrits. In my HTML file, I
    > > have two forms. Which is <form name="form1".....> </form> and <form name

    =
    > > "form2...> and using Post Method.
    > > When I use the request.form in my asp script. How i can trace

    the
    > > value from form 1 and form 2. Please advice. Thanks.
    > >
    > > Regards,
    > > C.K.
    > >
    > >
    > >
    > >

    >
    >
     
    CK, Oct 21, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alan Silver
    Replies:
    4
    Views:
    524
    Alan Silver
    Jul 3, 2005
  2. Merciadri Luca
    Replies:
    4
    Views:
    834
  3. Bob Rashkin
    Replies:
    5
    Views:
    85
    Dennis Lee Bieber
    Dec 23, 2013
  4. Steven D'Aprano
    Replies:
    0
    Views:
    116
    Steven D'Aprano
    Dec 23, 2013
  5. Replies:
    3
    Views:
    98
    Gary Herron
    Dec 23, 2013
Loading...

Share This Page