Front end users are free to upload images of any size, However for uniformity its often necessary to resize these images to a standard width and height but still maintaining the aspect ratio. The following function is what I use to to resize an image dynamically. The file thus returned can then be renamed and […]
Disallow Model to retain its state in MVC 3
By default when a page is posted back in MVC3 it retains the form values. so on redisplay of the same page, we find the values are retained. In case this need to be disallowed the following can be used so the model does not retain its state. ModelState.Clear(); It can also be used […]
Avoid Redirect to Login Page
Cross Domain Ajax using jQuery
Setting IIS ASP.net site to work with https only and not http
Recently we had installed a SSL certificate on one of our sites and the requests with https were being served perfectly as expected, however it was noticed that the pages were still being served perfectly even when an http request was made instead of https. This to an extent was defeating the purpose of having a certificate in place to serve secured content.
Visual Studio 2010 intellisense autofill
I have been facing a problem with Visual studio 2010’s intellisense. Firstly it didn’t show any intellisense options until I hit a Cntl+space and when I fixed that the auto fill would not complete until you manually select the required option from the intellisense list.