<asp:CommandField ShowEditButton="True" ControlStyle-CssClass="control" ControlStyle-ForeColor="#3366FF"> <ControlStyle CssClass="control" ForeColor="#3366FF"></ControlStyle> </asp:CommandField>
<ItemTemplate > <asp:Label ID="lblstaff" runat="server" Text='<%#Bind("Staff") %>'></asp:Label> </ItemTemplate>
protected void // ERROR: Handles clauses are not supported in C# GridView1_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e) { if (e.CommandName == "Edit") { Control ctrl = e.CommandSource as Control; if (ctrl != null) { GridViewRow row = ctrl.Parent.NamingContainer as GridViewRow; //LinkButton fullname = (LinkButton)row.FindControl("lbName"); Label lblAssaignedto = (Label)row.FindControl("lblstaff"); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)