Category - JavaScript
Results 41 - 60 of 563
12 Jan 2021 12 Jan 2021 0 Comments  11241 Views
Here Mudassar Ahmed Khan has explained with an example, how to read (get) value of ViewData using JavaScript in ASP.Net MVC Razor.

The value of the ViewData will be read using Razor Syntax in JavaScript and the value will be displayed in JavaScript Alert Message Box.
07 Jan 2021 07 Jan 2021 0 Comments  4140 Views
Here Mudassar Ahmed Khan has explained with an example, how to read (get) value of ViewBag using JavaScript in ASP.Net MVC Razor.

The value of the ViewBag will be read using Razor Syntax in JavaScript and the value will be displayed in JavaScript Alert Message Box.
31 Dec 2020 31 Dec 2020 0 Comments  25842 Views
Here Mudassar Ahmed Khan has explained with an example, how to set ViewBag using JavaScript or jQuery in ASP.Net MVC Razor.

ViewBag is created on Server Side of the Web application and hence it is not possible to directly set it on Client Side using JavaScript or jQuery.

Thus, only possible way is to set it by making an AJAX call to the Controller’s Action method using jQuery AJAX function in ASP.Net MVC Razor.
31 Dec 2020 31 Dec 2020 0 Comments  11682 Views
Here Mudassar Ahmed Khan has explained with an example, how to set ViewData using JavaScript or jQuery in ASP.Net MVC Razor.

ViewData is created on Server Side of the Web application and hence it is not possible to directly set it on Client Side using JavaScript or jQuery.

Thus, only possible way is to set it by making an AJAX call to the Controller’s Action method using jQuery AJAX function in ASP.Net MVC Razor.
31 Dec 2020 31 Dec 2020 0 Comments  14604 Views
Here Mudassar Ahmed Khan has explained with an example, how to set TempData using JavaScript or jQuery in ASP.Net MVC Razor.

TempData is created on Server Side of the Web application and hence it is not possible to directly set it on Client Side using JavaScript or jQuery.

Thus, only possible way is to set it by making an AJAX call to the Controller’s Action method using jQuery AJAX function in ASP.Net MVC Razor.
30 Dec 2020 30 Dec 2020 0 Comments  2773 Views
Here Mudassar Ahmed Khan has explained with an example, how to remove White Space from beginning (start) and end of string using JavaScript.

When the Remove Button is clicked, a JavaScript function is called and the whitespace is removed from beginning (start) and end of the TextBox value using JavaScript.
26 Dec 2020 26 Dec 2020 0 Comments  14945 Views
Here Mudassar Ahmed Khan has explained with an example, how to validate TextBox on Button Click using JavaScript.

When the Validate Button is clicked, a JavaScript function is called and the TextBox is referenced and its value is compared with Empty string and if the condition tests TRUE then the TextBox is considered Empty.
24 Dec 2020 24 Dec 2020 0 Comments  12500 Views
Here Mudassar Ahmed Khan has explained with an example, how to check if TextBox is Empty using JavaScript.

When the Validate Button is clicked, a JavaScript function is called and the TextBox is referenced and its value is compared with Empty string and if the condition tests TRUE then the TextBox is considered Empty.
19 Dec 2020 19 Dec 2020 0 Comments  23139 Views
Here Mudassar Ahmed Khan has explained with an example, how to download Excel File on Button click using JavaScript.

The Excel file will be downloaded as BLOB using XmlHttpRequest AJAX call and then will be sent for download in the Browser using JavaScript.
17 Dec 2020 17 Dec 2020 0 Comments  40551 Views
Here Mudassar Ahmed Khan has explained with an example, how to download PDF File on Button click using JavaScript.

The PDF file will be downloaded as BLOB using XmlHttpRequest AJAX call and then will be sent for download in the Browser using JavaScript.
15 Dec 2020 15 Dec 2020 0 Comments  35413 Views
Here Mudassar Ahmed Khan has explained with an example, how to automatically download PDF File using JavaScript.

The PDF file will be downloaded as BLOB using XmlHttpRequest AJAX call and then will be sent for download in the Browser using JavaScript.
22 Oct 2020 22 Oct 2020 1 Comments  21699 Views
Here Mudassar Ahmed Khan has explained with an example, how to trigger TextBox OnBlur event on Server Side (Code-Behind) in ASP.Net with C# and VB.Net.

By default, there is no Server Side OnBlur event and the only similar event is provided by ASP.Net is TextChanged event but TextChanged event fires only when Text is changed while OnBlur event fires when Focus is lost despite whether Text is changed or not.
29 Sep 2020 19 Apr 2021 0 Comments  8958 Views
Here Mudassar Ahmed Khan has explained with an example, how to use Static files (Images, CSS and JS files) in ASP.Net Core.

Static files such as Image files, CSS files and JavaScript JS files does not work in ASP.Net Core unless it is placed in proper location with the project and also some settings are set.
14 Aug 2020 14 Aug 2020 0 Comments  29404 Views
Here Mudassar Ahmed Khan has explained with an example, how to print HTML Table using JavaScript.

The HTML Table will be printed with a Print Preview using JavaScript.
12 Aug 2020 12 Aug 2020 0 Comments  17830 Views
Here Mudassar Ahmed Khan has explained with an example, how to implement Google reCAPTCHA V2 (version 2.0) in ASP.Net MVC Razor.

The Google reCAPTCHA V2 (version 2.0) allows to validate the Captcha response on client side using its Callback functions.

The Google RECaptcha 2.0 will be validated on Client Side using JavaScript and jQuery in ASP.Net MVC Razor.
06 Aug 2020 19 Apr 2021 0 Comments  8188 Views
Here Mudassar Ahmed Khan has explained with an example, how to call JavaScript function with CommandField in ASP.Net GridView using C# and VB.Net.

Inside the RowDataBound event handler, the Button will be referenced and then JavaScript function will be assigned to its Client Side OnClick event handler.

Thus when the CommandField Button is clicked, the JavaScript function will be called in ASP.Net using C# and VB.Net.
06 Aug 2020 06 Aug 2020 0 Comments  13367 Views
Here Mudassar Ahmed Khan has explained with an example, how to display Delete Confirmation Box with CommandField in ASP.Net GridView using C# and VB.Net.

Inside the RowDataBound event handler, the Delete Button will be referenced and then JavaScript Confirmation Box will be assigned to its Client Side OnClick event handler.

Thus when the CommandField Delete Button is clicked, the JavaScript Confirmation Box will be displayed in ASP.Net using C# and VB.Net.
06 Aug 2020 06 Aug 2020 0 Comments  6871 Views
Here Mudassar Ahmed Khan has explained with an example, how to display Delete Confirmation Box with RowCommand in ASP.Net GridView using C# and VB.Net.

Inside the RowDataBound event handler, the Delete Button will be referenced and then JavaScript Confirmation Box will be assigned to its Client Side OnClick event handler in ASP.Net using C# and VB.Net.

Thus when the RowCommand event is triggered, the JavaScript Confirmation Box will be displayed in ASP.Net using C# and VB.Net.
30 Jun 2020 30 Jun 2020 0 Comments  9764 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) Array from JavaScript function to Code Behind (Server Side) function in ASP.Net using C# and VB.Net.

The JavaScript Array will be converted into a Comma Separated string and then saved in a HiddenField and then will be sent to Code Behind (Server Side) function through PostBack (Form Submission) in ASP.Net using C# and VB.Net.
29 Jun 2020 29 Jun 2020 0 Comments  7447 Views
Here Mudassar Ahmed Khan has explained with an example, how pass (return) value from JavaScript function to Code Behind (Server Side) function in ASP.Net using C# and VB.Net.

The returned value from JavaScript function will be saved in a HiddenField and then will be sent to Code Behind (Server Side) function through PostBack (Form Submission) in ASP.Net using C# and VB.Net.
Results 41 - 60 of 563