javascript - How to use modal pop up extender, inside the gridview image button? -


as title, how use modal pop extender in gridview button.

inside gridview, button normal button image(i didnt use edit template add button).

now did (according online source), add event on gridview this.

protected void gridview1_rowdatabound(object sender, gridviewroweventargs e)         {             if (e.row.rowtype == datacontrolrowtype.datarow)             {                 (e.row.findcontrol("lnkedit") button).attributes.add("onclick", "showeditmodal('" + id + "');");              }         } 

showeditmodal function javascript function on html page, thing is, how able grab different id different row in gridview, pop correct modal based on id?

you can e.row.cells

protected void gridview1_rowdatabound(object sender, gridviewroweventargs e)             {                 if (e.row.rowtype == datacontrolrowtype.datarow)                 {                     int idcolumnnumber=1; // number of id column                     int id=convert.toint32(e.row.cells[idcolumnnumber].text);                     (e.row.findcontrol("lnkedit") button).attributes.add("onclick", "showeditmodal('" + id + "');");                  }             } 

Comments