Friday, November 20, 2015

IE11 compatibility mode off doPostBack and PageRequestManager undefined

There seem to be a bug in the browser definition files that came with .NET 2.0 and .NET 4.

This issue can be fixed by installing following hot fix for .net framework 4.0.

If you are deploying the application this should be installed in the machine where the application is deployed.


Wednesday, November 18, 2015

SQL Search

Searching for a specific text used in SQL objects can be made easy with the use of Redgate's SQL Search.

Even though SQL server provides queries for finding texts or columns this tool provides you much more flexibility.

Read following link for more information and download.


Friday, October 30, 2015

Detect IE compatibility mode and version using JavaScript

Even though it is not recommended, following Javascript can be used to detect the IE compatibility mode.

// Create new object

var ieUserAgent = {
init: function () {
var ua = navigator.userAgent;
this.compatibilityMode = false;

    if(ua.indexOf("MSIE") == -1){
        this.version = 0;
        return 0;

    if(ua.indexOf("compatible") == -1){
        this.compatibilityMode = false;
        return 0;

        this.compatibilityMode = true;
        return 0;

// Initialize the ieUserAgent object

Read this thread for more details of the script.


Thursday, September 10, 2015

Scroll to a specified target using jQuery

There may be situations where you need to scroll a page or element to a specified target. jQuery provides .scrollTo() method to achieve the desired functionality.

This method is built in from jQuery v 1.9.X. If you want to use it in an earlier version of jQuery, you can use an extension method.

Read here for more information.


Friday, August 14, 2015

Remove all HTML Tags in text

There mey be situations where you need to remove all the HTML tags in a text. You can use Javascript Regex to to achove the desired result as displayed below.

<script type="text/javascript">
function replacetags(){
var html = /(<([^>]+)>)/gi;
for (i=0; i < arguments.length; i++)
arguments[i].value=arguments[i].value.replace(html, "")
       <form name="form1">
<textarea class="comment"  name="comments" id ="comments"  rows=5 cols=50></textarea><br>
<input type="button" value="Remove Tags" onClick="replacetags(this.form.comments)">

Monday, July 20, 2015

Visual Studio 2015 Relased

Microsoft finally released VS 2015 on July 20th. It has exiting new features including

  • Live code analysis (Light Bulbs),
  • Cross-platform debugging support, 
  • Visual Studio Graphics Diagnostics ,
  • Universal Windows apps for any Windows 10 device,
  • Cross-platform mobile games in C# with Unity and many more

Reade more and download


Wednesday, June 24, 2015

ASP.Net load Browser specific CSS

When developing Webpages you might have come across browser specific styling issues.
When dealing with IE related CSS issues conditional statements can be used as displayed below.

< !--[if IE]>
    <link rel="stylesheet" type="text/css" 
href="ie-specific.css" />
There will be situations where you will want to
target on different browser.
 E.g. Chrome, firefox
The code given below can be used to check the
browser type and load the 
CSS programatically.

 Dim Browser As HttpBrowserCapabilities = Request.Browser
        'Attach a CSS style sheet accordingly  
 Dim cs As ClientScriptManager = Nothing

If Browser.Type.StartsWith("IE") Then 'Target All IE
     cs = Page.ClientScript
     cs.RegisterClientScriptBlock(Me.GetType(), "CSSLink", "")
ElseIf Browser.Type = "Firefox" Then 'Actual version of the
                                 ' browser can be specified
     cs = Page.ClientScript
    cs.RegisterClientScriptBlock(Me.GetType(), "CSSLink", "")
 End If