I have a controller rendering on my homepage which is a search box.
My controller action looks like this
public ActionResult Search(SearchResultModel model)
{
//TODO bind to model to form
SearchModel resultModel = new SearchModel
{
Keyword = Request.Form["keyword"]
};
var results = new List<SearchResultModel>();
results = FoundResults(resultModel.Keyword);
resultModel.SearchResults = results;
return View(resultModel);
}
What is it I want? I want to fill in a keyword in the input box have it processed ( and posted ) and return a page ( item ) in sitecore with my model. Something like return item and give it my model.
Question. Is this possible ?
If not? What would be the best way to tackle this issue?
I need some help here folks :).
I have already read :
http://mhwelander.net/2014/05/22/passing-data-between-actions-in-sitecore-mvc/
and other articles from Martina but I seem to not be getting anywhere closer.