protected void gvleaveHistory_RowCommand(object sender, GridViewCommandEventArgs e)
{
string strLeaveId = e.CommandArgument.ToString();//gvleaveHistory.DataKeys[e.RowIndex]["LeaveId"].ToString().Trim();
if (strLeaveId != string.Empty)
{
Leave objLeave = new Leave();
objLeave.DeleteLeaveByLeaveId(Convert.ToInt32(strLeaveId));
LoadInitialDataForHistry();
LoadInitialData();
}
}
======ASPX Code============
<ItemTemplate >
<asp:LinkButton ID="lnkCancel" runat="server" OnClick="lnkCancel_Click" CommandArgument='<%# Eval("LeaveId")%>'> Cancel </asp:LinkButton >
</ItemTemplate >
Thursday, July 2, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment