Click here to Skip to main content
15,912,294 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
in mvc how to get current culture ?

in my application i am maintain culture name in session from login page . now i redirect to next page i want to get the current culture name which i am maintained in session using java script or jquery only?
Posted
Comments
Mahesh Bailwal 20-Jun-13 5:02am    
why you want to get it through JavaScript/jQuery?

1 solution

i solved my self

in java script i wore like this
JavaScript
var value= '@Session["culture"]';

Note : should maintain quotation marks before and after session
 
Share this answer
 
v2
Comments
Prasad Khandekar 20-Jun-13 7:29am    
Hello Sai,

It's not the javascript it's the server side code and this is how it's done in ASP.NET MVC.
sai sagar 20-Jun-13 7:55am    
hi ,
i wrote code like this
<script>
$('#ddl').change(function () {

var val= '@Session["culture"]';
alert(''@Session["culture"]');
}
});
</script>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900