Friday, March 26, 2010

Project Management cum invocing system

This application is cool !

Mapping Enums to Strings and Strings to Enums in .NET

Came across this article on how to convert enums to string and vice versa in .net, which is pretty interesting to share.

'Clean' Sites

1. This site is very clean and 'light'
2. a lists of 'clean' site

jquery links

1. dialog box
2. validation

execellent icons site !!!

1. iconfinder
2. list of 'free' resources

Wednesday, March 24, 2010

Error Msg : No property or field 'xxxID' exists in type 'DataRowView'

If you hit this error when you are using radgrid with objectDataSource, please disable linqExpression by setting EnableLinqExpressions = "false" in the Radgrid properties.

Tuesday, March 23, 2010

telerik grid filtering feature

Telerik grid provide a good feature on filtering. There are two ways you can do filtering,

1. use out of the box filter feature by setting AllowFilteringByColumn="true"
2. set FilterExpression for grid.MasterTableView parameter with (iif(colName== null, \"\", colName).ToString().Contains(\"filterValue\"))

Monday, March 22, 2010

jquery toggle effect

To build the UI effect like this, we can extend from the below simple example. Use the 'green' code to hide/ show a section using a button. Use the 'orange' code to toggle the button orientation.

$("#buttonZone").click(function() {
$("#searchDiv").slideToggle(600);

});

$("#buttonZone").toggle(
function() {

$(this).removeClass("buttonZoneHide");
$(this).addClass("buttonZoneShow");

},
function() {

$(this).removeClass("buttonZoneShow");
$(this).addClass("buttonZoneHide");

});

how to access your asp.net controls in jquery.

$(document).ready(function() {
var id = " < % = chklstFilesAvailable.ClientID % > ";
var chklist = $("#" + id);
var btnId = " < % = btnDownload.ClientID % > ";
var button = $("#" + btnId);
//reusable show/hide button wiring
wireButtonShowToCheckListBox(chklist, button);
});

function wireButtonShowToCheckListBox(chklist, button) {
chklist.find('input:checkbox').each(function() {
var cb = $(this);
cb.click(function() {
var hit = false;
chklist.find('input:checkbox').each(function() {
var checked = $(this).attr('checked');
if (checked)
hit = true;
});
if (hit == true) {
button.show();
} else {
button.hide();
}
});
});

}

Refer to this article for more details

Friday, March 19, 2010

how to find out what caused the postback

if you are using ajax panel to ajaxify yr web page, you might notice that postback happen for any trigger happens within the ajax panel, this includes date selection in the calendar, button click event and etc.

you might want to find out which control causes the postback to do yr code handling.

the key is to use string control = Request.Form["__EVENTTARGET"]; in page_load event.

The [control] will be null during page load, if the postback is caused by button1, [control] will have the value of button1.

Checkout this artcile to find out more

Wednesday, March 10, 2010

how to execute javascript after ajax request is completed

If you are using the microsoft ajax framework, you might encounter a scenario where you need to execute javascript after your ajax call is completed.

The key is to add your javascript method using

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

put the javascript method that you need to execute in EndRequestHandler function.

Checkout this very useful post.

Saturday, March 6, 2010

power of jquery - 1

1.Checkout this amazing effect using jquery for your navigation

2.This article shows you the dynamic tabs using jquery

3. This article shows an alternative way to show validation error

4. Wizard like form filling experience

5. This article shows dropdown menu navigation using jquery

6. This article shows very good effect message box effect to show after you saved something

7. This article shows better UI experience by highlighting the row during data entry into the form.

Checkout all the jquery tutorial from Janko, you will be impressed.

Monday, March 1, 2010

CSS Message box 101

This article shows different permutation on message box using div


Look at the trick number 10 in this post, to highlight the navigation item of the user's location in the website, to help users orientate themselves.

tricky issue using profile in asp.net 3.5

This problem will take u at least one hour to figure out why the behaviour in asp.net 2.0 and asp.net 3.5 is different.

Checkout this article to use profile in asp.net 3.5.