Once page is transferred the form action is wrong

  • Thread starter Thread starter willwork4dsl
  • Start date Start date
W

willwork4dsl

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"
 
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,
 
Back
Top