English 中文(简体)
如何确定哪些观点正在退回
原标题:How to determine which view is being returned

我有一个控制器(AccountController.cs),其最后发言Index方法为return 观点:

在全球范围。 作为我能看到的唯一一条路线,就是:

routes.MapRoute("AccountIndex", "Account/Index", new {controller = "Account", action = "Index"});

有一种意见是多方面的,但似乎只包含部分观点和主人。 当我右翼和选择“Go To View”时,我收到“没有发现观点”的信息,尽管似乎在所有控制器方法上都这样做。

So where can I find this view? Where is it located? Any pointers?

最佳回答

除非<代码>model是<>string,否则该编码可能会对<代码>Index部分表示。

问题回答

when you don t have view for controller action (for example: Index) you can click right mouse button on "return View();" in controller method to automatically generate view. by default if you have controller with name "AccountController" and action "Index" the view should be in ViewAccountIndex.cshtml [if you use razor].





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签