Zubair Munir

Zubair Munir

  • 1.6k
  • 510
  • 27.7k

anyone explain this linkbutton code working step by step

Apr 4 2018 3:35 PM
protected void LinkButton1_Click(object sender, EventArgs e)
{
var lb = (LinkButton)sender;
var row = (GridViewRow)lb.NamingContainer;
if(row!=null)
{
var lblid = row.FindControl("lblid") as Label;
int nid = Convert.ToInt32(lblid.Text);
Response.Redirect("Register.aspx?id=" +nid);
}
}

Answers (2)