Dropdownlist control with s for asp.net (webforms)?

I’ve used the standard control in the past, and just added a simple ControlAdapter for it that would override the default behavior so it could render <optgroup>s in certain places. This works great even if you have controls that don’t need the special behavior, because the additional feature doesn’t get in the way. Note that … Read more

ASP.NET Web Forms and ASP.NET Web Pages

There are three flavors of ASP.NET Full and there is also ASP.NET Core (the new one that works on Linux and Mac). For ASP.NET Full The first one is the oldest and is called Web Forms. Basically it is a high-level component-oriented web framework that works with controls like buttons and grids that encapsulate behaviour … Read more

Disable form submission via Enter key on only _some fields

You can capture and cancel the enter keypress on those fields like this: $(‘.noEnterSubmit’).keypress(function(e){ if ( e.which == 13 ) return false; //or… if ( e.which == 13 ) e.preventDefault(); }); Then on your inputs just give them a class=”noEnterSubmit” 🙂 Looking ahead in case others find this later, in jQuery 1.4.3 (not out yet) … Read more

How can I implement Ninject or DI on asp.net Web Forms?

Here are the steps to use Ninject with WebForms. Step1 – Downloads There are two downloads required – Ninject-2.0.0.0-release-net-3.5 and the WebForm extensions Ninject.Web_1.0.0.0_With.log4net (there is an NLog alternative). The following files need to be referenced in the web application: Ninject.dll, Ninject.Web.dll, Ninject.Extensions.Logging.dll and Ninject.Extensions.Logging.Log4net.dll. Step 2 – Global.asax The Global class needs to derive … Read more

How is mime type of an uploaded file determined by browser?

Chrome Chrome (version 38 as of writing) has 3 ways to determine the MIME type and does so in a certain order. The snippet below is from file src/net/base/mime_util.cc, method MimeUtil::GetMimeTypeFromExtensionHelper. // We implement the same algorithm as Mozilla for mapping a file extension to // a mime type. That is, we first check a … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)