如何禁用旋转按钮在asp.net的剃刀看法? [英] How to disable spin buttons in razor view of asp.net?

查看:137
本文介绍了如何禁用旋转按钮在asp.net的剃刀看法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在模型类列名是公众诠释? CTScore {搞定;组; } 在剃刀查看我想用这个作为 @ Html.EditorFor(型号=> model.CTScore)。

In model class column name is public int? CTScore { get; set; } and in Razor view I want to use this as @Html.EditorFor(model => model.CTScore).

这是显示与向上/向下箭头旋转按钮以及编辑框,但我不需要显示这些旋转按钮。怎么做?

It is showing as editor box along with Up/Down arrow spin buttons, but I need not show those spin buttons. How to do?

任何帮助是AP preciated。

Any help is appreciated.

推荐答案

下面一行是你所需要的。

The following line is what you need.

@Html.EditorFor(model => model.CTScore, new { htmlAttributes = new { @type="text" } })

这篇关于如何禁用旋转按钮在asp.net的剃刀看法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆