Category - JavaScript
Results 6 - 10 of 523
31 Dec 2020 31 Dec 2020 0 Comments  354 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  351 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  338 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  411 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  365 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.
Results 6 - 10 of 523