About Dan

  • Website: or email
  • Biography:

Posts by Dan:

 
0

Enabling or disabling a validator control in javascript

On July 21, 2011 in Development, Tutorials

Recently I had to have a form that had a requiredfieldvalidator that was supposed to validate only on certain conditions. I did not want the validator to validate its control (textbox B) unless textbox A had a value in it. I decided the best way to do this was to capture the keyup event of textbox A and if there was a value in the textbox, to turn the validator for textbox B on. To do that via javascript, you have to utilize the asp.net built in javascript function ValidatorEnable.

<script type="text/javascript">
    var makeEnabled = true;
    var validatorControl = document.getElementById('<%= RequiredFieldValidator1.ClientID %>');
    ValidatorEnable(validatorControl, makeEnabled);
</script>

Tags: , , ,

 
0

Budapest Table Sorting Plugin

On June 18, 2011 in Tutorials

Budapest is a jQuery plugin that allows for simple table sorting. It allows the developer to have full control over the sorting. Basic usage: $("table").budapest(); Advanced usage: $("table").budapest({ headers: { 0: { sortable: true}, 1: { sortable: true}, 2: { sortable: true} }, sortIndex: 2, sortDirection: "asc", onSort: function(index, val1, val2, direction){ //provide your own [...]

 
0

Create an ical file in ASP.NET MVC

On March 15, 2011 in Development

I recently had to write some code that generates an ical file and sends it to the browser. I decided to utilize the awesomeness that is asp.net mvc and try it like that. Following the information I got from reading Stephen Walther’s blog entry on using MVC to generate files to download, I started by [...]

Copyright © 2010-2012 Dan Appleyard All rights reserved.
Desk Mess Mirrored version 1.9 theme from BuyNowShop.com.

Load Times Plugin made by Cheap Web Hosting