how to create dyanmically multiple color button
and get value of that in text box??
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
CrishPosted Apr 13, 2011, 7:50 AM
Button btn = new Button();
btn.ID = "btnSubmit";
btn.Text = "Submit";
Page.Form.Controls.Add(btn);
btn.Click += new EventHandler(btn_Click);
Andrew FensterPosted Apr 12, 2011, 10:46 AM
A placeholder is an empty, invisible box that you can insert things into. In your markup for the page, you position the placeholder control where you want your button to appear. In the code, you insert the control(s) into the placeholder.
Ankit NandekarPosted Apr 12, 2011, 8:24 AM
piyush sardharaPosted Apr 12, 2011, 7:55 AM
ArshadPosted Apr 12, 2011, 7:42 AM
find the below code to generate the dynamically button in aspx page and handled the click event of that button.
Button btn = new Button();
btn.ID = "btnSubmit";
btn.Text = "Submit";
Page.Form.Controls.Add(btn);
btn.Click += new EventHandler(btn_Click);
void btn_Click(object sender, EventArgs e)
{
//Handled the click event.
}
Regards,
Arshad.