Asp.net NumericUpDownExtender按钮与文本框高度相同

Asp.net NumericUpDownExtender按钮与文本框高度相同,asp.net,ajaxcontroltoolkit,Asp.net,Ajaxcontroltoolkit,我使用的是NumericUpDownExtender控件,但是文本框一侧的按钮比文本框大,有没有办法使按钮与文本框的高度相同 编辑:我发现了我的问题。我用的是标准的按钮,无法操作?。现在我已经创建了自定义的,但它们不会彼此显示,而是彼此相邻 我的代码: <asp:TextBox ID="txtHerst" runat="server" Text="0" Style="text-align: center"></asp:TextBox><cc1:NumericUpDo

我使用的是NumericUpDownExtender控件,但是文本框一侧的按钮比文本框大,有没有办法使按钮与文本框的高度相同

编辑:我发现了我的问题。我用的是标准的按钮,无法操作?。现在我已经创建了自定义的,但它们不会彼此显示,而是彼此相邻

我的代码:

<asp:TextBox ID="txtHerst" runat="server" Text="0" Style="text-align: center"></asp:TextBox><cc1:NumericUpDownExtender ID="extHerst" runat="server" TargetControlID="txtHerst"
Width="50" Enabled="True" Maximum="1.7976931348623157E+308" Minimum="-1.7976931348623157E+308"
RefValues="" ServiceDownMethod="" ServiceDownPath="" ServiceUpMethod="" Tag=""
TargetButtonDownID="imgBtnDown" TargetButtonUpID="imgBtnUp"></cc1:NumericUpDownExtender><asp:ImageButton ID="imgBtnUp" runat="server" ImageUrl="Images/up.jpg" /><asp:ImageButton ID="imgBtnDown" runat="server" ImageUrl="Images/down.jpg" />`
`

您应该能够使用css来实现这一点…

我遇到了同样的问题,并最终将extender替换为RangeValidator。

首先,您应该创建一些css


.auto-style1{
宽度:78px;
}
.auto-style2{
高度:5px;
宽度:19%;
} 

U无法将类或CssClass属性放入NumericUpDownExtender。