<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Input_Numeric._Default" %>
<%@ Register Assembly="C1.Web.Wijmo.Controls.48" Namespace="C1.Web.Wijmo.Controls.C1Input" TagPrefix="wijmo" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
        function setNumericValue() {
            // Find the element via jQuery
            var $input = $('#<%= C1InputNumeric1.ClientID %>');
        
            // Use the Widget 'option' method to set the value
            $input.c1inputnumeric('option', 'value', 399);
            console.log("Value set via jQuery Widget pattern.");
        }

        function setNullValue() {
            var $input = $('#<%= C1InputNumeric1.ClientID %>');

            // 1. Set the nullText option
            $input.c1inputnumeric('option', 'nullText', 'Enter quantity...');

            // 2. Set the value to null
            $input.c1inputnumeric('option', 'value', null);

            console.log("NullText and Value set via jQuery Widget pattern.");
        }
    </script>

    <wijmo:C1InputNumeric ID="C1InputNumeric1" runat="server"></wijmo:C1InputNumeric>

    <button type="button" onclick="setNumericValue()">Set 399</button>
    <button type="button" onclick="setNullValue()">Set Null</button>
</asp:Content>