how to set a form's "action" property

Discussion in 'ASP .Net Web Controls' started by François Ligouy, Nov 2, 2004.

  1. Although on page WebForm1.aspx I set the action property of the form to
    WebForm2.aspx, strangely enough, at runtime, when one navigates to
    WebForm1.aspx, its action property proves to be Webform1.aspx instead.
    Is this a normal ASP.NET behavior?
    François Ligouy, Nov 2, 2004
    #1
    1. Advertising

  2. Salut François,

    That is normal behaviour because an ASP.NET form always posts back to
    itself.

    There are workarounds like the one here:

    http://aspalliance.com/articleViewer.aspx?aId=132&pId=


    "François Ligouy" <> wrote in message
    news:O%...
    > Although on page WebForm1.aspx I set the action property of the form to
    > WebForm2.aspx, strangely enough, at runtime, when one navigates to
    > WebForm1.aspx, its action property proves to be Webform1.aspx instead.
    > Is this a normal ASP.NET behavior?
    >
    Ken Cox [Microsoft MVP], Nov 2, 2004
    #2
    1. Advertising

  3. Hi Ken,

    Thanks for your quick answer; although it fits my observations, it's good to
    see it clearly written down.
    Thank you as well for the link.

    "Ken Cox [Microsoft MVP]" <> a écrit dans le
    message de news: ...
    > Salut François,
    >
    > That is normal behaviour because an ASP.NET form always posts back to
    > itself.
    >
    > There are workarounds like the one here:
    >
    > http://aspalliance.com/articleViewer.aspx?aId=132&pId=
    >
    >
    > "François Ligouy" <> wrote in message
    > news:O%...
    >> Although on page WebForm1.aspx I set the action property of the form to
    >> WebForm2.aspx, strangely enough, at runtime, when one navigates to
    >> WebForm1.aspx, its action property proves to be Webform1.aspx instead.
    >> Is this a normal ASP.NET behavior?
    >>

    >
    François Ligouy, Nov 3, 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. Peter Afonin

    How to assign Action property to the Form

    Peter Afonin, Sep 13, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    619
    Peter Afonin
    Sep 14, 2004
  2. Joe Bloggs
    Replies:
    1
    Views:
    743
    Sudsy
    Aug 3, 2003
  3. John
    Replies:
    0
    Views:
    859
  4. Peter Afonin

    How to assign Action property to the Form

    Peter Afonin, Sep 13, 2004, in forum: ASP .Net Web Controls
    Replies:
    7
    Views:
    135
    Eliyahu Goldin
    Sep 19, 2004
  5. Bosconian
    Replies:
    4
    Views:
    398
    Bosconian
    Dec 3, 2006
Loading...

Share This Page