在从《示范法》中产生隐藏的变量时,只使用变数名称。 如果使用该模型的带宽等级/结构,则使用类别/结构名称。 这有助于张贴表格,因为该系统更容易看到其填充的物体。
然而,在使用部分观点时,我常常通过该模式的某些部分,这意味着暗藏的田地不再有其固定的地段/地名。 这可能在重新确定员额参数时造成冲突或数据损失。 是否有任何办法获得Html。 隐蔽(或等同)把阶级/建筑名称放在前面?
在从《示范法》中产生隐藏的变量时,只使用变数名称。 如果使用该模型的带宽等级/结构,则使用类别/结构名称。 这有助于张贴表格,因为该系统更容易看到其填充的物体。
然而,在使用部分观点时,我常常通过该模式的某些部分,这意味着暗藏的田地不再有其固定的地段/地名。 这可能在重新确定员额参数时造成冲突或数据损失。 是否有任何办法获得Html。 隐蔽(或等同)把阶级/建筑名称放在前面?
两种选择:
使用<代码>Html.EditorFor(>,而不是直截了部分。 编辑 考虑用来获取财产的前fix/eira,或
操纵 TemplateInfo.Html Field Prefix
, 然后再将儿童部分纳入其中,这将导致儿童的每一领域自动得到确定。
如果您申请选择(2),考虑宣布一名助手,填写<代码>。 Html FieldPrefix 操纵,以防你重新制定(Iripped the Code for )。 Child PrefixScope
below from some where others on some time before.
指称:
static public class MyHtmlHelpers
{
public static IDisposable BeginChildScope<TModel>(this HtmlHelper<TModel> html, string parentScopeName)
{
return new ChildPrefixScope(html.ViewData.TemplateInfo, parentScopeName);
}
private class ChildPrefixScope : IDisposable
{
private readonly TemplateInfo _templateInfo;
private readonly string _previousPrefix;
public ChildPrefixScope(TemplateInfo templateInfo, string collectionItemName)
{
this._templateInfo = templateInfo;
_previousPrefix = templateInfo.HtmlFieldPrefix;
templateInfo.HtmlFieldPrefix = collectionItemName;
}
public void Dispose()
{
_templateInfo.HtmlFieldPrefix = _previousPrefix;
}
}
}
What is the use of default keyword in C#? Is it introduced in C# 3.0 ?
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. ...
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 ...
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 ...
I have two EF entities. One has a property called HouseNumber. The other has two properties, one called StartHouseNumber and one called EndHouseNumber. I want to create a many to many association ...
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, ...
Since I cannot order my dictionary, what is the best way of going about taking key value pairs and also maintaing an index?
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. ...