Posted on: 3/19/2012 7:18:40 AM | Views : 425

Hi
i have created button on run time and adding  some attributes and when i want to add post attribute at run time it added successfully but not working can any one tell how can i do this...?
       
Button btn = new Button();
btn.ID = "btn5";
btn.Attributes.Add("runat", "server");
btn.Attributes.Add("onclick", "pop('" + btn.ID + "')");
// btn.Attributes.Add("PostBackUrl", "~/Default2.aspx");
btn.Text = "Test";
this.form1.Controls.Add(btn);
...

Go to the complete details ...