locked
NumericUpDown Control Custom Button Graphics RRS feed

  • Question

  • User67845974 posted

    I'm using the NumericUpDown control in an app being access from the Internet Explorer (IE6 basically) in a device running Windows CE 5.0.  The up/down buttons are not displaying properly.  They appear to output a value that I assume contains some unicode character for a solid triangle.  The documentation for the control states that "Page authors can also provide custom images to be used instead of the default up/down button graphics."  I am not seeing a property in the control for setting a path to alternate image buttons.  How does one go about specifying alternate images?

    Friday, March 3, 2017 11:54 PM

All replies

  • User2103319870 posted

     I am not seeing a property in the control for setting a path to alternate image buttons.  How does one go about specifying alternate images

    You can use the TargetButtonID and TargetButtonDownID property of NumericUpDownExtender like below

            <asp:TextBox
                ID="TextBox3"
                runat="server"
                Text="3"
                Width="120"
                Style="text-align: center" />
            <%--Change the images as per your desigm--%>
            <asp:ImageButton runat="server" ID="ImgBtnUp" ImageUrl="~/Images/up.png" ImageAlign="AbsMiddle" />
            <asp:ImageButton runat="server" ID="ImgBtnDown" ImageUrl="~/Images/down.png" ImageAlign="AbsMiddle" />
            <cc1:NumericUpDownExtender ID="NumericUpDownExtender1" runat="server" runat="server"
                TargetControlID="TextBox3"
                Width="120"
                RefValues=""
                ServiceDownMethod=""
                ServiceUpMethod=""
                TargetButtonUpID="ImgBtnUp" TargetButtonDownID="ImgBtnDown"
                Minimum="1"
                Maximum="100" />

    Sunday, March 5, 2017 7:17 PM