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.HtmlControl s.HtmlForm ' does not contain a definition for 'Action' and no extension method 'Action' accepting a first argument of type 'System.Web.UI.HtmlControl s.HtmlForm ' could be found
they both have asp.net 3.5 version, what can be the problem ?
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.HtmlControl
they both have asp.net 3.5 version, what can be the problem ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just out of interest, why are you setting the Action of the form, especially to what would appear to be its default value anyway?
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
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!