Reputation: 11312
I have some textbox and submit button.
When ever I click the submit button the div should be added dynamically in my aspx page.
Also the information which is available in the text box also displayed in the page default.
Use:Without using database i need to display the user suggestion in my page...
Upvotes: 4
Views: 15967
Reputation: 8067
You have 2 possibilities:
You can add dynamically an asp.net panel which generates div tag.
// Create dynamic controls here.
// Use "using System.Web.UI.WebControls;"
Panel panel1 = new Panel();
panel1.ID = "MyPanel";
Form1.Controls.Add(panel1);
Create the div using jQuery
Select the parent element with
$("#id")
, $("<element>")
or $(".class")
and then $(theElement).append("<div>Your content</div>");
Upvotes: 13