0

I have a large MVC project that I am trying to find all the different pieces / parts. Some of the stuff has been straight forward such as the controllers folder has......the controllers in it. The model folder and view folder their respective files. Now my MVC knowledge is rusty but I do vaguely remember html.partial. So the following line:

@Html.Partial("Head")

Head would be the partial view name and indeed I find a cshtml view by the name Head. So I then run across this line:

@Html.Widget("head_html_tag")

and I would have expected to find the widget zone "head_html_tag" but a global search in the entire project comes up empty.

So where / how does this widget get generated so I can look at the code that renders it? I understand this question may be rather difficult because you can't go through the project for me. So what I am really needing is to know generally about widgets. Are they going to be located in a class file and generated on the fly? Are they in views or perhaps, although I doubt it, a part of the model?

Please if you think this question dumb enough to down vote it then let me know what an idiot I am with the answer along with your down vote.

Thank You JB

4

2 回答 2

1

Widgets is not a standard part of MVC.

You could check if the project has built an infrastructure for widgets or maybe if you have some referenced assemblies or NuGet packages for that.

于 2013-04-18T22:57:26.640 回答
1

If you install a tool like ReSharper you can hit CTRL-Click on the Widget method to go to definition. If it isn't a 3rd party package it could be an extension method on the HtmlHelper class within your project.

于 2013-04-18T22:59:37.183 回答