i tried to add , new { @Value = “test” } but failed.
then i modify the model to
private string _location = string.Empty;
public string location { get { return _location; } set { _location = value; } }
or even change the string.empty into my default text, still failed.
any idea ? Thx
Your solution is good, it should work. But as it does not, i think you are passing null model to your view – in this case it never gets to evaluating location, its null. Try passing non null model to your view.