cpaul
-
4/15/2005 11:57:13 PM
Postbacks on url-rewritten pages
I had a shopping cart control on a page, and whenever it would postback, the URL would change to the true URL, which I thought was confusing for the end user. I'd like the same URL to be visible after completing the postback.
I couldn't find anything in the docs, and didn't want to mess around with manually rewriting the URLs and step on the UrlRewriter's feet, so I used javascript to change the form action (something I'm not fond of having to do).
<SCRIPT> function makeFriendlyAction() { var form = document.forms["form1"]; form.action = '<%=ResolveUrl("~"+OpenBio.Web.App.Website.Functions.GetAliasPath()+"/default.aspx")%>'; } </SCRIPT> <body bgColor="white" onload="makeFriendlyAction()">
And this works as expected, but is there a cleaner way to do this?
|