.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Imran Ghani
Sohaib Khalid

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

How to add html control programmatically

Posted By: Radhika     Posted Date: February 21, 2013    Points:5   Category :ASP.Net
How to add html control textbox programmatically in our asp.net form using C#.

Please help me.

Author: Faizal             
Posted Date: February 22, 2013     Points: 20   


To add HTML control in your web form 1st txke PlaceHolder control from your asp.net web form.

After adding place holder you can write below code in any event

HtmlInputText textBox = new HtmlInputText();
textBox.Value = "SomeValue";
textBox.ID = "MyTextBox";

Note: above code is for HTML TextBox. similarly you can add any html control by its class available in .NET Framework

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend