腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
无法
将
作为
HtmlAttributes
的
RouteValueDictionary
绑定
到
EditorFor
c#
、
asp.net-mvc
、
razor
、
asp.net-mvc-5
、
editorfor
我正在尝试创建一个简单
的
HtmlHelper来创建一个处理List<T>索引childs
的
EditorFor
。foreach (var attr in new
RouteValueDictionary
(
htmlAttributes
).Where(attr => !()); } 在视图中,我像这样使用它 @Html.
EditorFor
(x => x.GradienteDeEntrada, x => x.Id) 这里我
的
问题是,生成
的<
浏览 29
提问于2020-01-24
得票数 2
回答已采纳
2
回答
在
htmlAttributes
中使用
EditorFor
嵌套字典
的
ASP.MVC5.2
c#
、
asp.net
、
asp.net-mvc
、
editorfor
、
asp.net-mvc-5.2
我想将嵌套字典传递
到
EditorFor
viewData中。@{ var
htmlAttributes
= new
RouteValueDictionary
(); viewData["
htmlAttributes
"] = <
浏览 3
提问于2014-12-09
得票数 0
回答已采纳
2
回答
如何在自定义帮助器中合并
htmlAttributes
asp.net-mvc
、
attributes
、
extension-methods
我有一个自定义帮助程序,在这里我接收
作为
参数
的
htmlAttributes
: ...MergeAnonymous方法必须以“new{ @class) var dict1 = new
RouteValueDictionary
(obj
浏览 0
提问于2014-10-07
得票数 7
回答已采纳
1
回答
MVC
EditorFor
自定义助手
c#
、
asp.net-mvc
、
editorfor
我正在尝试为
EditorFor
创建一个自定义助手。我想从模型中获取字符串长度,并将其添加到html属性中。
RouteValueDictionary
viewData = HtmlHelper.AnonymousObjectToHtmlAttr
浏览 5
提问于2016-11-16
得票数 0
2
回答
除了
htmlAttributes
MVC 5.2之外
的
附加EditorTemplate
.net
、
asp.net-mvc
、
razor
yyyy-MM-dd HH:mm") : string.Empty), new @class = "form-control datetimepicker"当我使用Html.
EditorFor
时,这是正确
的
。但是,在我看来,我想将附加
的
htmlAttributes
传递给对象。查看:
htmlAttribute
浏览 5
提问于2017-10-13
得票数 1
1
回答
用DropDownListFor()/
EditorFor
()在MVC视图上设置TAB顺序?
asp.net-mvc
、
razor
、
asp.net-mvc-5
、
tab-ordering
从视觉上讲,在我
的
MVC视图中,我有大约20个按标准垂直顺序排列
的
字段,前8个左右在右边
的
<div>组中有可选
的
Create框。我
的
默认选项卡顺序当前点击我
的
第一个下拉列表,然后右转到下一个,然后右转等等。我想要做
的
是
将
tab顺序设置
到
它沿着我
的
各个字段
的
位置,并将Create框保留为用户可选
的
(或在选项卡顺序
的
末尾)。虽然对此进行了大量
的</
浏览 2
提问于2015-12-31
得票数 0
3
回答
TextBoxFor vs
EditorFor
和
htmlAttributes
vs additionalViewData
asp.net-mvc-3
为了演示一个问题,我创建了一个默认
的
MVC3项目(使用razor)。name field is required." id="UserName" name="UserName" title="ABC" type="text" value="" /> @Html.
EditorFor
(m => m.UserName, new { title = "ABC&qu
浏览 2
提问于2011-06-15
得票数 30
2
回答
如何在
EditorFor
中禁用输入域
的
自动完成功能?
html
、
asp.net-mvc-2
、
autocomplete
、
editorfor
<%= Html.
EditorFor
(product => product.Name) %>我错过了什么?<%= Html.
EditorFor
(product => product.Name, new { autocomplete = "off" } ) %>:我正在寻找一个用于
EditorFor
的
扩展方法,它接受属性
的
键/值字典,所以我可以这样
浏览 5
提问于2010-07-22
得票数 5
回答已采纳
2
回答
MVC
EditorFor
可选ReadOnly
c#
、
asp.net-mvc
、
mvc-editor-templates
、
readonly-attribute
昨天,经过广泛
的
测试,我得到了以下选项,可以根据ViewBag.CanEdit
的
值
将
readonly属性应用于控件;基于这个测试
的
成功,我在我
的
项目的几个部分实现并测试了它。今天,我开始了代码
的
一个新部分,并开始实现相
浏览 0
提问于2016-01-15
得票数 2
回答已采纳
1
回答
HtmlAttributes
在asp.net核中
的
合并
asp.net-core-1.1
我开始了
将
应用程序切换到Asp.net核心1.1(.net框架4.5.2)
的
过程。htmlhelperExtension对我不起作用。public static partial class HtmlHelperExtensions //https://cpratt.co/html-
editorfor
-and-
htmlattributes
之后,它引用了
RouteValueDictionary
htmlAttributes
=行,
浏览 2
提问于2017-05-13
得票数 3
1
回答
Asp.Net MVC 5在下拉SelectedItem更改时填充
EditorFor
jquery
、
asp.net-mvc
、
html.dropdownlistfor
、
editorfor
当我从下拉菜单中选择一个产品时,我需要填充Html.
EditorFor
控件。我是JQuery和Ajax
的
新手。我
的
下拉列表:@onchange= "FillPrice()", id= "ProductId" })@Html.
浏览 0
提问于2015-09-30
得票数 1
回答已采纳
1
回答
DateTime值不正确地
绑定
小时
asp.net-mvc
、
datetime
、
data-binding
、
datetime-format
、
editorfor
我在订单表单页面上有一个@HTML.
EditorFor
,用户在该页面中选择一个时间来获取订单。我将该值保存在会话中,然后由“审阅”页面获取。用户可以决定编辑将其发送回order表单
的
位置,并
绑定
其以前
的
值。除拾取时间外,所有其他值都正确
绑定
,但仅
绑定
小时。分钟
绑定
正确,但出于某种原因,小时总是显示为3。我在调试时观察了该值;即使在
绑定
之后,该值也总是正确
的
,但它始终显示为3。@Html.
EditorFor
(model
浏览 5
提问于2018-03-05
得票数 0
回答已采纳
2
回答
将
<i>与Html.Actionlink集成
html
、
css
、
html.actionlink
ObjectModelLibrary.Law)ViewData["currentLaw"]).LawID }, new { @class = "btn btn-primary icon-plus" })任何帮助都将不胜感激。 谢谢。BeginActionLink<TModel>(this HtmlHelper&l
浏览 3
提问于2014-06-10
得票数 1
回答已采纳
2
回答
asp.net mvc父子视图与父视图更新子视图
c#
、
asp.net-mvc
、
asp.net-mvc-4
理想情况下,我想要
的
是父视图上
的
submit按钮来保存子值。 <div class="col-md-4"> <div class="col-md-4"
浏览 2
提问于2015-04-07
得票数 2
回答已采纳
2
回答
EditorFor
扩展在Asp.Net MVC 5.1中不适用于
htmlAttributes
asp.net
、
asp.net-mvc
、
razor
、
asp.net-mvc-5.1
、
editorfor
}); //searching for working code as replacement for this line
htmlAttributes
: { class = "form-control" } 这是因为我有一个默认
的
表单控件类
浏览 4
提问于2016-06-03
得票数 2
回答已采纳
1
回答
如何让密码和电子邮件表单框在razor中看起来相同
html
、
model-view-controller
、
razor
在中,你可以看到在我
的
网页上,密码编辑框看起来与电子邮件文本编辑框不同。我查看了将相同
的
框同时用于密码和文本编辑框
的
示例,发现了。这表明,通过使用form-control类,它们看起来是一样
的
。但是,我
的
cshtml代码也让我
的
两个编辑器都使用了form-control类,如下所示 @Html.LabelFor(model => model.Email, <em
浏览 11
提问于2020-02-14
得票数 1
回答已采纳
2
回答
使用ASP.net标识禁用MVC视图中基于角色授权
的
输入字段
javascript
、
c#
、
asp.net-mvc
、
asp.net-identity
在我们
的
MVC应用程序中,我重写了基于角色
的
授权
的
AuthorizeAttribute类。现在我必须禁用编辑ActionLink按钮,以查看特定
的
角色,如何实现这一点?@Html.Actionlink("Edit", "Edit", "Controller", new{@class = "btn btn-success"}) 现在,它会自动
将
视图重定向
到
登录页面。
浏览 2
提问于2015-08-08
得票数 4
回答已采纳
1
回答
RouteValueDictionary
到
HtmlAttributes
c#
、
razor
、
tagbuilder
我知道我可以通过这样
的
操作
将
html属性添加到标记中:tag.MergeAttributes(
htmlAttributes
);输出: <div data-foo="bar"><也许是这样
浏览 5
提问于2013-09-04
得票数 2
回答已采纳
1
回答
htmlAttributes
in ActionLink可拓方法MVC5
asp.net-mvc
、
razor
、
html-helper
我使用扩展方法在菜单上
的
活动链接上维护css类。 但是,我遇到了
htmlAttributes
和对象值导致错误
的
问题。我在Razor页面中有下面的内容,但我不明白我是如何解析
htmlAttributes
的
。,该方法应该
将
IDictionary<object, string>
作为
htmlAttributes
的
类型。新
的
{ @class = "dropdown-toggle caret",
浏览 6
提问于2016-07-08
得票数 2
回答已采纳
1
回答
如何
将
Kendo Textbox控件
绑定
到
其数据?
c#
、
asp.net-mvc
、
kendo-ui
、
telerik
、
kendo-asp.net-mvc
我不确定如何将它们
的
控件
绑定
到
数据。这个生成
的
脚手架方法可以工作:如何
绑定
Kendo Textbox?@(Html.Kendo().TextBox() .
HtmlAttrib
浏览 1
提问于2015-06-17
得票数 6
回答已采纳
点击加载更多
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
腾讯会议
活动推荐
运营活动
广告
关闭
领券