Are you trying to view your source code from your browser? This is never a good idea if you want to get access to your controls from within your gridview.
The way to go about accessing your controls from within your gridview is by finding them in your code behind. If you need to pass them to some client side scripts, you should use the ClientID
attribute of your controls. Here's an example of something I do in my gridview's RowDataBound event.
protected void checkGrid_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button moveButton = (Button)e.Row.Cells[9].Controls[1];
moveButton.Attributes.Add("onclick","someJavaScript('"+moveButton.ClientID+"');");
}
}
EDIT
To show you an example of what you'd have to do client side, here's a simple javascript function that uses the ClientID
function someJavaScript(buttonID)
{
var button = document.getElementByID(buttonID);
button.Click();
}
you could also use the $get function and say
var button = $get(buttonID);