Changing Query String values in ASP.NET MVC

Recently I was trying to update a query string by adding or updating a parameter for URLs generated in a partial view. I found an excellent example for achieving this by setting route data here however this didn’t preserve current query string values in the URL. I’ve extended upon that code and updated it to include the queryContinue reading Changing Query String values in ASP.NET MVC

Disabling an ASP.NET MVC input control

I love ASP.NET MVC. It is a great framework to get web apps quickly built. However using the built in HtmlHelper methods on your views isn’t without its issues. An example of this is when trying to disable a HTML input control which has been built using HtmlHelper. You can add the “disabled” attribute which would beContinue reading Disabling an ASP.NET MVC input control

Fixed/Sticky Headers on ASP.NET GridView using jQuery

The GridView control in ASP.NET Web Forms is an extremely useful and quick way of getting data out to the user in a nice tabular format. It does have one weak spot though and that is some of the tags it uses when doing this. Specifically, not putting the header information inside a <thead> tag.Continue reading Fixed/Sticky Headers on ASP.NET GridView using jQuery

Strongly Typed Data in ASP .NET Web Forms

In ASP .NET Web Forms you’ve previously had to use strings to specify which properties you’d like to output when databinding, which would probably end up looking something like the following. In all likelihood it could probably look far less tidy if you’ve ever needed to do any formatting on values you’re about to outputContinue reading Strongly Typed Data in ASP .NET Web Forms

Install WPScan on Ubuntu 13.10

Prerequisites Since Ubuntu 13.10 doesn’t come set up for development work out of the box there are a few things you need to download and install first. Thankfully this is made easy by apt-get by just running the following command to get everything ready. sudo apt-get install libcurl4-gnutls-dev libopenssl-ruby libxml2 libxml2-dev libxslt1-dev ruby-dev build-essential gitContinue reading Install WPScan on Ubuntu 13.10

Send E-mail through Microsoft Exchange using .NET

Recently I needed to send an e-mail using Microsoft Exchange Server from an ASP .NET Web App. My first attempt involved using the classes in the System.Net.Mail namespace however I quickly realised this wasn’t the way to be going about it as I had very little luck getting a connection to the server. After a whileContinue reading Send E-mail through Microsoft Exchange using .NET

Using a RequiredFieldValidator on a DropDownList in ASP .NET

In most applications today drop-down lists default to a “Please select..” option with some form of validation to ensure the user makes their own selection. In ASP .NET web forms this frequently results in a drop-down list being created using code similar to that displayed below. We can add an ASP .NET RequiredFieldValidator and setContinue reading Using a RequiredFieldValidator on a DropDownList in ASP .NET

How to allow HTML content in ASP .NET MVC

Sometimes in web development, you need to provide an easy-to-use editor for non-technical users to input or change content where extra styling is required such as making text bold or italic. However unless you use (or code yourself) an editor which uses some form of BBCode you’re going to come across the following error message if you’re usingContinue reading How to allow HTML content in ASP .NET MVC