• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1300
  • Last Modified:

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 ?
  • 2
1 Solution
Haris VCommented:
It turned out that the hosting service was not running SP1 for ASP.NET .

 They moved my web application to a server with SP1 and it all works

please check this link,
1. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=361981

AdamSenior DeveloperCommented:
Just out of interest, why are you setting the Action of the form, especially to what would appear to be its default value anyway?
elektrobrainAuthor Commented:
No it's not default. let me explain. when you using url rewriting
like www.mydomain.com/movies/terminator3.html instead of
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
AdamSenior DeveloperCommented:
That makes sense. Thanks - it's a useful tip!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now