Hello i am creating a small webpage that give our users an interface to search in our database.
This website must supply 2 webservice functions, Search(string searchString) and GetAccountInfoByInitials(string initials)
I would like to use my controllers to do this, but i can not find out how i can get the html out of a ViewResult.
I have tryed the following, but the result.ToString() only give me the string "System.Web.Mvc.ViewResult"
public class SearchService : ISearchService
{
private readonly ServiceHandlerController _controller;
public SearchService()
{
_controller = new ServiceHandlerController();
}
public string Search(string searchString)
{
var result = _controller.Search(searchString);
return result.ToString();
}
public string GetAccountInfoByInitials(string initials)
{
var result = _controller.Search(initials).ToString();
return result;
}
}