I am using ViewBag
value as follows :
var date = "@ViewBag.fromDateForEditMode"
$('#FromDate').val(date);
All I am getting is @ViewBag.fromDateForEditMode
and no value.
The Razor engine doesn't execute when MVC is rendering an HTML file, so nothing will parse @ViewBag.fromDateForEditMode
and replace it with the ViewBag
property value :)