日期:2014-05-17  浏览次数:20440 次

.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等跳转都是一样的
基本上是控制器名称/视图页面名称
------解决方案--------------------
引用:
Quote: 引用:

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")


这个在哪写?


View中就可以。