Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting a form's action in .net 3.5 SP1 causes errors when compiled

I have recently installed .net 3.5 SP1. When I deployed a compiled web site that contained a form with its action set:

<form id="theForm" runat="server" action="post.aspx">

I received this error.
Method not found: 'Void System.Web.UI.HtmlControls.HtmlForm.set_Action(System.String)'.
If a fellow developer who has not installed SP1 deploys the compiled site it works fine. Does anyone know of any solutions for this?

like image 202
Skippy Avatar asked Aug 29 '08 17:08

Skippy


1 Answers

.NET 3.5 SP1 tries to use the action="" attribute (.NET 3.5 RTM did not). So, when you deploy, your code is attempting to set the HtmlForm.Action property and failing, as the System.Web.dll on the deploy target is RTM and does not have a setter on the property.

like image 143
Tom Mayfield Avatar answered Oct 11 '22 14:10

Tom Mayfield