Tag: ASP.NET

Asp.NET html <button> element onclick and onserverclick -> client-side validation

Asp.NET html <button> element onclick and onserverclick -> client-side validation

The problem solved here is that an asp.net <button> element (html = <button runat=”server” > or <asp:HtmlButton )  doesn’t support a onclientclick event. This prevents performing client side validation ahead of the onserverclick event. Here’s more on the problem. http://stackoverflow.com/questions/1245033/asp-net-onserverclick-event-handler-not-called-if-using-onclick

Force IE out of compatibility mode

Force IE out of compatibility mode

Add this to within the <head> <meta http-equiv=”X-UA-Compatible” content=”IE=edge” /> This forces IE out of compatibility mode. IE will ignore compatibility mode settings from the ‘(F12) Developer Tools’ facility. Here’s some code that will allow testing. Done using ‘IE Tester’ http://www.my-debugbar.com/wiki/IETester/HomePage IE7 and IE8 will render this differently. IE8 in compatibility […]

Telerik ASP.NET MVC – Count the number of elements in a Combobox / DropDownList or AutoComplete UI component

Telerik ASP.NET MVC – Count the number of elements in a Combobox / DropDownList or AutoComplete UI component

Quick Answer

  Intro I had this desperately annoying problem where I had two Combobox components. Using the .CascadeTo functionality, I was able to have the second Combobox load data via an AJAX call based on the selection in the first Combobox. This is standard functionality detailed in the […]

.NET Web MVC 3 Multiple File upload limit

.NET Web MVC 3 Multiple File upload limit

There is a default limit on the file size (or total file size in the case of multiple files) of 4MB. To increase it, add (or modify) <httpRuntime maxRequestLength=”???” /> in Web.config where “???” is the number of kilo bytes to permit in any upload.