title: how to add buttons in content place holder at runtime in asp.net?
body: <p>In my form i have added one content place holder and also added a button within th e content place holder manually.But now i want to add a button in the same content place holder at runtime. I tried the following code, but the button is not showing in the browser...
  I don't know what is the problem here...</p>
  
  <p>My Code...</p>
  
  <pre><code>ContentPlaceHolder content = (ContentPlaceHolder)this.Master.FindControl("maincontent");
  Button newButton = new System.Web.UI.WebControls.Button();
  newButton.ID = "NextButton";
  newButton.Text = "Next";
  newButton.Visible = true;
  content.Controls.Add(newButton);
  </code></pre>