how to use images in the asp:gridview using asp.net? -


how use images in grid view using asp.net?

actually want use images in place of text example in place of edit , delete want use images related text. possible use images please me

please define template way

<asp:templatefield headerstyle-width="40"> <itemtemplate>     <asp:imagebutton id="buttondelete" runat="server"           imageurl="~/imags/delete.png" onclick="buttondelete_click" tooltip="delete"         commandargument='<%#bind("userid")%>'/> </itemtemplate> </asp:templatefield> 

code behind

protected void buttondelete_click(object sender, eventargs e) { imagebutton button = sender imagebutton; deleteuserbyid(convert.toint32(button.commandargument)); } 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -