Category - JavaScript
01 Feb 2009
3 Comments   20917 Views
Here Mudassar Khan has explain how to build popus using javascript in asp.net
01 Feb 2009
4 Comments   78740 Views
Here Mudassar Ahmed Khan has explained how to open popups using JavaScript and also transfer data between popup or child page and the parent page
03 Feb 2009
0 Comments   24391 Views
Here Mudassar Ahmed Khan has explain how to check whether username is alread exit
03 Feb 2009
1 Comments   32098 Views
Here Mudassar Ahmed Khan has explained how to use AJAX JavaScript and XMLHttp to query the server and find out whether user name already exists in the database using C and Vb.Net
07 Feb 2009
0 Comments   6630 Views
Here Mudassar Ahemad Khan explain how to Disable Right Click in Browsers using javascript
07 Feb 2009
0 Comments   13563 Views
Here Mudassar Ahemad Khan described how to build your own Ajax Enabled Grid using JavaScript
08 Feb 2009
21 Comments   79085 Views
Here Mudassar Ahemad Khan Explain how to validate textbox using Javascript
06 Mar 2009
11 Comments   44240 Views
Here Mudassar Ahmed Khan has described how to create your own watermark textbox using javascript
13 Mar 2009
19 Comments   79258 Views
Here Mudassar Ahmed Khan has explained how to use JavaScript with ASP.Net GridView Control and implementing functionalities such as check all checkboxes and highlighting a row.
21 Mar 2009
5 Comments   43963 Views
Here Mudassar Ahmed Khan has explained how one can validate date without using any Custom Validator or Regular Expression using JavaScript
24 Mar 2009
45 Comments   136891 Views
Here Mudassar Ahmed Khan has discussed how to disable browser back button functionality in ASP.Net using JavaScript
03 Apr 2009
1 Comments   35086 Views
Here Mudassar Ahmed Khan has discussed how to disable browser back button functionality in ASP.Net using JavaScript
07 May 2009
6 Comments   44920 Views
In this article Mudassar Ahmed Khan has explained how to create a modal popup without using ShowModalDialog property using JavaScript in ASP.Net
19 May 2009
1 Comments   14765 Views
Here Mudassar Ahmed Khan has explained how prevent users from pasting or typing text in FileUpload control in ASP.Net using JavaScript
29 May 2009
32 Comments   118334 Views
Here Mudassar Ahmed Khan has explained how to disable enter key in textbox to prevent form submission in ASP.Net using JavaScript
29 May 2009
1 Comments   30211 Views
Here Mudassar Ahmed Khan has explained how to create a filter for FileUpload control in order that it allows selected files to be uploaded in ASP.Net Web Applications
30 May 2009
10 Comments   67331 Views
Here Mudassar Ahmed Khan has explained How to use JavaScript with Master Pages in ASP.Net
31 May 2009
24 Comments   66852 Views
Here Mudassar Ahmed Khan has explained how to upload multiple files by dynamically adding or removing FileUpload controls using JavaScript in ASP.Net
15 Jun 2009
20 Comments   65584 Views
Here Mudassar Ahmed Khan has explained the concept of using JavaScript with ASP.Net RadioButtonList Control
17 Jun 2009
11 Comments   49854 Views
Here Mudassar Ahmed Khan has explained the concept of using JavaScript with ASP.Net CheckBoxList Control
24 Jun 2009
28 Comments   98951 Views
Here Mudassar Ahmed Khan has explained how to display messagebox in ASP.Net using Server Side Code using JavaScript
11 Jul 2009
0 Comments   13305 Views
Here Mudassar Ahmed Khan has explained how to use event.keyCode to get the key ASCII Code in Internet Explorer Mozilla Firefox Apple Safari Google Chrome and Opera
23 Nov 2009
19 Comments   54959 Views
Here Mudassar Ahmed Khan has explained how to filter and Search DropDownLists items Client Side without using PostBack Server Side Code jQuery or AJAX requests instead using simple plain JavaScript
26 Feb 2010
0 Comments   8531 Views
Here Mudassar Ahmed Khan has explained how to access ASP.Net Validation Controls (like Requiredfieldvalidator) in client side languages like JavaScript
18 Apr 2010
16 Comments   29412 Views
Here Mudassar Ahmed Khan has explained how to display loading GIF image when ASP.Net AJAX Control Toolkit AutoCompleteExtender Control makes a call to the the server to search the records and hide the image when the records are populated using JavaScript.
11 May 2010
1 Comments   19294 Views
Here Mudassar Ahmed Khan has explained how to localize string messages in JavaScript using ASP.Net Localization and Resource files
11 May 2010
42 Comments   85659 Views
Here Mudassar Ahmed Khan has explained how to build a Gmail style file uploader using JQuery and Uploadify plugin for JQuery in ASP.Net
25 Jul 2010
4 Comments   17444 Views
Here Mudassar Ahmed Khan has explained how to perform validation in TinyMCE Rich Text Editor using the ASP.Net Validators
30 Jul 2010
4 Comments   11426 Views
Here Mudassar Ahmed Khan has explained how to fix the issue of repetition of JavaScript code when a WebUserControls is used multiple times on a same page. This repetition causes the JavaScript methods to stop working. This article explains how to resolve this issue.
05 Aug 2010
10 Comments   56228 Views
Here Mudassar Ahmed Khan has explained how to get the selected node reference of ASP.Net TreeView and its Text and Value part client side using JavaScript in ASP.Net
12 Oct 2010
4 Comments   7663 Views
Here Mudassar Ahmed Khan has explained how to Localize Javascript strings or messages using ASP.Net Localization
29 Oct 2010
1 Comments   19492 Views
Here Mudassar Ahmed Khan has explained how to get Absolute Position (Screen Coordinates) of HTML Control using JavaScript.
01 Nov 2010
13 Comments   28331 Views
Here Mudassar Ahmed Khan has explained how to change the Background and Border colors of invalid controls when validations fails so that we can notify the users that in a better way.
17 Nov 2010
0 Comments   10994 Views
Here Mudassar Ahmed Khan has explained how to pass JavaScript function or method as parameter argument to another JavaScript function or method
28 Nov 2010
15 Comments   62980 Views
Here Mudassar Ahmed Khan has explained how to call server side methods or functions using JavaScript and ASP.Net AJAX PageMethods without PostBack in ASP.Net
18 Dec 2010
13 Comments   29485 Views
Here Mudassar Ahmed Khan has explained how to check Username availability in SQL Server 2005 database using PageMethods in ASP.Net
28 Dec 2010
0 Comments   14196 Views
Here Mudassar Ahmed Khan has explained how to dynamically adjust the width of the ASP.Net DropDownList (HTML SELECT) based on the text length of the largest item or option using JavaScript
04 Jan 2011
9 Comments   28241 Views
Here Mudassar Ahmed Khan has explained how to disable ASP.Net button when it is clicked until PostBack occurs to prevent users click on the button.
06 Jan 2011
1 Comments   25125 Views
Here Mudassar Ahmed Khan has described a code snippet to play WAV sound files in ASP.Net using JavaScript
14 Jan 2011
1 Comments   13829 Views
Here Mudassar Ahmed Khan has explained how to build your own simple Hover Menu using jQuery in ASP.Net
31 Jan 2011
10 Comments   44965 Views
Here Mudassar Ahmed Khan has explained how to populate or bind ASP.Net DropDownList using ASP.Net AJAX Page Methods and JavaScript.
17 Feb 2011
6 Comments   37618 Views
Here Mudassar Ahmed Khan has explained how to pass and fetch JavaScript Array to Web Service web method using ASP.Net AJAX Pagemethods.
20 Feb 2011
18 Comments   31408 Views
Here Mudassar Ahmed Khan has explained how to create add remove dynamic textboxes client side using JavaScript fetch tehir values server side and retain the dynamic textboxes across postbacks
21 Feb 2011
23 Comments   51884 Views
Here Mudassar Ahmed Khan has explained how to dynamically freeze header or make the header fixed of ASP.Net GridView control using JavaScript. This is a cross browser solution and works in all new browsers including Internet Explorer 8 (IE8) Chrome FireFox Opera and Safari. This is a unique solution where you dont need to do anything the script will automatically convert your GridView to a scrollable grid with fixed headers
23 Feb 2011
1 Comments   5780 Views
Here Mudassar Ahmed Khan has described how to filter or search for substring in array in JavaScript
23 Feb 2011
3 Comments   55125 Views
Here Mudassar Ahmed Khan has explained how to induce Client side onclick event in ASP.Net TreeView nodes using JavaScript
07 Mar 2011
2 Comments   44482 Views
Here Mudassar Ahmed Khan has explained how to validate File type using its extension in ASP.Net AJAX Control Toolkit AsyncFileUpload control client side using JavaScript
05 Jun 2011
1 Comments   21882 Views
Here Mudassar Ahmed Khan has explained how to Detect ASP.Net Asynchronous PostBack and its settings like control and UpdatePanel that caused PostBack and the using PageRequestManager Events in JavaScript
05 Jul 2011
6 Comments   35691 Views
Here Mudassar Ahmed Khan has explained how to make AJAX call to asp.net server side web service's webmethod using jQuery
08 Jul 2011
3 Comments   36192 Views
Here Mudassar Ahmed Khan has explained how to implement File size limit validation before upload using jQuery uploadify plugin
10 Aug 2011
6 Comments   41161 Views
Here Mudassar Ahmed Khan has explained how to do validate ASP.Net CheckBox client side using ASP.Net Custom Validator and JavaScript
17 Aug 2011
8 Comments   39485 Views
Here Mudassar Ahmed Khan has explained how to modify the ASP.Net WCF (Windows Communication Foundation) service to make it accept AJAX JSON calls and to make AJAX JSON calls to ASP.Net WCF Service using JavaScript and jQuery
27 Sep 2011
1 Comments   17444 Views
Here Mudassar Ahmed Khan has explained how to dynamically set value of ContextKey for ASP.Net AJAX Control ToolKit AutocompleteExtender using JavaScript
16 Oct 2011
0 Comments   41190 Views
Here Mudassar Ahmed Khan has explained how to get the IP Address of the client machine's using JavaScript and JSON.
03 Nov 2011
0 Comments   9034 Views
Here Mudassar Ahmed Khan has explained how to create and use Enums (Enumeration) in JavaScript.
20 Dec 2011
5 Comments   64356 Views
Here Mudassar Ahmed Khan has explained how to populate dataset or datatable from database and bind it to ASP.Net GridView using jQuery AJAX and Webmethods.
08 Feb 2012
1 Comments   16089 Views
Here Mudassar Ahmed Khan has explained how to debug and put breakpoints JavaScript and jQuery scripts code in Internet Explorer (IE) browser using Visual Studio debugger .
11 Feb 2012
18 Comments   66752 Views
Here Mudassar Ahmed Khan has explained how to build a server side Yes/No Confirmation Box using JavaScript and ASP.Net
23 Feb 2012
3 Comments   31707 Views
Here Mudassar Ahmed Khan has explained how to print ASP.Net GridView control, add page breaks where needed to void auto page breaks and clipping of rows and how to repaeat headers on each print page.
07 Mar 2012
3 Comments   15513 Views
Here Mudassar Ahmed Khan has explained how to rotate images or pictures automatically using timed image swap technique in which image is swapped (changed) every specific interval. He has used JavaScript setInterval function at act as a timer which will swap images at regular intervals.
21 Mar 2012
0 Comments   9110 Views
Here Mudassar Ahmed Khan has explained how to disable or prevent Cut, Copy and Paste operations and in HTML Input TextBox and TextArea and ASP.Net Single and MultiLine TextBox using JavaScript. The solution provided disables the Cut, Copy and Paste operations in both cases that is using CTRL key as well as using browser context menu.
02 Apr 2012
9 Comments   36247 Views
Here Mudassar Ahmed Khan has explained how to print ASP.Net Panel (HTML DIV) contents with Print Preview using JavaScript.
02 Apr 2012
0 Comments   5270 Views
Here Mudassar Ahmed Khan has explained how to parse and convert JSON string to JSON object using JavaScript eval function.
02 Apr 2012
0 Comments   3570 Views
Here Mudassar Ahmed Khan has explained how to parse and convert JSON string to JSON object using JavaScript eval function.
03 Apr 2012
0 Comments   14408 Views
Here Mudassar Ahmed Khan has explained how to convert JSON object to JSON string i.e. Serialize JSON object to string using JSON2 JavaScript Library
13 Apr 2012
6 Comments   17761 Views
Here Mudassar Ahmed Khan has explained how to get the ASP.Net GridView Row and its RowIndex client side using JavaScript. He has also explained how we can find the GridView Cells and the controls inside the GridView Template Fields client side using JavaScript.
14 Apr 2012
4 Comments   37714 Views
Here Mudassar Ahmed Khan has explained how to get the ASP.Net GridView SelectedRow and its RowIndex client side using JavaScript. He has also explained how we can find the GridView Cells and the controls inside the GridView Template Fields of the GridView SelectedRow client side using JavaScript.
17 Apr 2012
0 Comments   24166 Views
Here Mudassar Ahmed Khan has explained how to validate email addresses client side in JavaScript using Regular Expressions.
25 Jun 2012
1 Comments   34266 Views
Here Mudassar Ahmed Khan has explained how to persist JavaScript objects and variables across PostBacks or in other words Form Submissions in ASP.Net. He has explained with a help of an array variable. Though the example is in ASP.Net it can be used for other technologies also.
05 Jul 2012
0 Comments   18923 Views
Here Mudassar Ahmed Khan has explained how to print only the items which are selected by checking the Checkbox control in ASP.Net DataList using JavaScript with Print Preview feature.
07 Jul 2012
8 Comments   39406 Views
Here Mudassar Ahmed Khan has explained how to Populate ASP.Net GridView client side by fetching DataSet or DataTable from server as XML using jQuery AJAX and WebMethod
21 Aug 2012
2 Comments   41467 Views
Here Mudassar Ahmed Khan has explained how to create a validation filter for FileUpload control in order that it allows upload of only files with specific extension.
Example for Word documents it will filter *.doc and *.docx extension, for Excel files it will flter *.xls and *.xlsx extensions.
The validation done here is dual i.e. both server side and client side.
30 Aug 2012
2 Comments   11476 Views
Here Mudassar Ahmed Khan has discussed how to disable browser back button after login in ASP.Net using JavaScript
01 Sep 2012
11 Comments   39044 Views
Here Mudassar Ahmed Khan has discussed how to disable browser back button after user has logged out in ASP.Net using JavaScript
20 Oct 2012
0 Comments   13960 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code how to add Google Maps to your website's Contact Us page to display your office location.
20 Oct 2012
3 Comments   19928 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code how to add Google map in asp.net web page.
30 Oct 2012
12 Comments   117180 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to make AJAX call to asp.net server side Page method (web method) using jQuery.
07 Nov 2012
2 Comments   13287 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to delete rows or records from GridView with JavaScript Confirmation Box using CommandField and OnRowDeleting event in ASP.Net
11 Nov 2012
7 Comments   67127 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to delete row from ASP.Net GridView Confirmation.
03 Jan 2013
1 Comments   13038 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to get Absolute Position (Screen Cordinates) of HTML Elements like TextBox, DIV, Button, etc using JavaScript.
04 Jan 2013
29 Comments   360032 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to build a server side Yes/No Confirmation Message or Dialog Box using JavaScript and ASP.Net
06 Feb 2013
0 Comments   5725 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to disable or prevent Cut, Copy and Paste operations and in HTML Input TextBox and TextArea and ASP.Net Single and MultiLine TextBox using JavaScript.

The solution provided disables the Cut, Copy and Paste operations in both cases that is using CTRL key as well as using browser context menu using Mouse Right click.
21 Feb 2013
0 Comments   15897 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to Highlight GridView row i.e. change its row background color on mouseover or when checkbox is checked using JavaScript
21 Feb 2013
2 Comments   30872 Views
Here Mudassar Ahmed Khan has provided a short code snippet with an example and attached sample code, for how to find Latitude and Longitude for a given location using its address by making use of Google Maps API V3 (Version 3) and JavaScript.
25 Feb 2013
5 Comments   33401 Views
Here Mudassar Ahmed Khan has explained the JavaScript error ( bobj is undefined ) that occurs when an ASP.Net Crystal Report 13 application developed in Visual Studio 2010 is hosted on server in IIS server.
Due to this error the Crystal Report Viewer is not rendered and we see a blank page.
29 Mar 2013
3 Comments   58154 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to display alert message box in ASP.Net using Server Side Code behind using JavaScript, C# and VB.Net
01 Apr 2013
3 Comments   37593 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to show or display a JavaScript Alert Message Box and then redirect user to another page or website after he clicks OK Button in ASP.Net Website using C# and VB.Net.
07 Apr 2013
8 Comments   340846 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to show JavaScript alert message box in ASP.Net from server side using C# and VB.Net
30 Apr 2013
2 Comments   7955 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to populate Google Maps Version 3 with animated markers with drop animation with delay using JavaScript.
11 May 2013
0 Comments   12380 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to make an ASP.Net Multiline TextBox i.e. HTML TextArea automatically scroll to bottom when the page loads using JavaScript.
06 Jun 2013
1 Comments   5523 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to change GridView Row Background Color using JavaScript when Row or its Cell is clicked in ASP.Net
09 Jun 2013
2 Comments   9491 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to change GridView Row Background Color using JavaScript when Row or its Cell is clicked in ASP.Net
20 Jun 2013
0 Comments   3750 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to change or Highlight GridView Row Background Color on MouseOver ( Hover ) using jQuery and JavaScript in ASP.Net.
21 Jun 2013
3 Comments   25496 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to print ASP.Net Panel (HTML DIV) contents with Print Preview using C# VB.Net and JavaScript.
21 Jun 2013
5 Comments   20131 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, explain how to implement check uncheck all or select unselect all functionality for CheckBox in GridView ItemTemplate and HeaderTemplate using jQuery and JavaScript.
26 Jun 2013
0 Comments   14778 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to change or highlight GridView Row Background Color on MouseOver ( Hover ) using jQuery in ASP.Net.
This is done by attaching jQuery Mouseover event handler to GridView Row Cells, thus when a Mouse is hovered over GridView Row or Cell its background color is changed thus making it look highlighted.
27 Jun 2013
0 Comments   3607 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to highlight GridView Row when clicked.
Here using jQuery and JavaScript, a client side click event handler is attached to the GridView Row and when the row is clicked its background color is changed so that it looks highlighted.
30 Jun 2013
0 Comments   7356 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to highlight ASP.Net GridView Row Color on Mouseover using jQuery in ASP.Net.
In order to implement GridView Row highlighting or change, jQuery Hover event handler is used, so that when mouse is moved over GridView Row its background color is changed so that the GridView Row looks highlighted and when mouse is moved out its color is changed back to normal like other GridView Rows.
11 Jul 2013
6 Comments   30952 Views
Here Mudassar Ahmed Khan has explained, how to check and uncheck all (select unselect or deselect all) child node CheckBox or CheckBoxes of ASP.Net TreeView control using JavaScript and jQuery.

The idea is to attach the Client Side JavaScript click event handler using jQuery to all CheckBoxes inside the TreeView control and then when some CheckBox is clicked then based on whether it is Child or Parent CheckBox appropriate action is taken.

The script provided in this article works in dual way i.e. it Checks unchecks child CheckBoxes when parent CheckBox is checked or unchecked. While when all the child CheckBoxes are checked then the Parent CheckBox is checked and when even one Child CheckBox is unchecked the Parent CheckBox is unchecked.
11 Jul 2013
2 Comments   4757 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to correctly highlight GridView Rows on Mouseover in ASP.Net using Client side JavaScript and jQuery functions
15 Jul 2013
2 Comments   42697 Views
Here Mudassar Ahmed Khan has explained, how to Show (Open) and Hide (Close) ASP.Net AJAX ModalPopupExtender Modal Popup using JavaScript.

ASP.Net AJAX ModalPopupExtender Modal Popup has a property named as BehaviorId which when set can be used to access in client side in JavaScript functions.
24 Jul 2013
1 Comments   9584 Views
Here Mudassar Ahmed Khan has explained, how to refresh or reload parent page when the child popup page window is closed using JavaScript in ASP.Net

Same can be implemented via jQuery there would not be any difference other than the style of attachment of the events.
24 Jul 2013
0 Comments   10885 Views
Here Mudassar Ahmed Khan has explained, how to refresh or reload parent page from the child popup page on button click using JavaScript in ASP.Net
26 Jul 2013
0 Comments   5298 Views
Here Mudassar Ahmed Khan has explained, how to refresh or reload parent page after child popup page window is closed using JavaScript

Same can be implemented via jQuery there would not be any difference other than the style of attachment of the events.
26 Jul 2013
0 Comments   9972 Views
Here Mudassar Ahmed Khan has explained, how to refresh or reload parent page after child popup page window is closed using JavaScript

Same can be implemented via jQuery there would not be any difference other than the style of attachment of the events.
29 Jul 2013
6 Comments   18996 Views
Here Mudassar Ahmed Khan has explained how to disable ASP.Net submit button when it is clicked after PostBack occurs to prevent users double click on the button using JavaScript
29 Jul 2013
1 Comments   9060 Views
Here Mudassar Ahmed Khan has explained, how to restrict (prevent) user to enter only numbers i.e. numeric value or digits in TextBox using JavaScript.

He has also disabled the input via Dropping and Pasting so that user cannot directly drop or paste non numeric content in textbox.
31 Jul 2013
4 Comments   46903 Views
Here Mudassar Ahmed Khan has explained, how to allow user to enter only numbers i.e. numeric value or digits in TextBox using JavaScript.

He has also disabled the input via Dropping and Pasting so that user is not allowed directly drop or paste non numeric value in textbox.
31 Jul 2013
2 Comments   44423 Views
Here Mudassar Ahmed Khan has explained, how to perform Numeric validation in TextBox using JavaScript in such a way that the TextBox will accept only numbers i.e. numeric values or digits in TextBox.

He has also disabled the input via Dropping and Pasting so that user is not allowed directly drop or paste content in textbox and only way to input values is by typing through Keyboard.
02 Aug 2013
3 Comments   28532 Views
Here Mudassar Ahmed Khan has explained, how to restrict user from entering special characters in TextBox using JavaScript or in other words remove special characters from TextBox using JavaScript as user types into the TextBox.

The script works in such a way that the TextBox will accept only alphabets, numbers i.e. alphanumeric values with some allowed special keys, thus unless a special character key has been specified to be excluded it won’t be accepted.
05 Aug 2013
2 Comments   32375 Views
Here Mudassar Ahmed Khan has explained, how to refresh or reload parent window from child window on close using JavaScript

Same can be implemented via jQuery there would not be any difference other than the style of attachment of the events.
17 Aug 2013
2 Comments   19210 Views
Here Mudassar Ahmed Khan has explained, how to allow only Alphanumeric character values i.e. Alphabets and Numbers with Space character in TextBox using JavaScript.

The script works in such a way that the TextBox will accept only alphabets, numbers i.e. alphanumeric values with space character, thus unless a special character key has been specified to be excluded it won’t be accepted.
21 Aug 2013
1 Comments   18997 Views
Here Mudassar Ahmed Khan has explained, how to change TextBox Background color on Focus CSS and without any JavaScript or jQuery i.e. Highlight TextBox on focus using CSS and without any JavaScript or jQuery and set it back to default on blur
03 Sep 2013
1 Comments   17817 Views
Here Mudassar Ahmed Khan has explained, how to move items from one ListBox to another ListBox in ASP.Net using jQuery.

This article also covers, how to fetch the items moved from the Left ListBox to the Right ListBox or vice versa on server side on Button click and preserve the items in the ListBoxes during PostBack.
06 Sep 2013
3 Comments   10964 Views
Here Mudassar Ahmed Khan has explained the common issue how to access content page controls from Master Pages using JavaScript.

Problem happens since the Ids of the controls change when Master Page is used hence accessing them on client side using JavaScript becomes a problem.
08 Sep 2013
0 Comments   12290 Views
Here Mudassar Ahmed Khan has explained how to display Progress Indicator Bar in ASP.Net AJAX Control Toolkit AutoCompleteExtender Control using loading GIF image when it makes call to the server to search the records and hide the image when the records are populated using JavaScript.
09 Sep 2013
2 Comments   14937 Views
Here Mudassar Ahmed Khan has explained how to validate ASP.Net CheckBoxList control and check whether at least one CheckBox is checked using JavaScript at client side.
11 Sep 2013
1 Comments   12373 Views
Here Mudassar Ahmed Khan has explained how to validate ASP.Net CheckBoxList control using Custom Validator and perform at least one CheckBox Checked Validation in it. The ASP.Net Custom Validator will make us eof JavaScript function to validate the CheckBoxList control.
12 Sep 2013
2 Comments   11899 Views
Here Mudassar Ahmed Khan has shown the technique how to automatically hide an ASP.Net Label control after some seconds (say 5 seconds) using JavaScript.
22 Oct 2013
6 Comments   69218 Views
Here Mudassar Ahmed Khan has explained how to open new popup window from Server Side (Code Behind) in ASP.Net using C# and VB.Net.

In order to open a new popup window from Server Side (Code Behind), we need to use the ClientScript RegisterStartupScript method to register the JavaScript method to open new window.
23 Oct 2013
0 Comments   38589 Views
Here Mudassar Ahmed Khan has explained how to enable disable ASP.Net Validator (Client Side Validation) such has RequiredField validator, RegularExpression validator, Custom validator, etc. using JavaScript or jQuery.

In order to enable or disable ASP.Net Validator (Client Side Validation), we need to make use of the inbuilt ValidatorEnable ASP.Net client side JavaScript function.
25 Nov 2013
5 Comments   29605 Views
Here Mudassar Ahmed Khan has explained, how to draw route line between two geographic locations i.e. coordinates (Latitude and Longitude points) on Google Maps V3.

The route line is drawn on the shortest route between the locations. This article also explains how to change the stroke color of the route line drawn between the coordinates on Google Maps V3.
02 Dec 2013
4 Comments   27030 Views
Here Mudassar Ahmed Khan has explained how to pass value from child popup window to parent page window using JavaScript.

The child popup window must be opened using JavaScript window.open function. And in such case we can access the parent page controls using JavaScript window.opener instance.
29 Dec 2013
12 Comments   43097 Views
Here Mudassar Ahmed Khan has explained how to search GridView records (data) on TextBox KeyPress event using jQuery in ASP.Net.

In order to search GridView records (data) on TextBox KeyPress event, I am making use of jQuery QuickSearch Plugin which dynamically searches the GridView cells and filters out the unwanted rows and displays only the records (data) that matches the input search term.
01 Jan 2014
0 Comments   36073 Views
Here Mudassar Ahmed Khan has shared a trick to prevent user refreshing the browser using Keyboard F5 function key by disabling the F5 function key using JavaScript or jQuery.

The idea is to determine the key code of the pressed key and if it is 116 i.e. ASCII key code of Keyboard F5 function key then stop its propagation by returning false inside the event handler.
02 Jan 2014
0 Comments   17618 Views
Here Mudassar Ahmed Khan has explained how to modify the ASP.Net WCF (Windows Communication Foundation) service to make it accept AJAX JSON calls and to make AJAX JSON calls to ASP.Net WCF Service using JavaScript and jQuery
22 Jan 2014
0 Comments   21725 Views
Here Mudassar Ahmed Khan has explained how to validate / check file size before it is uploaded using jQuery Uploadify plugin.

By default there is no way to validate / check file size before it is uploaded, but jQuery Uploadify Plugin makes use of Flash program to determine the size of the File as soon as it is selected.
26 Jan 2014
10 Comments   23172 Views
Here Mudassar Ahmed Khan has explained how to print specific (particular) part of web page in ASP.Net using C# and VB.Net.

The idea is to place the contents to be printed inside an ASP.Net Panel control and then print the contents of the Panel control.
31 Jan 2014
0 Comments   15246 Views
Here Mudassar Ahmed Khan has explained how to validate CheckBoxes inside GridView and perform at least one checked validation using JavaScript in ASP.Net.

Validation of CheckBoxes inside GridView is performed using ASP.Net CustomValidator with a client side JavaScript validation function.
09 Feb 2014
0 Comments   13498 Views
Here Mudassar Ahmed Khan how to validate CheckBoxes inside Repeater and perform at least one checked validation using JavaScript in ASP.Net.

Validation of CheckBoxes inside Repeater is performed using ASP.Net CustomValidator with a client side JavaScript validation function.
02 Mar 2014
0 Comments   14192 Views
Here Mudassar Ahmed Khan has explained how to dynamically create HTML5 canvas charts using JavaScript, jQuery and JSON.

The HTML 5 Canvas charts have been implemented using the free Chart.js library to which JSON object is supplied as source of data. This article also covers procedure to display the animated HTML5 chart in browsers that do not support CSS3 like IE 8.
11 Mar 2014
3 Comments   22393 Views
Here Mudassar Ahmed Khan has explained how to detect / find the IP Address of the client / user machine using JavaScript & jQuery.
31 Mar 2014
3 Comments   5179 Views
Here Mudassar Ahmed Khan has explained how to add, include and use JavaScript with Content Pages in ASP.Net.
04 Apr 2014
0 Comments   3983 Views
Here Mudassar Ahmed Khan has explained how to access ASP.Net Global Resource file in JavaScript, thus implementing Globalization in JavaScript strings.
24 Apr 2014
6 Comments   8315 Views
Here Mudassar Ahmed Khan has explained how to display JavaScript Alert Message Box from server side when using AJAX UpdatePanel in ASP.Net.

I have already explained how to Show Alert Message in ASP.Net from Server Side using C# and VB.Net, but ClientScript.RegisterClientScriptBlock and ClientScript.RegisterStartupScript methods for registering JavaScript code from server side do not work when AJAX UpdatePanel is used.
26 Apr 2014
1 Comments   8337 Views
Here Mudassar Ahmed Khan has explained how to solve the issue, ClientScript.RegisterClientScriptBlock and ClientScript.RegisterStartupScript not working in AJAX UpdatePanel in ASP.Net.
26 Apr 2014
0 Comments   6148 Views
Here Mudassar Ahmed Khan has explained how to allow website visitors to change i.e. increase or decrease font size of text using JavaScript and jQuery.
He has shown how to change i.e. increase or decrease the font size of text of whole page or particular section or part of page using JavaScript or jQuery

There are multiple monitor dimensions and resolutions, thus sometimes users find it difficult to read the information and hence they can use this feature to increase or decrease font size of the text for improved readability.
23 May 2014
0 Comments   4770 Views
Here Mudassar Ahmed Khan has explained how to dynamically change the error message of ASP.Net Custom Validator using JavaScript.

In order to illustrate the functioning with an example, I have created a simple form where a person has to enter either Phone Number or Cell Number and based on what he chooses the validation message of the ASP.Net CustomValidator is dynamically changed using JavaScript.
05 Jun 2014
0 Comments   1597 Views
Here Mudassar Ahmed Khan has explained how to prevent users from submitting form by hitting enter using JavaScript in ASP.Net.
22 Jun 2014
0 Comments   25493 Views
Here Mudassar Ahmed Khan has explained how to use Regular Expression (Regex) to accept/allow only Alphabets and Space in TextBox in ASP.Net using:-

1. RegularExpression Validator.
2. JavaScript.
3. jQuery.
23 Jun 2014
0 Comments   4075 Views
Here Mudassar Ahmed Khan has provided a tip on how to display multiple lines in a JavaScript Alert box or in other words how to create a multi-line Alert in JavaScript.
27 Jun 2014
0 Comments   5046 Views
Here Mudassar Ahmed Khan has explained how to display a modal popup window using window.open method in JavaScript.
JavaScript already has ShowModalDialog function but it does not work in all browser and hence I have come up with a trick where using Modal DIV background we can freeze the Parent Page content until Modal Window is closed.
11 Jul 2014
0 Comments   4123 Views
Here Mudassar Ahmed Khan has explained how to call JavaScript function from code behind using ClientScript.RegisterStartupScript before redirect to another page in ASP.Net using C# and VB.Net.

Since JavaScript function will get called only when the page is rendered while Response.Redirect will end the page response and hence we need to make use of JavaScript redirection using window.location method.
11 Jul 2014
0 Comments   2137 Views
Here Mudassar Ahmed Khan has explained how to find and access controls in Content Page using JavaScript when using Master Page using JavaScript document.getElementById function in ASP.Net.
16 Jul 2014
0 Comments   1917 Views
Here Mudassar Ahmed Khan has explained how to solve the issue JavaScript window.event.keyCode not working in Internet Explorer (IE), Mozilla FireFox, Chrome, Safari and Opera browsers.

He has also shown how to get the ASCII keyCode on JavaScript KeyPress, KeyUp and KeyDown events.
18 Jul 2014
0 Comments   1901 Views
Here Mudassar Ahmed Khan how to add multiple line breaks (<BR />) to JavaScript Alert message box.
27 Jul 2014
0 Comments   5750 Views
Here Mudassar Ahmed Khan has explained how to find and access a control such as TextBox, Button, DropDownList, RadioButton, etc. placed inside a UserControl or in other words WebUserControl (ASCX) from Parent Page (ASPX) using JavaScript in ASP.Net.

When a Control is placed inside a UserControl its ID changes when it is rendered as an HTML element and hence we need to first find the control and then determine its ClientID in order to access the control using JavaScript.
22 Aug 2014
0 Comments   5554 Views
Here Mudassar Ahmed Khan has explained how to display Session Timeout message before Session expires in ASP.Net.

The concept behind this approach is to inform the user in advance that his session is about to expire and show him a Session timeout counter.
15 Sep 2014
0 Comments   2065 Views
Here Mudassar Ahmed Khan has explained how to display images in GridView with LightBox effect whenever user clicks on images in ASP.Net using C# and VB.Net.
Thus building an Image Gallery using GridView with image enlarge feature whenever user clicks on the image.
03 Oct 2014
1 Comments   1329 Views
Here Mudassar Ahmed Khan has explained how to copy data from Excel file or Clipboard and paste it to GridView in ASP.Net using C# and VB.Net.

We cannot paste the copied data from Excel file or Clipboard to GridView and hence we need to paste the data to an ASP.Net Multiline TextBox or TextArea and then populate GridView.
04 Oct 2014
0 Comments   1138 Views
Here Mudassar Ahmed Khan has explained how to validate Terms and conditions CheckBox using JavaScript and CustomValidator in ASP.Net.