Hi
In HttpException it is showing Null
Global.Asax
protected void Application_Error(object sender, EventArgs e)
{
Exception exception = Server.GetLastError();
if (exception != null)
{
Response.Clear();
HttpException httpException = exception as HttpException;
if (httpException != null)
{
Response.Clear();
Server.ClearError();
Response.Redirect("/Error/Index?message=exception.Message");
}
}
}
View
I have View as _CreateEdit
public ActionResult CreateEdit(string Id)
{
Id = Id.Trim();
if (String.IsNullOrEmpty(Id))
{
return PartialView("_CreateEdit1", new Location());
}
else
{
return PartialView("_CreateEdit1", dbLocation.GetById(Id));
}
}
Thanks