Intersoft Support Center

Create-WebInput-programmatically-in-Server-side

WebInput can be created programmatically from code behind.

In this topic, you will learn how to programmatically create WebInput.

To create WebInput programmatically

  1. On Page_Load event handler, put the following code:

    C# Copy ImageCopy Code
    protected void Page_Load(object sender, EventArgs e)
    {
       body.Style.Add("overflow", "hidden");
       WebInput ctrl = new WebInput();
       ctrl.ID = "WebInput1";
       ctrl.DateTimeEditor.IsEnabled = true;
       this.form1.Controls.Add(ctrl);
    }
    

  2. Run the Project.
Previous Next