Category - Session
Results 21 - 36 of 36
18 Nov 2021 18 Nov 2021 0 Comments  14623 Views
ASP.Net  MVC  Session  Core
Here Mudassar Ahmed Khan has explained with an example, how to get and set Session object (variable) in ASP.Net Core MVC.
18 Nov 2021 18 Nov 2021 0 Comments  23610 Views
ASP.Net  MVC  Session  Core
Here Mudassar Ahmed Khan has explained, how to set Session Timeout value in ASP.Net Core application.

Unlike previous ASP.Net applications, the Session Timeout value is set inside the Startup.cs class in ASP.Net Core applications.
18 Nov 2021 18 Nov 2021 0 Comments  11841 Views
ASP.Net  MVC  Session  Core
Here Mudassar Ahmed Khan has explained, how to access HttpContext.Current.Session in .Net Core application.

Unlike previous ASP.Net applications, the Session object is not available under the HttpContext.Current property, instead it is available in the HttpContext class in ASP.Net Core applications.
18 Nov 2021 18 Nov 2021 0 Comments  11767 Views
ASP.Net  MVC  Session  Core
Here Mudassar Ahmed Khan has explained, how to solve the following error in ASP.Net Core.

System.InvalidOperationException: Session has not been configured for this application or request.

The above error occurs when Session state is used in ASP.Net Core application without configuring the application.

This article will illustrate how to configure and enable Session state in ASP.Net Core applications.
18 Nov 2021 18 Nov 2021 0 Comments  4675 Views
Here Mudassar Ahmed Khan has explained, how to enable Session in ASP.Net Core.

By default, Session State is disabled in ASP.Net Core applications i.e. ASP.Net Core MVC and ASP.Net Core Razor Pages.

This article will cover the steps to enable Session Sate in ASP.Net Core applications.
28 Oct 2021 28 Oct 2021 0 Comments  7306 Views
Here Mudassar Ahmed Khan has explained with an example, how to get HttpContext.Current.Session value in JavaScript or jQuery with ASP.Net.

Session object or Session variable is stored on Server and hence in order to get its value in JavaScript or jQuery, an AJAX call will be done to the Server Side method in ASP.Net using C# and VB.Net.
28 Oct 2021 28 Oct 2021 0 Comments  6608 Views
Here Mudassar Ahmed Khan has explained with an example, how to get Session value in JavaScript in ASP.Net MVC Razor.

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

Thus, the solution is to make an AJAX call using jQuery AJAX function and pass the value of JavaScript variable to a Controller and inside the Controller the value is retrieved from Session object in ASP.Net MVC Razor.
20 Oct 2021 20 Oct 2021 0 Comments  5610 Views
Here Mudassar Ahmed Khan has explained with an example, how to get Session value inside Controller in ASP.Net MVC Razor.
20 Oct 2021 21 Oct 2021 0 Comments  4175 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) Session value from one Controller to another Controller in ASP.Net MVC Razor.
24 May 2019 24 May 2019 2 Comments  28900 Views
Here Mudassar Ahmed Khan has explained with an example, how to store Model in Session inside Controller and display in View in ASP.Net MVC Razor.

This article will illustrate how to save Model object in Session variable inside Controller and then access it using Razor syntax inside View in ASP.Net MVC Razor.
23 May 2019 23 May 2019 0 Comments  7620 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) data from Controller to View using Session in ASP.Net MVC Razor.
23 May 2019 23 May 2019 0 Comments  27315 Views
Here Mudassar Ahmed Khan has explained a short tutorial with example on how to use Session in ASP.Net MVC Razor.

Session is derived from the HttpSessionStateBase class and is used for persisting data i.e. State Management across requests in ASP.Net MVC Razor.
22 May 2019 03 Jun 2019 0 Comments  29112 Views
Here Mudassar Ahmed Khan has explained with an example, how to set Session variable using jQuery in ASP.Net using C# and VB.Net.

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

Thus, the solution is to make an AJAX call using jQuery AJAX and pass the value of JavaScript variable to a Web Method and inside the Web Method, the value will be set in Session variable in ASP.Net using C# and VB.Net .
21 May 2019 21 May 2019 0 Comments  26300 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  29964 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.
16 May 2018 16 May 2018 0 Comments  18554 Views
Here Mudassar Ahmed Khan has explained with an example, how to bind (populate) GridView using Session data in ASP.Net using C# and VB.Net.

The concept is to create a dynamic DataTable, save it to Session and bind it to GridView.

Later whenever a new row is added, the DataTable is fetched from Session, it is updated and then again used to bind the GridView.
Results 21 - 36 of 36