Category - MVC
Results 16 - 20 of 663
02 Jan 2021 02 Jan 2021 0 Comments  330 Views
ASP.Net  MVC  Core
Here Mudassar Ahmed Khan has explained with an example, how to read (get) value from AppSettings.json file inside Startup.cs class in .Net Core and ASP.Net Core MVC.

Microsoft has replaced System.Configuration class with IConfiguration interface in .Net Core 2.0.
31 Dec 2020 31 Dec 2020 0 Comments  469 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  465 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  414 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.
23 Dec 2020 23 Dec 2020 0 Comments  542 Views
Here Mudassar Ahmed Khan has explained with an example, how to use Keep and Peek functions of TempData in ASP.Net MVC Razor.

The Keep function is used to preserve the data of TempData object even after the value is read while the Peek function is used to read the value without clearing it.
Results 16 - 20 of 663