在ASP.NET网络表格中,i 很容易做到:
[...]
try
{
DateTime date = Convert.ToDateTime("abc");
}
catch(Exception ex)
{
lblErrorMessage.Text = ex.Message;
}
Now the question is:How can i do the same in ASP.NET MVC? Ive been looking for it and all i found is [HandleError] attribute.I dont want to redirect user to a "Error.aspx" View if an exception occurs.I want to show error messages in the same page like in Web Forms.
任何伊德亚斯人