开发者

Choosing user control

I am using MVC3 Razor for my project. I am new to this technology. I need to create开发者_运维问答 a user control. When i am trying to add a new item it is giving me the options like

  1. MVC3 partial page(Razor)
  2. MVC3 View usercontrol(Aspx)
  3. Web User Control

Which one i should select? and which folder it should be placed? in Shared folder or some other folder?


You should select MVC 3 partial page (Razor). You should just be aware that the Razor view engine does not support user controls in the way that WebForms does.

You can place it in the Shared folder if it can be used from multiple different controllers. If not, you should place it in the controller-specific views folder.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜