My contemplations and diurnal novelties are publicized here

Posts tagged ‘General’

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

Advertisements

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;

References:-

  1. http://stackoverflow.com/questions/6490543/data-source-name-not-found-and-no-default-driver-specified
  2. http://social.msdn.microsoft.com/Forums/nl-NL/adodotnetdataproviders/thread/abf34eea-1029-429a-b88e-4671bffcee76

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

To

I just change this

display: ‘rotate’,

to

display: {

rotate: true,

x: 0,

y: 0

},

jquery based Ajax file upload plugins


  1. http://www.uploadify.com/demos/ (It uses flash)
  2. http://blueimp.github.com/jQuery-File-Upload/
    1. http://www.phpletter.com/contents/ajaxfileupload/doajaxfileupload.php ( file used to upload the image)
  3. http://nixbox.com/demos/jquery-uploadprogress-demo-simple.php
  4. http://valums.com/ajax-upload/
  5. Asp.net 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.”

Target ALL VERSIONS of IE

<!–[if IE]>

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

<![endif]–>

Target everything EXCEPT IE

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

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

<!–<![endif]–>

Target IE 7 ONLY

<!–[if IE 7]>

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

<![endif]–>

Target IE 6 ONLY

<!–[if IE 6]>

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

<![endif]–>

Target IE 5 ONLY

<!–[if IE 5]>

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

<![endif]–>

Target IE 5.5 ONLY

<!–[if IE 5.5000]>

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

<![endif]–>

Target IE 6 and LOWER

<!–[if lt IE 7]>

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

<![endif]–>

<!–[if lte IE 6]>

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

<![endif]–>

Target IE 7 and LOWER

<!–[if lt IE 8]>

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

<![endif]–>

<!–[if lte IE 7]>

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

<![endif]–>

Target IE 8 and LOWER

<!–[if lt IE 9]>

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

<![endif]–>

<!–[if lte IE 8]>

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

<![endif]–>

Target IE 6 and HIGHER

<!–[if gt IE 5.5]>

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

<![endif]–>

<!–[if gte IE 6]>

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

<![endif]–>

Target IE 7 and HIGHER

<!–[if gt IE 6]>

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

<![endif]–>

<!–[if gte IE 7]>

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

<![endif]–>

Target IE 8 and HIGHER

<!–[if gt IE 7]>

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

<![endif]–>

<!–[if gte IE 8]>

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

<![endif]–>

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” />

<!–<![endif]–>

<!–[if gte IE 7]>

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

<![endif]–>

<!–[if lte IE 6]>

<link rel=”stylesheet” type=”text/css” media=”screen, projection” href=”http://universal-ie6-css.googlecode.com/files/ie6.0.3.css&#8221; />

<![endif]–>

%d bloggers like this: