FindControl off on an onclick in a link?

Netnoobie

Well-known member
Joined
Feb 6, 2003
Messages
94
Location
Philadelphia
Bad thread title I know sorry about that.

I have a DataGrid with one column being a link. When that link is clicked it fires off a sub that populates two other columns with data. Sounds fine. Well I can get the link to go into the sub, but I cant seem to reference back to the textboxes that I am entering data into.

If I declare my sub like:
Complete_Click(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)

I get this error:
BC30408: Method Public Sub Complete_Click(sender As Object, e As System.Web.UI.WebControls.DataGridCommandEventArgs) does not have the same signature as delegate Delegate Sub EventHandler(sender As Object, e As System.EventArgs).

This is the only way I know of that a sub can get to the controls of a DataGrid. But if I create my sub like:
Complete_Click(ByVal sender As Object, ByVal e As System.EventArgs)

It compiles but does not let me get to the Grid Controls:
Object reference not set to an instance of an object.

So how can I create a sub that I can access from a link on the DataGrid and get back to the controls properly? It just seems completely insane that I cant do it right now.

Many Thanks!
 
Back
Top