I have MVC project that use with web service to get a url and then do a redirect to the URL that i get.
In the first request(the request that return me the URL in the response) i need provider some details and one of them is successUrl.
successUrl is URL that if the action of the client in the URL that i was redirect before success so redirect to successUrl.
My question is: it possible to redirect to ActionResult? if yes What i need to send in successUrl? Update For Example:
I have my MVC Project and Web Service. My controller-
public class HomeController : Controller
{
public ActionResult Home()
{
return View("~/Views/Home/home.cshtml");
}
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult CheckObject(someObject obj)
{
if (ModelState.IsValid)
{
ResponseWS responseWs = wsRequest(deatils);
}
}
[HttpPost]
public ActionResult doSomething()
{
//....do something...
}
}
The steps-
- First the client go to home page from
ActionResult Home()
. The client fill form and click submit and go to
ActionResult CheckObject(someObject obj)
- From
ActionResult CheckObject(someObject obj)
send request to WS with parameters that one of them urlSuccees. - Ws return response with URL(for the example www.test.com) that i need to redirect to it.
- I do the redirect to www.test.com.
- The client do something and if the client action was success the www.test.com need to redirect to my urlSuccees.
NOTE: I want that urlSuccees will be ActionResult doSomething()
Thanks,
Tal