How to add onclick function to the dynamic Button
Hi how to add onclick function to the dynamic button
I wrote like this
for loop
{
ImageButton btn = new ImageButton();
btn.ID = "btn" + i;
btn.ImageUrl = "images/edit.jpg";
//btn.OnClientClick += new EventHandler(get);
btn.Attributes.Add("onclick", "get()");
}
<pre lang="cs">public void get(object sender, EventArgs e)
{
this.mopopupeditrule.Show();
}</pre>
in this onclick function not works..how can i give...if i click button one modalpopup want to show..any idea?