I have the following statement:
<script type="text/javascript">
@{
string area = ViewContext.RouteData.DataTokens["area"] != null ?
ViewContext.RouteData.DataTokens["area"].ToString().ToLower() :
string.Empty;
}
var area = "@area";
</script>
and my Google Chrome, if I call area
variable in console, displays like:
" != null ? ViewContext.RouteData.DataTokens["area"].ToString().ToLower() : """
which is a part of C# code ...
Where is the mistake ?