Hi,

I have a LinkButton that I am programming in my code-behind file to go in the
first column of my datagrid. The way I have it now, the button is clickable
(meaning my mouse pointer changes to a pointing hand) - however, I can't
figure out how to wire it up correctly. Here is the code I currently have to
do that:

LinkButton arrowBtn = new LinkButton();
arrowBtn.CommandName = "cmdArrowDown";
arrowBtn.Text = "<div class='arrowDown'><img src='arrowdownVA.gif' border='0'
/></div>";
e.Item.Cells[0].Controls.Add(arrowBtn);

As you can tell, I am making the button an image (arrowdownVA.gif). This part
works correctly. In the datagrid, I can click on the arrow image- But it
does nothing. I thought having a function like

case "cmdArrowDown":
{
CODE GOES HERE
}
in my ItemClick event handler (which takes in (object source,
datagridcommandeventargs e) and switches according to the e.CommandName)
would do the trick. But after debugging, it appears that my code never
reaches this section. Am I missing something when I am creating this control?
I am very new to ASP.NET, so please forgive my ignorance. Thanks for the help
in advance

-TR

--
Message posted via [url]http://www.dotnetmonster.com[/url]