我的businesslogic类中有这样的代码:
if (userList != null) {
pass = userList.Password;
}
else
{
var context = new RequestContext(
new HttpContextWrapper(System.Web.HttpContext.Current),
new RouteData());
var urlHelper = new UrlHelper(context);
var url = urlHelper.Action("Login", "Account");
// how to throw tempdata like this to: TempData["message"] = "Error";
System.Web.HttpContext.Current.Response.Redirect(url);
}
我可以将businessdic类的tempdata抛给控制器吗?