S
- Steve -
I'm really struggling with connecting the code for a PushButton on my
datagrid.
On the aspx file I have the following code:
<asp:ButtonColumn Text="Create User" ButtonType="PushButton"
CommandName="createUser"></asp:ButtonColumn>
Then on the codebehind file (C# by the way)
private void InitializeComponent()
{
this.dgNewUsers.ItemCommand += new
System.EventHandler(this.dgNewUsers_ItemCommand);
}
private void dgNewUsers_ItemCommand(object source,
System.Web.UI.WebControls.DataListCommandEventArgs e)
{
..... my code
}
However it won't compile becuase dgNewUsers_ItemCommand does not match
delegate. What did I do wrong?
datagrid.
On the aspx file I have the following code:
<asp:ButtonColumn Text="Create User" ButtonType="PushButton"
CommandName="createUser"></asp:ButtonColumn>
Then on the codebehind file (C# by the way)
private void InitializeComponent()
{
this.dgNewUsers.ItemCommand += new
System.EventHandler(this.dgNewUsers_ItemCommand);
}
private void dgNewUsers_ItemCommand(object source,
System.Web.UI.WebControls.DataListCommandEventArgs e)
{
..... my code
}
However it won't compile becuase dgNewUsers_ItemCommand does not match
delegate. What did I do wrong?