#c# #asp.net #numericupdown #modalpopup
#c# #asp.net #numericupdown #modalpopup
Вопрос:
Мой код:
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Button ID="Button1" runat="server" Text="Button" />
<asp:Panel ID="Panel1" CssClass="modalPopup" runat="server">
<div id="modal" runat="server">
<asp:TextBox ID="TextBox1" runat="server" Visible="true"></asp:TextBox>
<cc1:NumericUpDownExtender ID="NumericUpDownExtender1" TargetControlID="TextBox1" Minimum="1"
runat="server">
</cc1:NumericUpDownExtender>
</div>
</asp:Panel>
<cc1:ModalPopupExtender ID="ModalPopupExtender1" PopupDragHandleControlID="modal"
BackgroundCssClass="modalBackground" TargetControlID="Button1" PopupControlID="Panel1"
runat="server">
</cc1:ModalPopupExtender>
</form>
</body>
Здесь модальное всплывающее окно не показывало мой числовой расширитель updown, я не знаю, в чем здесь проблема.К вашему сведению: я запускаю свой код в IE8.
Комментарии:
1. Теперь мой код виден, дайте мне решение.
Ответ №1:
У вас должно быть значение в свойстве Width элемента управления NumericUpDownExtender.
например
<asp:TextBox ID="txtLeftNumeric" Width="50px" runat="server"></asp:TextBox>
<ajaxToolkit:NumericUpDownExtender ID="ajaxNumericLeft"
runat="server" Width="60"
TargetControlID="txtLeftNumeric">
</ajaxToolkit:NumericUpDownExtender>