Home
Login
Sign Up
More
Toggle navigation
Home
Category
Questions & Answers
Interviews
Career Advice
News
Books
Countact Us
About Us
How to add dynamic controls in ASP.NET
By
JC.Adinarayana Reddy
On 20 Dec 2016
Categories:
Asp.net
Below code will add a dynamic TextBox to the "form1" in webpage, with the id "txtName".
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
TextBox tx = new TextBox();
tx.ID = "txtName";
form1.Controls.Add(tx);
}
}
Comments
Message :
Submit
Comments
Home
Category
Interviews
Career Advice
News
Books
Countact Us
About Us
Copyright 2016 allinoneweb.net. All Rights Reserved.