Link to home
Start Free TrialLog in
Avatar of elektrobrain
elektrobrain

asked on

Changing the page form action

Hey, in my vs 2008 i am able to do:
this.Page.Form.Action = Request.RawUrl;
no error appears, and it's working.
then ive got with my project to another computer
at my office, and suddenly the ide says he can't find it:
'System.Web.UI.HtmlControls.HtmlForm' does not contain a definition for 'Action' and no extension method 'Action' accepting a first argument of type 'System.Web.UI.HtmlControls.HtmlForm' could be found
they both have asp.net 3.5 version, what can be the problem ?
ASKER CERTIFIED SOLUTION
Avatar of Haris V
Haris V
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Just out of interest, why are you setting the Action of the form, especially to what would appear to be its default value anyway?
Avatar of elektrobrain
elektrobrain

ASKER

No it's not default. let me explain. when you using url rewriting
like www.mydomain.com/movies/terminator3.html instead of
www.mydomain.com/movies.aspx?movieid=231
the postback returns to the
original address, and by setting the postback to the raw url i can promise that the postback
will be back to the new rewrited url
That makes sense. Thanks - it's a useful tip!