.net mvc 怎么连接到新创建的视图页面
新创建的控制页和视图页 在其他aspx页面中连接不到新创建 的aspx页 求指教。。。
[解决办法]
http://msdn.microsoft.com/en-us/library/dd505070(v=vs.118).aspx
public static MvcHtmlString ActionLink(
this HtmlHelper htmlHelper,
string linkText,
string actionName,
string controllerName
)
例如
@Html.ActionLink("About this Website", "About", "Home")
[解决办法]
看看你生成的html代码是否正确。
[解决办法]
控制器:return RedirectToAction("Delete");
视图:@Html.ActionLink("跳转", "Delete",new {id=item.id})
[解决办法]
@Html.ActionLink和window.location等跳转都是一样的
基本上是控制器名称/视图页面名称
[解决办法]
View中就可以。