[英]MVC2 Url with a dash
I have a view (page) called DataGrowth.aspx, how can I display it in the browser like so: 我有一个名为DataGrowth.aspx的视图(页面),如何在浏览器中显示它,如下所示:
http://localhost/Solutions/Data-Growth/ http:// localhost / Solutions / Data-Growth /
Trying to do this with ASP.Net MVC2 尝试使用ASP.Net MVC2做到这一点
Thanks 谢谢
You add an 您添加一个
[ActionName("Data-Growth")]
attribute to the Controller Action. 属性的控制器动作。 You can then choose to rename your View to Data-Growth.aspx or simply modify your return statement to 然后,您可以选择将“视图”重命名为Data-Growth.aspx或仅将return语句修改为
return View("DataGrowth");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.