Reputation: 193
So i have a case where i have a webservice that should take a caller and from the call do different stuff and then redirect the caller to a specific address.
public Response myWebservice(jsonObject json)
{
{
//Do other stuff
}
//Redirect to http://www.myaddress.com/myaddress
}
So far i have tried to play around with some HttpContext.Current.Response.Redirect("address"); but it hasnt really brought me anywhere so i thought i would ask here for some guidance that might get me a bit further down the road.
Upvotes: 0
Views: 68
Reputation: 11820
Try this code:
public Response myWebservice(jsonObject json)
{
{
//Do other stuff
}
//Redirect to http://www.myaddress.com/myaddress
Context.Response.StatusCode = 307;
Context.Response.AddHeader("Location","http://www.myaddress.com/myaddress");
return null;
}
Upvotes: 1