Results 16 - 20 of 492
21 May 2019 21 May 2019 0 Comments  3751 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.
10 May 2019 10 May 2019 0 Comments  2034 Views
Here Mudassar Ahmed Khan has explained with an example, how to convert (export) HTML to Word Document in ASP.Net MVC Razor.

First the Grid (Html Table) will be populated from database using Entity Framework.

When the Export Button is clicked, the HTML string will be sent to the Controller and will be downloaded as Word file in ASP.Net MVC Razor.
18 Apr 2019 19 Apr 2019 0 Comments  1700 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) Array from Controller to View using ViewBag in ASP.Net MVC Razor.

The List Collection will be populated from Database using ADO.Net inside the Controller and it will be converted to Array and passed to the View using ViewBag.

Later in View, the Array will be iterated and the data will be displayed with the help of HTML Table in ASP.Net MVC Razor.
18 Apr 2019 19 Apr 2019 0 Comments  2485 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) List from Controller to View using ViewBag in ASP.Net MVC Razor.

The List Collection will be populated from Database using ADO.Net inside the Controller and it will be passed to the View using ViewBag.

Later in View, the List Collection will be iterated and the data will be displayed with the help of HTML Table in ASP.Net MVC Razor.
18 Apr 2019 19 Apr 2019 0 Comments  3317 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) DataTable from Controller to View in ASP.Net MVC Razor.

The DataTable will be populated from Database using ADO.Net inside the Controller and it will be passed to the View as Model.

Later in View, the DataTable will be iterated and the data will be displayed with the help of HTML Table in ASP.Net MVC Razor.
Results 16 - 20 of 492