Category - JavaScript
Results 81 - 100 of 563
26 Nov 2019 26 Nov 2019 0 Comments  8205 Views
Here Mudassar Ahmed Khan has explained with an example, how to multiply two GridView columns and display result in third column using JavaScript and jQuery in ASP.Net.

This example will illustrate by multiplying Price column with Quantity column and displaying the result in Total column using JavaScript and jQuery in ASP.Net.
15 Nov 2019 15 Nov 2019 0 Comments  27808 Views
Here Mudassar Ahmed Khan has explained with an example, how to implement Indian PAN Card Number validation using Regular Expression (Regex) in JavaScript.

The PAN Card Number entered in the TextBox will be validated on Button click using Regular Expression (Regex) in JavaScript.
11 Nov 2019 11 Nov 2019 0 Comments  12104 Views
Here Mudassar Ahmed Khan has explained with an example, how to validate TextBox inside GridView using JavaScript on Button Click in ASP.Net.

When the Submit Button is clicked, using a FOR loop, all the TextBoxes inside the GridView will be validated and respective Error messages will be displayed using JavaScript in ASP.Net.
17 Oct 2019 17 Oct 2019 0 Comments  24825 Views
Here Mudassar Ahmed Khan has explained with an example, how to activate TextBox if another option is selected in DropDownBox using JavaScript and jQuery.

When the Other (option) in DropDownList is selected, the TextBox will be enabled else disabled.
04 Oct 2019 04 Oct 2019 0 Comments  21364 Views
Here Mudassar Ahmed Khan has explained with an example, how to check for duplicate values while inserting in GridView without SQL in ASP.Net using C# and VB.Net.

When the Add Button is clicked, the values of TextBoxes will be compared with the Row values of the GridView using ASP.Net CustomValidator and JavaScript and if the values are duplicate, error messages will be displayed.
24 Jul 2019 24 Jul 2019 1 Comments  50000 Views
Here Mudassar Ahmed Khan has explained with an example, how to Toggle i.e. show and hide HTML DIV on Button Click using JavaScript and jQuery.

When the Button is clicked, the HTML DIV will be shown and when again the same Button is clicked the HTML DIV will be hidden.
22 Jul 2019 22 Jul 2019 0 Comments  23024 Views
Here Mudassar Ahmed Khan has explained with an example, how to show and hide HTML DIV on Button Click using JavaScript and jQuery.

When the Yes Button is clicked, the HTML DIV will be shown and when the No Button is clicked the HTML DIV will be hidden.
22 Jul 2019 22 Jul 2019 0 Comments  23391 Views
Here Mudassar Ahmed Khan has explained with an example, how to enable and disable TextBox on Button Click using JavaScript and jQuery.

When the Yes Button is clicked, the TextBox will be enabled and when the No Button is clicked the TextBox will be disabled.
18 Jul 2019 18 Jul 2019 0 Comments  36667 Views
Here Mudassar Ahmed Khan has explained with an example, how to show and hide TextBox on Button Click using JavaScript and jQuery.

When the Yes Button is clicked, the TextBox will be shown and when the No Button is clicked the TextBox will be hidden.
11 Jul 2019 11 Jul 2019 0 Comments  6461 Views
Here Mudassar Ahmed Khan has explained with an example, how to enable (activate) a TextBox when Other option is selected in DropDownList (HTML SELECT) using JavaScript and jQuery.
10 Jul 2019 10 Jul 2019 1 Comments  38943 Views
Here Mudassar Ahmed Khan has explained with an example, how to enable and disable a TextBox when DropDownList (HTML SELECT) is changed i.e. when an item (option) is selected using JavaScript and jQuery.

When the Other (option) in DropDownList is selected, the TextBox will be enabled else disabled.
09 Jul 2019 10 Jul 2019 0 Comments  41756 Views
Here Mudassar Ahmed Khan has explained with an example, how to enable and disable a TextBox when RadioButton is clicked i.e. checked (selected) and unchecked (deselected) using JavaScript and jQuery.

When the RadioButton is clicked based on whether the YES RadioButton is checked (selected) or unchecked (deselected), the TextBox will be enabled or disabled.
26 Jun 2019 26 Jun 2019 0 Comments  5179 Views
Here Mudassar Ahmed Khan has explained with an example, how to validate Group of RadioButtons (Multiple RadioButtons) using JavaScript.

When the Submit Button is clicked, all the RadioButtons in the Group will be referenced and using FOR loop, it will be validated that one RadioButton must be checked from the Group of RadioButtons using JavaScript.
25 Jun 2019 25 Jun 2019 0 Comments  3065 Views
Here Mudassar Ahmed Khan has explained with an example, how to validate Group of CheckBoxes (Multiple CheckBoxes) using JavaScript.

When the Submit Button is clicked, all the CheckBoxes in the Group will be referenced and using FOR loop, it will be validated that at-least one CheckBox is checked from the Group of CheckBoxes using JavaScript.
07 Jun 2019 07 Jun 2019 0 Comments  11751 Views
Here Mudassar Ahmed Khan has explained with an example, how to implement AJAX Call using XML using JavaScript XmlHttpRequest (XHR) in ASP.Net MVC Razor.

The Controller’s Action method will be called using JavaScript XmlHttpRequest (XHR) and JSON from View in ASP.Net MVC Razor.
29 May 2019 29 May 2019 2 Comments  35071 Views
Here Mudassar Ahmed Khan has explained with an example, how to open Page (View) in New Tab (Window) on Button Click in ASP.Net MVC Razor.

Button cannot be used to open Page (View) in New Tab (Window) and hence using JavaScript’s window.open function, the Page (View) will be opened in New Tab (Window) on Button Click in ASP.Net MVC Razor.
21 May 2019 21 May 2019 0 Comments  25131 Views
Here Mudassar Ahmed Khan has explained with an example, how to set Session variable in JavaScript using jQuery in ASP.Net MVC Razor.

JavaScript is a Client Side language and hence directly it is not possible to set Session variable in JavaScript.

Thus, the solution is to make an AJAX call using jQuery AJAX and pass the value of JavaScript variable to a Controller and inside the Controller the value will be set in Session variable in ASP.Net MVC Razor.
20 May 2019 20 May 2019 0 Comments  28779 Views
Here Mudassar Ahmed Khan has explained with an example, how to set Session variable in JavaScript in ASP.Net using C# and VB.Net.

JavaScript is a Client Side language and hence directly it is not possible to set Session variable in JavaScript.

Thus, the solution is to make an AJAX call using XmlHttpRequest (XHR) and pass the value of JavaScript variable to a WebMethod and inside the WebMethod the value will be set in Session variable in ASP.Net using C# and VB.Net.
15 May 2019 15 May 2019 0 Comments  25456 Views
Here Mudassar Ahmed Khan has explained with an example, how to dynamically populate Year in DropDownList i.e. HTML SELECT element using JavaScript.

Inside the window.onload event handler, the DropDownList i.e. HTML SELECT element will be referenced and using a For Loop, one by one Year values will be appended to the DropDownList using JavaScript.
14 May 2019 14 May 2019 0 Comments  19350 Views
Here Mudassar Ahmed Khan has explained with an example, how to redirect (go) back to Previous Page without Refresh using JavaScript.

It is NOT possible to redirect (go) back to Previous Page without refreshing as whenever Page is redirected there will always be a Page reload in browser i.e. old page will be removed and the new Page from Browser History will be loaded in Browser.
Results 81 - 100 of 563