I am new to mvc and jquery
In my controller I have
ViewData[“a”]=”true”;
I want to access the viewdata object in jquery
<% if(ViewData[“a”] == “true”)%>
{
$(‘#div1’).show();
}
The above jquery doesn’t work for me
Can someone please shed light on this.
Thanks in advance
I am new to mvc and jquery In my controller I have ViewData[a]=true; I
Share
1 Answer