Reputation: 20406
In my mvc application i need to responce or return view value from another server.
Like calling from one MVC application in a server to another mvc application in a server.
Upvotes: 0
Views: 109
Reputation: 1038710
You could get the response from a server using a WebClient and return it as text:
public ActionResult MyAction()
{
using (var client = new WebClient())
{
string response = client.DownloadString("http://otherserver/controller/action");
return Content(response, "text/html");
}
}
Upvotes: 1