Solved

Changing the page form action

Posted on 2009-06-30
4
1,276 Views
Last Modified: 2013-11-08
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 ?
0
Comment
Question by:elektrobrain
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
Haris V earned 250 total points
ID: 24752639
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

0
 
LVL 12

Expert Comment

by:Cyber-spy
ID: 24754064
Just out of interest, why are you setting the Action of the form, especially to what would appear to be its default value anyway?
0
 

Author Comment

by:elektrobrain
ID: 24754190
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
0
 
LVL 12

Expert Comment

by:Cyber-spy
ID: 24761317
That makes sense. Thanks - it's a useful tip!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now