Method ‘get_EnableCdn’ in type ‘System.Web.UI.ScriptManager’ from assembly ‘System.Web.Extensions’ does not have an implementation

I have seen this error in a web application that was upgraded from a Visual Studio 2005 project to a Visual Studio 2010 project. The solution was to remove the following section from the web.config file: <runtime> <assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″> <dependentAssembly> <assemblyIdentity name=”System.Web.Extensions” publicKeyToken=”31bf3856ad364e35″/> <bindingRedirect oldVersion=”1.0.0.0-1.1.0.0″ newVersion=”3.5.0.0″/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name=”System.Web.Extensions.Design” publicKeyToken=”31bf3856ad364e35″/> <bindingRedirect oldVersion=”1.0.0.0-1.1.0.0″ newVersion=”3.5.0.0″/> </dependentAssembly> … Read more

How to post ASP.NET MVC Ajax form using JavaScript rather than submit button

I’m going to assume that your lack of quotes around the selector is just a transcription error, but you should check it anyway. Also, I don’t see where you are actually giving the form an id. Usually you do this with the htmlAttributes parameter. I don’t see you using the signature that has it. Again, … Read more

Disable asp.net button after click to prevent double clicking

Here is a solution that works for the asp.net button object. On the front end, add these attributes to your asp:Button definition: <asp:Button … OnClientClick=”this.disabled=true;” UseSubmitBehavior=”false” /> In the back end, in the click event handler method call, add this code to the end (preferably in a finally block) myButton.Enabled = true;

Are MicrosoftAjax.js, MicrosoftMvcAjax.js and MicrosoftMvcValidation.js obsolete as of ASP.NET MVC 3?

Yes, all Microsoft* helpers are obsolete in ASP.NET MVC 3. For me they have always been obsolete but now at least Microsoft made this official and replaced them with jQuery. 2 new functionalities have been introduced <appSettings> <add key=”webpages:Version” value=”1.0.0.0″/> <add key=”ClientValidationEnabled” value=”true”/> <add key=”UnobtrusiveJavaScriptEnabled” value=”true”/> </appSettings> The first is UnobtrusiveJavaScriptEnabled. This means that if … Read more

Sys is undefined

I fixed my problem by moving the <script type=”text/javascript”></script> block containing the Sys.* calls lower down (to the last item before the close of the body’s <asp:Content/> section) in the HTML on the page. I originally had my the script block in the HEAD <asp:Content/> section of my page. I was working inside a page … Read more

How to have a javascript callback executed after an update panel postback?

Instead of putting your jQuery code inside of $(document).ready(), put it inside function pageLoad(sender, args) { … } pageLoad is executed after every postback, synchronous or asynchronous. pageLoad is a reserved function name in ASP.NET AJAX that is for this purpose. $(document).ready() on the other hand, is executed only once, when the DOM is initially … Read more