I'm developing an application using MVC/Jquery, i able to get a value from controller to view by below getJson code,
$.getJSON('@Url.Action("SampleData", "Home")', { pageNum: 1, pageSize: PageSize, accountDetailsType: AccountDetailsType }, function (result) {
//total number of records
totalRecords = result.total;
//total records
records = result.data;
$('#Description').val(result.reportType);
$('#Description') gives me desired data, which i can check by below textbox in view,
@Html.TextBox("Description")
now, question is, is there any way to put this value in any variable/hidden filed, so that base on that value..i can show/hide some control in my view...
similar like,
if(("Description") = "VB")
{
}
else
{
}