Quantcast
Channel: ASPSnippets RSS Feed
Viewing all articles
Browse latest Browse all 4751

Set Session variable in JavaScript using jQuery in ASP.Net MVC

$
0
0
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.

Viewing all articles
Browse latest Browse all 4751

Trending Articles