I have an ASP.NET MVC project and I am trying to access a model property (isNew) from the view (.cshtml) and from within javascript function so I am performing below without success:
@model My.Common.DTOs.MyDTO
function Initizalize()
{
if (!@Model.isNew)
{
DoSomeStuff(); // call another javascript function
}
}
function DoSomeStuff()
{
}