I have the a partial view use to edit the person details in the popup dialog, but they also want to have "display" mode, which disabled all editable textbox, dropdownlistbox and links in the view, can someone tell me how easy I can achieve this (not using javascript)
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can use the same view with conditionals to disable the editor, but that gets messy really quickly. A better approach is to have a seperate cshtml file for the editable view and specify the appropriate view name in the call to View or RenderPartial.
标签:
asp.net-mvc-3