4

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...

1
  • did you consider adding a panel with disabled state? and then on submit enabling it (with optional data inserting)? Commented May 12, 2010 at 11:36

1 Answer 1

13

You have 2 possibilities:

  1. 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);

  2. Create the div using jQuery

Select the parent element with $("#id"), $("&lt;element&gt;") or $(".class") and then $(theElement).append("<div>Your content</div>");

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.