w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Adding Link button Event Dynamically

Try to create the linkbutton first and bind event with the button... for example

       HtmlGenericControl td = new HtmlGenericControl("td");
       LinkButton lnk = new LinkButton();
       //lnk.ID = set your dynamic ID;
       lnk.Text = "Delete";
       lnk.Click += new EventHandler(Clicked);

       td.Controls.Add(lnk);

Now create the function for click on button

       protected void Clicked(object sender, EventArgs e)
       {
          // do work on click...

       }




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.