My contemplations and diurnal novelties are publicized here

Archive for April, 2012

Severe pain in back ear and back of head

It is merely for my reference only(Yet Public 🙂 ). (You can use it at your own risk)


Having severe pain in right ear seems like a pain in back ear. Also having headache in my half back-head lowering back to throat on right side.


Diagnosed as, referred pain from throat.


Windows 7 built in filtering

Here is an easy but unnoticed (at least for me) built in filtering mechanism in Window 7. Hope this might help you in daily tasks.



How to host a facebook application into a facebook page tab

  1. Create a new app

  2. Enter App name and app namespace

  3. Enter basic information

  4. Enter app related information ( here the application is hosted via local host)

  5. Page tab and its url her

  6. Now you need to mention on which page this tab should be added


  7. Select the page on which you want to add the tab

  8. Now you can go to your facebook page and use the application from there as a tab.

    That all now you can use your application

The web server process that was being debugged has been terminated by Internet Information Services (IIS) 7.5

Go to IIS server (run – > inetmgr – >Application pools – > Advanced Settings – > either change ping period or permanently disable ping enabled as shown below

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

I recently run into a problem where I using following connection string for a csv file

this.ConnectionString = @”Driver={Microsoft Text Driver (*.txt; *.csv)};Extensions=asc,csv,tab,txt;Dbq=” + @FolderPath;

But I always give me Data source name not found and no default driver specified error. I was using Window 7, 64 Bit and Office 2010 (it’s 32 bit app) Installed. The suggested solution was to

  1. Uninstall any 32-bit Office apps.
  2. Install the Access 64-bit drivers
  3. Re-install any 32-bit Office apps

If you try to install access 64 bit without un-installing 32 bit office products it gives following error

Un-installing 32-bit office was sort of impossible solution for me, so I opted for another solution

I Opened the registry editor and browse to the location

HKEY_CLASSES_ROOT\Installer\Products\ 00002109030000000000000000F01FEC

Here most of the keys are related to MS office application so I renamed them to include a prefix of “.” E.g .00002109030000000000000000F01FEC

Then I installed Access 64-bit drivers, It worked like a charm. Then I re-booted the system and again renamed all them back to their original name excluding only one shown below.

Other step I have to was to change connection string to

this.ConnectionString = @”Driver={Microsoft Access Text Driver (*.txt, *.csv)};Extensions=asc,csv,tab,txt;Persist Security Info=False;Dbq=” + @FolderPath;



How to display extjs label caption horizontally ( display: ‘rotate’ in extjs )

Recently I ran into a problem where I have to change the orientation of label.

(Note: – if you don’t know how to add label to pie chart refer to my previous article here.)

From this


I just change this

display: ‘rotate’,


display: {

rotate: true,

x: 0,

y: 0


jquery based Ajax file upload plugins

  1. (It uses flash)
    1. ( file used to upload the image)
  5. based file upload
  6. 1. Plupload

  7. Plupload
  8. Allows you to upload files using HTML5 Gears, Silverlight, Flash, BrowserPlus or normal forms, providing some unique features such as upload progress, image resizing and chunked uploads,  Plupload is currently separated into a Core API  and a jQuery upload queue widget this enables you to either use it out of the box or write your own custom implementation.
  9. 2. SWFUpload jQuery Plugin

  10. SWFUpload jQuery Plugin
  11. Using jQuery (the solution to all things painful), I’ve written a plugin to create a real event dispatcher for SWFUpload without modifying the SWFUpload core.
  12. 3. AJAX File Upload

  13. AJAX File Upload
  14. This AjaxFileUpload Plugin is a hacked version of Ajaxupload plugin created by yvind Saltvik, which is really good enought for normal use. Its idea is to create a iframe and submit the specified form to it for further processing. In this hacked version, it submits the specified file type of input element only rather than an entire form.
  15. 4. Uploadify

  16. Uploadify
  17. Uploadify can also be modified to suits the needs of more advanced developers via the arsenal of custom options that are available. Below are a few examples of different implementations of the Uploadify plugin.
  18. 5. JqUploader

  19. JqUploader
  20. jqUploader is a jquery plugin that substitutes html file input fields with a flash-based file upload widget, allowing to display a progressbar and percentage.
  21. 6. jqUploader Demonstration

  22. jqUploader Demonstration
  23. In this scenario, When the upload is finished, the jquUploader is replaced by a text input field. This makes it easy to then submit your form and save the file path to a database field for instance, along with the rest of the form fields.
  24. 7. Code Samples

  25. Code Samples
  26. This page demonstrates the Form Plugin’s file upload capabilities. There is no special coding required to handle file uploads. File input elements are automatically detected and processed for you.
  27. 8. Ajax Upload

  28. Ajax Upload
  29. This plugin uses XHR for uploading multiple files with progress-bar in FF3.6+, Safari4+, Chrome and falls back to hidden iframe based upload in other browsers, providing good user experience everywhere.
  30. 9. uploadprogress

Eval not working

In Gridview, sometimes we need to pass (Eval(“Column”)) value in javascript function on LinkButton or HyperLink. But you cannot directly pass eval value in javascript function like this

    <asp:LinkButton id=’lnk’ runat=’server’ OnClientClick=’javascript:somefun(‘<%# Eval(“columnname”) %>’)’ />

This will give error. To resolve this problem we need to use bellow syntax.

    <asp:LinkButton id=’lnk’ runat=’server’ OnClientClick='<%#Eval(“columnname”,”javascript:somefun({0});”)%>

If we need to have more than 2 Parameter then we can use

<%# String.Format(“..\\filepath\\{0}\\{1}.jpeg”, Eval(“code”), Eval(“code”))%>



IE conditional CSS sheets

Hacks are dangerous, since they are based on non-standard exploits, you can’t predict how they are going to behave in future browsers. IE problems can be better solved with conditional stylesheet. IE provides comment tags, supported all the way up to the current IE 10 to target specific versions, as well as greater-than/less-than stuff for targeting multiple versions at once.

Why use conditional stylesheets?

  • You got problems, they need fixing
  • Keeps your code hack-free and valid
  • Keeps your main stylesheet clean
  • Perfectly acceptable technique, sanctioned by Microsoft

And remember, these conditional tags don’t have to be used only for CSS. You could load JavaScript, or even use them down in the content of your site to display special IE-specific messages.

The Code

This would go in your <head> with all the other regular CSS <link> CSS files. The opening and closing tags should be familiar, that’s just regular HTML comments. Then between the brackets, “IF” and “IE” should be fairly obvious. The syntax to note is “!” stand for “not”, so !IE means “not IE”. gt means “greater than”, gte means “greater than or equal”, lt means “less than”, lte means “less than or equal.”


<!–[if IE]>

    <link rel=”stylesheet” type=”text/css” href=”all-ie-only.css” />


Target everything EXCEPT IE

<!–[if !IE]><!–>

    <link rel=”stylesheet” type=”text/css” href=”not-ie.css” />


Target IE 7 ONLY

<!–[if IE 7]>

    <link rel=”stylesheet” type=”text/css” href=”ie7.css”>


Target IE 6 ONLY

<!–[if IE 6]>

    <link rel=”stylesheet” type=”text/css” href=”ie6.css” />


Target IE 5 ONLY

<!–[if IE 5]>

    <link rel=”stylesheet” type=”text/css” href=”ie5.css” />


Target IE 5.5 ONLY

<!–[if IE 5.5000]>

<link rel=”stylesheet” type=”text/css” href=”ie55.css” />


Target IE 6 and LOWER

<!–[if lt IE 7]>

    <link rel=”stylesheet” type=”text/css” href=”ie6-and-down.css” />


<!–[if lte IE 6]>

    <link rel=”stylesheet” type=”text/css” href=”ie6-and-down.css” />


Target IE 7 and LOWER

<!–[if lt IE 8]>

    <link rel=”stylesheet” type=”text/css” href=”ie7-and-down.css” />


<!–[if lte IE 7]>

    <link rel=”stylesheet” type=”text/css” href=”ie7-and-down.css” />


Target IE 8 and LOWER

<!–[if lt IE 9]>

    <link rel=”stylesheet” type=”text/css” href=”ie8-and-down.css” />


<!–[if lte IE 8]>

    <link rel=”stylesheet” type=”text/css” href=”ie8-and-down.css” />


Target IE 6 and HIGHER

<!–[if gt IE 5.5]>

    <link rel=”stylesheet” type=”text/css” href=”ie6-and-up.css” />


<!–[if gte IE 6]>

    <link rel=”stylesheet” type=”text/css” href=”ie6-and-up.css” />


Target IE 7 and HIGHER

<!–[if gt IE 6]>

    <link rel=”stylesheet” type=”text/css” href=”ie7-and-up.css” />


<!–[if gte IE 7]>

    <link rel=”stylesheet” type=”text/css” href=”ie7-and-up.css” />


Target IE 8 and HIGHER

<!–[if gt IE 7]>

    <link rel=”stylesheet” type=”text/css” href=”ie8-and-up.css” />


<!–[if gte IE 8]>

    <link rel=”stylesheet” type=”text/css” href=”ie8-and-up.css” />


Universal IE 6 CSS

Dealing with IE 6 and below is always an extra-special challenge. These days people are dropping support for it right and left, including major businesses, major web apps, and even governments. There is a better solution than just letting the site go to hell, and that is to serve IE 6 and below a special stripped-down stylesheet, and then serve IE 7 and above (and all other browsers) the regular CSS. This is been coined the universal IE 6 CSS.

<!–[if !IE 6]><!–>

<link rel=”stylesheet” type=”text/css” media=”screen, projection” href=”REGULAR-STYLESHEET.css” />


<!–[if gte IE 7]>

<link rel=”stylesheet” type=”text/css” media=”screen, projection” href=”REGULAR-STYLESHEET.css” />


<!–[if lte IE 6]>

<link rel=”stylesheet” type=”text/css” media=”screen, projection” href=”; />


How to allow optional characters in jquery maskedinput

I recently need to allow optional characters in jquery like

I google and found a solution


You can add ? (Question mark) before the character to make them optional.

You can also change it to


Above will make only 3 characters optional

IE text not aligning in center

In IE 7 if you use

min-width: 90px;

this will conflict with

text-align: center;

So better not to use

Min-width with text-align

Jquery grids for

  1. jQuery Grid for ASP.NET MVC
  2. jqGrid 4.3.2 Downloads (Free, Open Source package)
  3. Flexigrid
  4. Ingrid
    1. Another nice demo
  5. DataTables
  6. Sigma Ajax Grid (Demos)
  7. dhtmlxGrid
  8. jqwidgets
  9. kendoui

Must have twitter utilites


This URL shortener not only shrinks links down to about 20 characters, it also keeps track of your links for you and provides some basic analytics to see how many people click and retweet the links and where those users are coming from.

2. Twitpic

Twitpic allows you to take a photo on your mobile phone and email it to a customized Twitpic email address. You simply type your tweet into the subject line of the email.

3. Tweetscan

Tweetscan scans Twitter for your keywords and sends you a daily or weekly email of all instances where your keywords were used. This can be especially helpful for tracking brands. Service is not free and costs $20/year.

4. Twitterfeed

Twitter is great for promoting blog posts and other types of content. If you have a blog and you want to automatically send out a tweet every time there’s a new post, then Twitterfeed can do it for you. It also has some nice customization options. WordPress do provide a buildin publicizing mechanism as

5. TwInbox

If you live in Microsoft Outlook — like many business professionals — and would prefer to interact with Twitter from there, TwInbox integrates Twitter into Outlook. And, the product is free. It was formerly known as OutTwit.

6. CoTweet

CoTweet provides an entire business workflow for companies that are serious about using Twitter for business. CoTweet allows you to manage multiple Twitter accounts, it allows multiple users to access a single account, it can assign tweets to employees for follow-up, it can monitor keywords and trends, it can track clicks to links, and it can allow employees to schedule tweets out into the future. This is not a free tool. (See also: HootSuite)

7. TweetStats

This site provides statistics for individual Twitter users. Simply plug in the person’s Twitter username and you’ll get a plethora of stats, such how often a person tweets, when the person tweets the most, who the person replies to most often, who the person retweets the most and which interface the person used the most to post on Twitter. (See also: TwitterGrader)

8. Twuffer

This free tool allows you to schedule tweets out into the future. For example, I like to post an inspirational quote of the day on Twitter. But sometimes when I’m looking up quotes I’ll come across with several good ones at a time. So, I use Twuffer to spread them out over several days.

9. Twtpoll

One of the most useful things to do on Twitter is to crowd-source a question or ask a quick straw poll. Twtpoll is a tool that makes it very easy to officially do a poll. (See also: StrawPoll)

10. Twendz

If you want to see watch how a keyword has been viewed over time, Twendz provides a very simply and useful chart. The chart is updated in real time. (See also: Twazzup, Twist, and Twittercounter)


A potentially dangerous Request.Form value was detected from the client 4.0

Our hosting provider just upgraded the site to 4.0 and an attribute in web.config break the whole site

<httpRuntime requestValidationMode=”2.0″ executionTimeout=”360″ />

Note: – This was supposed to be there to allow page level request validation to false.

Once i remove this attribute from web.config this error occurs.

So I again added this attribute after following change.

<httpRuntime requestValidationMode=”2.0″ />

And it worked

Here is a snapshot where this attribute can be placed


        <machineKey validationKey=”68CF5309D106F20B5C297979F7620C8358F6A” decryptionKey=”8C8ED732A8D973B303E152BBD5F” validation=”SHA1″ />

        <customErrors defaultRedirect=”~/GeneralError.htm” mode=”On” />

        <httpRuntime requestValidationMode=”2.0″ executionTimeout=”360″ />

<pages viewStateEncryptionMode=”Never” validateRequest=”false” enableEventValidation=”false” enableViewState=”true” enableViewStateMac=”false”>


                <add tagPrefix=”asp” namespace=”System.Web.UI” assembly=”System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />




  1. ASP.NET 4 Breaking Changes

Windows 8 Shortcuts cheat sheet

Metro App and Start Page Shortcuts
Keyboard Shortcut Result Mouse Touch
Win Open Start Page or Last App (alternating). Hover bottom left corner -> click corner (repeat). Swipe from right edge in -> Start.
Win + Tab

(release Tab, repeat)

Open next App (rotate through Metro Apps, Desktop is one App). Hover top left corner -> click corner (repeat). Swipe from left edge in then out -> App.

Or swipe from left edge in.

Win + Tab (release Tab, repeat), Delete Close a background App. Hover top left corner then down -> right click App -> Close. Swipe from left edge in then out -> drag App all the way to bottom of screen.
Alt + F4 Close active App. Hover top middle -> click and drag app all the way to the bottom. Swipe from top edge all the way to the bottom.
Win + Z Open the App commands bar. In App, right-click open space.

On Start, right-click a Tile.

Swipe from bottom edge or top edge.
Win + . (requires 1366×768 resolution) Snap App right. Move the split to the right. (Desktop is a single App.) Hover top edge, click and drag app to right.

Or select split line, drag right.

Swipe from top edge, drag app to right.

Or select split line, drag right.

Win + Shift + . Snap App left. Move the split to the left

(Desktop is a single App.)

Hover top edge, click and drag app to left.

Or select split line, drag left.

Swipe from top edge, drag app to right.

Or select Split line, drag left.

Ctrl + – On Start Page, Zoom Out. Hover bottom right corner -> click corner (Summary View icon.) Or Ctrl + Scroll wheel down. Pinch in.
Ctrl + = On Start Page, Zoom back In. Click open area. Or Ctrl + Scroll wheel down. Pinch out.
Ctrl + Alt + Del Access to Lock, Switch User, Sign out, Change a password, Task Manager, Ease of Access, and Power down choices. Alternatives: Start Page -> [User] -> Lock, Sign Out, or Switch Account. Hover bottom left corner -> right click -> Task Manager. Hover top right corner then down -> Settings -> Power Hold Win button and press Power button.
PgDn Move Start page tiles to the left. Scroll wheel down. Slide left.
PgUp Move Start page tiles to the right. Scroll wheel up. Slide right.
Arrows, Space, Tab Move active tile, Select, move Focus Move mouse, right-click Tile(s), click command Swipe tile(s), tap command.
Metro Charm Shortcuts
Keyboard Shortcut Result Mouse Touch
Win + C Open Charms (also shows Date/Time/Power/Net). Hover top right corner then move down. Swipe from right edge.
Win + F Open Search Charm on Files. Hover top right corner -> Search -> Files. Swipe from right edge -> Search -> Files.
Win + W Open Search Charm on Settings. Hover top right corner -> Search -> Settings. Swipe from right edge -> Search -> Files.
Win + Q Open Search Charm on Active App

(on right side only if supported by App).

Hover top right corner -> Search. Swipe from right edge -> Search.
Typing on Start Page Search Apps. Hover top right corner -> Search. Swipe from right edge -> Search.
Win + H Open Share Charm. Hover top right corner -> Share. Swipe from right edge -> Share.
Win + I Open Settings Charm (plus Start Settings and Metro Help). Hover top right corner -> Settings. Swipe from right edge -> Settings.
Win + K Open Devices Charm. Hover top right corner -> Devices. Swipe from right edge -> Devices.


Keyboard Shortcut Result Mouse Touch
Win + D Show Desktop. Click Desktop tile. Start page -> Desktop tile.
Win + E Open Windows Explorer. Click Explorer tile. Start page -> Explorer tile.
Win + I Open Settings Charm (plus Control Panel, Personalization, PC Info, and Desktop Help). Hover top right corner -> Settings. Swipe from right edge -> Settings.
Win + X Open Desktop quick menu (it’s like a mini Start Menu!) Hover bottom left corner -> right click.
Win + R Open Run Dialog. Hover bottom left corner -> right click -> Run.
Win + T Cycle through Desktop apps on the Taskbar Hover bottom left corner -> right click -> click -> Hover across Taskbar -> click. Start page -> Desktop tile -> Taskbar app
Alt + Tab

(release Tab, repeat)

Open next App (rotates through Apps, Desktop apps each have one place in rotation). Hover bottom left corner -> right click -> click -> Hover across Taskbar -> click. Start page -> Desktop tile -> Taskbar app
Alt + 1 to 9
Open the pinned Taskbar application Hover bottom left corner -> right click -> click -> Hover across Taskbar -> click. Start page -> Desktop tile -> Taskbar app


Keyboard Shortcut Result Mouse Touch
Win + L Lock Computer. Start Page -> [User] -> Lock. Start Page -> [User] -> Lock.
Win + P Second screen options. Hover top right corner then move down -> Devices -> Second screen. Swipe from right edge -> Devices -> Second screen.
Win + , Desktop peek (to see notifications I believe)
Win + O Lock screen rotation (if PC detects this)
Win + V Cycle through toasts.
Win + Shift + V Cycle through toasts in reverse.
Win + U Ease of Access Center Hover bottom left corner -> right click -> Control Panel -> Ease of Access -> Ease of Access Center
Win + Enter Launch Narrator.
Win + = Magnifier, Zoom In.
Win + – When Magnified, Zoom Out.
Internet Explorer Shortcuts
Ctrl + Tab Cycle through open Tabs Right-click an empty area -> Tab Swipe from top edge -> Tab
Ctrl + Shift + P Open an InPrivate Tab Right-click an empty area -> (+) Swipe from top edge -> (+)
Ctrl + T Open a new Tab Right-click an empty area -> 3 dots -> InPrivate Swipe from top edge -> 3 dots -> InPrivate
Ctrl + F4 Close the active Tab Right-click an empty area -> Tab (x) Swipe from top edge -> Tab (x)

Shift + Tab


Move forward through items on a Web page.

Move backwards.

Activate the selected item.

Click the item you want. Tap the item you want.
Ctrl + P Print page.
View page on Desktop IE (good for opening pages with Adobe Flash). Right-click an empty area -> Page tools -> View on the Desktop
Ctrl + L

Alt + D

Open Address bar (includes frequent and pinned pages).
Backspace Go back to previous Web page Move mouse to mid-left edge -> Click back. Slide right.
Shift + Backspace Go forward to previous Web page Move mouse to mid-right edge -> Click forward. Slide left.

Could not load file or assembly ‘mscorcfg’ or one of its dependencies. An attempt was made to load a program with an incorrect format

I tried to open an application of mine on 64bit OS having Window 7 and IIS 7.5 and I ran into this problem. This is due to following issue.

  • IIS running on a 64Bit Operating System
  • The Assembly DLL in question has been compiled for 32Bit – check the project properties under the build tab, if under platform target you have x86 then it is 32bit only.

The issue is that the 64Bit IIS machine is using an Application Pool that is not allowing a 32bit DLL to be processed.

  1. Just Check you project configuration

  1. Goto IIS Manager — > Application Pools — > Advance setting of the pool your application is using


Unable to start debugging on the web server. Debugging failed because integrated Windows authentication is not enabled (In windows 7)

Following are the steps I have performed to make it running on Windows 7

1.Goto Control Panel –> Program and Features –>Turn Windows features on or off

2. Goto IIS –> yourwebsite –> Authentication

3. Enable Windows Authentication

How to get checkboxlist ( values using jquery

In usually checkboxlist is binded with a data source and you need to check the checkboxes value sometime on client side.

How I approached this, attaching a class to list item for Checkboxlist using following code:-

foreach (ListItem li in checkBoxList.Items)        {

li.Attributes[“class”] = “checkBoxListItems”;


A checkboxlist in is usually rendered as


<input id=”ctl00_ContentPlaceHolder1_ checkBoxListItems_1″ type=”checkbox” name=”ctl00$ContentPlaceHolder1$checkBoxListItems$3″>

<label for=”ctl00_ContentPlaceHolder1_checkBoxListItems _3″>You label here</label>


So I used jquery to iterate through all the listitem and get the checked items using.

$(‘.btnCompareSelected’).click(function() {
var selectedCount = 0;
$(“. checkBoxListItems “).each(
function(intIndex) {
if ($(this).find(‘input’).attr(‘checked’) == true)
if (selectedCount < 2) {
alert(‘Atleast select 2 products to compare’);
return false;

Twitter Acronyms (RT, PRT, OH, DM, @, BTW, FTW, FTL, IRL, FTF, IMHO, YMMV, BR, JV, LMK etc)

RT = Retweet. See @hellowahab‘s  post on Twitter Acronyms .

PRT = Partial Retweet / Please Retweet
. PRT means the RT’ed tweet has been edited, usually to fit a username within the character limit.

OH = Overheard. ‘OH’ is commonly used at conferences or while traveling. OH indicates a quotation of someone else’s remarks.

DM = Direct Message. DMs are Twitter’s email. “DM me” means take the discussion private.

@ = Reply to [username]
. @ can also be used expressing ‘at,’ as in location.

BTW = By The Way. BTW is an easy way to add an aside. It’s Twitter’s version of a segue.

FTW  = For The Win. Whatever the action or product FTW modifies is *good*.

FTL = For The Loss (or For The Lose). FTL is generally an expression of disappointment, disapproval or dismay. It’s the opposite of FTW.

IRL = In Real Life. What’s true on Twitter may not be true IRL.

FTF = Face to Face. FTF or F2F refers to an actual meeting in person, IRL.

IMHO = In My Honest Opinion. IMHO usually indicates that ‘This is an op-ed tweet, not a factual assertion.

YMMV = Your Mileage May Vary. In other words (IOW), what’s true in my experience (IMX) may differ from yours if you try.

BR = Best Regards
. BR is a useful way of being cordial, particularly when making a
difficult request, submitting a complaint, or when introducing yourself.

b/c  = because.

JV = Joint Venture
. A JV refers to a collaborative enterprise between Twitterers on a project.

LMK = Let Me Know. Tweet me back (TMB) when you have more information about a question or a decision on a request.

ROFL = Rolling On the Floor Laughing

Mostly copied and edited from:-

%d bloggers like this: