L
luisxx
WinSrv2003 SP1
IIS 6.0
ASP.NET C#, 2.0
SQL 2005
All on same machine
Hello everyone!
I have a method in ASP.NET 2.0 that I can't seem to get right,
Gridview1_rowcommand.
I am using a GridView control with a data source to SQL Server 2005. I
would like it to call the Gridview1_rowcommand when a <asp:ButtonField
ButtonType="Link" ...> button in the GridView is clicked, then I do
stuff in it.
I found one way
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
GridView1.RowCommand += new
GridViewCommandEventHandler(GridView1_RowCommand);
}
This works, providing a method "GridView1_RowCommand"; however, the
repercussion is that it overrides other functionality such as the edit
link in the Gridview control. The edit link in the GridView will do
everything like the asp button link. Is there a way to separate the
call so as to not do the same processing? Or, Is there a way within
the rowCommand to tell which one item in the row was click, either the
button link or edit button?
Luis
IIS 6.0
ASP.NET C#, 2.0
SQL 2005
All on same machine
Hello everyone!
I have a method in ASP.NET 2.0 that I can't seem to get right,
Gridview1_rowcommand.
I am using a GridView control with a data source to SQL Server 2005. I
would like it to call the Gridview1_rowcommand when a <asp:ButtonField
ButtonType="Link" ...> button in the GridView is clicked, then I do
stuff in it.
I found one way
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
GridView1.RowCommand += new
GridViewCommandEventHandler(GridView1_RowCommand);
}
This works, providing a method "GridView1_RowCommand"; however, the
repercussion is that it overrides other functionality such as the edit
link in the Gridview control. The edit link in the GridView will do
everything like the asp button link. Is there a way to separate the
call so as to not do the same processing? Or, Is there a way within
the rowCommand to tell which one item in the row was click, either the
button link or edit button?
Luis