Check from JQuery if value exists in ViewBag

jenumeona

New Member
I trying to check if value in ViewBag exists or not from \[code\]JQuery\[/code\] : \[code\]if("<%: ViewBag.isSearchEnabled %>" != null && "<%: ViewBag.isSearchEnabled %>" != "True") { $("#CompanySearchPanel").hide(); } \[/code\]This should be working according to this but it is giving following error : \[code\]The call is ambiguous between the following methods or properties: 'System.IO.TextWriter.Write(string, params object[])' and 'System.IO.TextWriter.Write(char[])' \[/code\]Just for the info, this value does not exists in ViewBag.Can someone help me here ?
 
Back
Top