HtmlForm.Action and .Net Framework 2.0/3.5 Query

Posted by Brian on Stack Overflow See other posts from Stack Overflow or by Brian
Published on 2009-06-10T15:39:11Z Indexed on 2010/03/13 4:07 UTC
Read the original article Hit count: 574

Filed under:
|
|
|

Disappointingly, the members page for HtmlForm 2.0 is missing...

My research seems to indicate that HtmlForm.Action is a property that was added in .Net Framework 3.5. However, I'm using VS2005 and my reference to System.Web (the namespace HtmlForm is under) is to a .Net Framework 2.0 runtime version.

Further, my IIS status information also indicates I am using .Net Framework 2.0, when I force an error on my local IIS and read it. Despite this, I am able to use form1.Action successfully...but only on my local IIS.

When I try it on vms and external servers, I get [MissingMethodException: Method not found: 'System.String System.Web.UI.HtmlControls.HtmlForm.get_Action()'.] errors.

So, my question:

1) Why does it work on my local IIS? Does the fact that I have the 3.5 framework installed make a difference, here?
2) Why does it not work on other IIS? (I think this is because it's not part of .Net 2.0).

I guess I just figure that if something is running on .Net Framework 2.0, the presence of 3.5 should not make a difference. Or maybe there's some other cause for these results.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about c#