farmermanagement.aspx page
i have gridveiw as follows
id Name Dateofbirth GovCode Action
54041 BEH SOUN 1/1/1977 419037X Edit Delete
54042 ABOUD 9/5/1978 419037X Edit Delete
When i click edit it need redirect to another page farmermaster.aspx.
But when i click the edit it does not redirect to another page farmermaster.aspx. it will stays in farmermanagement.aspx page only.
Edit code as follows
protected void onCommand(object sender, CommandEventArgs e)
{
{
if (e.CommandName == "Edit")
{
Response.Redirect("~/ivorycoast/farmermaster.aspx?action=edit&farmercode=" + e.CommandArgument.ToString() + "", false);
HttpContext.Current.ApplicationInstance.CompleteRequest();
}
{
Response.Redirect("~/ivorycoast/farmermaster.aspx?action=edit&farmercode=" + e.CommandArgument.ToString() + "", false);
HttpContext.Current.ApplicationInstance.CompleteRequest();
}
}
what is the mistake in my above code. what changes i have to made in my above code. shows that when i click the edit it will redirect to farmermaster.aspx
Bhairab DuttPosted May 27, 2018, 1:10 PM
Please check the url which you have added if its right , You can try with true means
Response.Redirect("your url",true) by default its true .
When we added true it means the current page terminated and another page open .
Please try according to above.
Thanks.
Vignesh ManiPosted May 27, 2018, 11:17 AM