Monday, August 26, 2013

Hide custom errors asp net

<configuration>
    .......
    <system.web> 
        ......
        <customErrors mode="Off"/>
    </system.web>
</configuration>
 
Note: "mode values are case sensitive" 

jQuery how to check html input checkbox state

$("input[type=checkbox]").change(function () {
     var isChecked = this.checked;
     if (isChecked) {
          //rest goes here
     }
});

How to check if a string is null or empty (length 0) sql server

First convert empty value to null using "nullif" then use "isnull" to switch
SELECT Isnull(NULLIF(string1, ''), string2) AS String .......