English 中文(简体)
隐蔽的输入(DisplayValue)需要列入《电子数据交换》的错误观点,但需要列入《电子数据集》。
原标题:HiddenInput(DisplayValue) needs to be in the CREATE View false but in the LIST View true

我很抱着一种观点,即我想隐藏在《土地权利声明》观点中,但在LIST/Index观点中显示的财产模式。 该表是开放的、失败的、经过教育的。

  • For the CREATE View the editor/control should not be visible.
  • For the LIST View the editor/control should be a selectable combobox

Can this be done somehow with the HiddenInput attribute?

如果无法做到这一点,我至少想在这两种观点中看到这一点,但残疾/母亲控制(标签,而不是 com子)。

我使用的是p.net mvc 4.0。

最佳回答

实际上,你们应当使用不同的观点模式。 摘录:view model的第一字为view,意思是,你对每种观点界定了一种观点模式。 因此,你将有一个<代码>CreateViewModel,用于Create的观察,而无所涉不动产和。 ListViewModel with the enum property that will be used in the Index view.

守则审查 我认为,许多开发商试图利用不同观点的相同模式,最后采用一些令人憎恶的逻辑,因为这些模式根本无法适应这些观点。 他们试图藏匿,试图写写写,做验证,通常在夜里。

问题回答

暂无回答




相关问题
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. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签