Hi .I tried in both the ways .But I am not getting value of command argument.Where is my mistake.Help Me .It's Very Urgent.The link button is placed inside a panel
<asp:LinkButton ID="lnkapply" runat="server" CommandName="Id" OnClick="lnkapply_Click" CommandArgument='<%# Bind("JobId") %>' CssClass="style" >Apply</asp:LinkButton>
protected void lnkapply_Click(object sender, EventArgs e)
{
try
{
string id = ((LinkButton)sender).CommandName;
string id1= (lnkapply.CommandArgument.ToString());
//string id = lnkapply.CommandArgument;
Response.Redirect("frmApplyJob.aspx");
}
catch (Exception ex)
{
logger.Error("General Exception", ex);
}
}
<asp:LinkButton ID="lnkapply" runat="server" CommandName="Id" OnClick="lnkapply_Click" CommandArgument='<%# Eval("JobId") %>' CssClass="style" >Apply</asp:LinkButton>
vijaya