Cenk Isik

Cenk Isik

  • NA
  • 44
  • 30.4k

I try to run javascript code in linkbutton attributes

Aug 6 2012 5:03 AM
I try to run javascript code in linkbutton attributes but it doesnt work i find link button on gridview from id and i give attributes like ;

LinkButton lbtn = (LinkButton)grdIcerikGoster.Rows[grdIcerikGoster.PageIndex].Cells[1].Controls[0].FindControl("lnkSil");

lbtn.Attributes.Add("onclick", "return confirm('Bu kaydi silmek istediginizden emin misiniz?')");


but it doesnt work please help me 
 Thanks a lot 


Answers (2)