Wednesday, December 10, 2008

Check box list validation

The following javascript will validate that atleast one checkbox is checked in a checkboxlist . And if a checkbox named 'other' is checked , it will check that a textbox that is next to it is not empty .


How to get the domainname of an ASP.Net application

If the application URL is something like www.myDomain.com/home/homepage.aspx , to get the http://www.mydomain.com/ part from it , we can use the following
(1)HttpContext.Current.Request.Url.Scheme+"://"+ HttpContext.Current.Request.Url.DnsSafeHost
or
(2)HttpContext.Current.Request.Url.Scheme+"://"+ HttpContext.Current.Request.Url.Host

Tuesday, December 9, 2008

My first post...

As developers we come accross many issues while coding . I was thinking of writing down some of the solutions that I came accross , as blog entries so that it might help others who face the same kind of issues.
Better late than never ;) ..