Once page is transferred the form action is wrong

Discussion in 'ASP .Net' started by willwork4dsl, Feb 3, 2004.

  1. willwork4dsl

    willwork4dsl Guest

    When implementing the Front Controller, you use Server.Transfer to
    halt execution on the "imaginary" page and transfer to the "actual"
    page. Thereby abstracting the url from the resource.

    The problem I'm running up against is that when I transfer to the
    "actual" page the action on the form is now set to the "actual" page
    (like it should). So, all future postbacks go to the "actual" page
    instead of the "imaginary". So I loose my beautiful abstraction
    layer...

    Any ideas on how I can resolve this. I just need to change the action
    to the "imaginary" path.

    "thanks" for "listening"
     
    willwork4dsl, Feb 3, 2004
    #1
    1. Advertising

  2. willwork4dsl

    Tommy Guest

    Inject the following javascript at the end of the page. This will
    change the action property of the form

    <script language="javascript">
    Form1.action = "ImaginaryPage.aspx";
    </script>

    Tommy,

    (willwork4dsl) wrote in message news:<>...
    > When implementing the Front Controller, you use Server.Transfer to
    > halt execution on the "imaginary" page and transfer to the "actual"
    > page. Thereby abstracting the url from the resource.
    >
    > The problem I'm running up against is that when I transfer to the
    > "actual" page the action on the form is now set to the "actual" page
    > (like it should). So, all future postbacks go to the "actual" page
    > instead of the "imaginary". So I loose my beautiful abstraction
    > layer...
    >
    > Any ideas on how I can resolve this. I just need to change the action
    > to the "imaginary" path.
    >
    > "thanks" for "listening"
     
    Tommy, Feb 4, 2004
    #2
    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. Joe Bloggs
    Replies:
    1
    Views:
    929
    Sudsy
    Aug 3, 2003
  2. Chapman
    Replies:
    3
    Views:
    1,103
    Gordon Beaton
    Sep 16, 2003
  3. Jeff
    Replies:
    2
    Views:
    435
    Alexey Smirnov
    Apr 3, 2009
  4. Dario Beraldi

    SFTP: max bytes to be transferred

    Dario Beraldi, Dec 1, 2010, in forum: Python
    Replies:
    0
    Views:
    329
    Dario Beraldi
    Dec 1, 2010
  5. Replies:
    0
    Views:
    719
Loading...

Share This Page