WebInput can be created programmatically from code behind.
In this topic, you will learn how to programmatically create WebInput.
To create WebInput programmatically
- On Page_Load event handler, put the following 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);
}
|
- Run the Project.