Reputation: 113
I am trying to redirect page on Button click of infopath form using the below code:
HttpContext.Current.Response.Redirect("http://www.google.com", true);
But i am getting this error:
"Object reference not set to an instance of an object."
Upvotes: 0
Views: 737
Reputation: 29025
Does it help you ?
HttpContext.Current.Response.Redirect("http://www.google.com", false);
Take a look here,
http://mfawazsp.blogspot.in/2010/02/problem-with-responseredirect-in.html
or/and this,
Need inputs for logic for Codebehind in Infopath Button
or/and this,
Upvotes: 1