public void view_onclick(object sender, EventArgs e)
{
int id = Convert.ToInt32((sender as LinkButton).CommandArgument);
SqlDataAdapter ad = new SqlDataAdapter("viewmasterid", con);
ad.SelectCommand.CommandType = CommandType.StoredProcedure;
ad.SelectCommand.Parameters.AddWithValue("@id", id);
DataTable dt = new DataTable();
ad.Fill(dt);
con.Close();
HiddenField1.Value = id.ToString();
txtname.Text = dt.Rows[0]["Name"].ToString();
txtage.Text = dt.Rows[0]["Age"].ToString();
}