Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/285.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# MVC4 Twitter引导程序C中文本框的格式化#_C#_Asp.net Mvc 4_Twitter Bootstrap_Visual Studio 2012_View - Fatal编程技术网

C# MVC4 Twitter引导程序C中文本框的格式化#

C# MVC4 Twitter引导程序C中文本框的格式化#,c#,asp.net-mvc-4,twitter-bootstrap,visual-studio-2012,view,C#,Asp.net Mvc 4,Twitter Bootstrap,Visual Studio 2012,View,我已经尝试了许多教程,在VS2012中将Twitter引导程序实现为MVC4,同时仍然试图保留身份验证代码(即使用互联网应用程序) 我的问题是,当我使用脚手架来完成我定义的模型的所有CRUD页面时,它没有使用twitter引导格式 以下是生成的代码: <div class="editor-label"> @Html.LabelFor(model => model.lastName) </div> <div class="

我已经尝试了许多教程,在VS2012中将Twitter引导程序实现为MVC4,同时仍然试图保留身份验证代码(即使用互联网应用程序)

我的问题是,当我使用脚手架来完成我定义的模型的所有CRUD页面时,它没有使用twitter引导格式

以下是生成的代码:

    <div class="editor-label">
        @Html.LabelFor(model => model.lastName)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.lastName)
        @Html.ValidationMessageFor(model => model.lastName)
这完美地呈现了。。。于是我试着:

        @Html.EditorFor(model => model.lastName, new { @class = "form-control" })
但后来它没有起作用

请有人建议我如何解决这个问题,或者我可以在哪里下载与MVC4集成的Twitter引导的预制模板,这样我就可以简单地开始编程了

我可以提供所需的任何其他代码


提前感谢

这是因为您使用的方法

@Html.EditorFor( Expression<Func<TModel, TValue>> expression, object additionalViewData )

这是因为您使用的方法

@Html.EditorFor( Expression<Func<TModel, TValue>> expression, object additionalViewData )

非常感谢你!!!您参考了哪些文档?换句话说,我可以参考什么来了解如何使用TBS编程?不同的html帮助程序记录在中。要了解如何使用ASP.NET和razor语法进行编程,我建议您通读感谢!!对于
@html.DropDownList(“viewbagItems”,“选择一个项目”)您将如何将TBS风格融入其中?非常感谢:)几乎每个helper都有一个HelperFor方法,只需查找接受“htmlAttributes”参数的方法重载。那将是定义自定义样式的正确位置。非常感谢!!!您参考了哪些文档?换句话说,我可以参考什么来了解如何使用TBS编程?不同的html帮助程序记录在中。要了解如何使用ASP.NET和razor语法进行编程,我建议您通读感谢!!对于
@html.DropDownList(“viewbagItems”,“选择一个项目”)您将如何将TBS风格融入其中?非常感谢:)几乎每个helper都有一个HelperFor方法,只需查找接受“htmlAttributes”参数的方法重载。这将是定义自定义样式的正确位置。
@Html.TextBoxFor( model => model.lastname, new { @class = "form-control" })