use the asp:ButtonColum n with the Text="<img...>"
They give it a CommandName
Initialize the grids ItemCommand and you should be good to go.
like this....
<asp:DataGrid.. ......ItemComma nd="myItemComma nd" >
<....>
<asp:ButtonColu mn..... CommandName="my Command"..../>
Then in the codebehind
Private void InitializeCompo nent()
{
this.myGrid.Ite mCommand += new
System.Web.UI.W ebControls.Data GridCommandEven tHandler(this.m yItemCommand);
}
private void myItemCommand(o bject source,
System.Web.UI.W ebControls.Data GridCommandEven tArgs e)
{
if(e.CommandNam e == "myCommand" )
{
....do your sub here
}
}
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site:
http://www.Darkfalz.com
Blog:
http://blog.Darkfalz.com
"Lerp" <ad***@officien ce.ca> wrote in message
news:%2******** **********@TK2M SFTNGP09.phx.gb l...
Hi all,
How would I go about creating a link button inside my datagrid that calls
a sub on the same page when clicked....this button will have an image
instead of textual link ie: I don't want a regular <asp:button> tag to do this.
Cheers and thanks, Lerp