Solved

Changing the page form action

Posted on 2009-06-30
4
1,287 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Upgrading my SSIS package in VS 2012 6 89
What are the simplest ways to create a Merge Sort? 3 37
Finding the IIS version 5 38
abstract class C# 1 38
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…

726 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