I am developing a custom search plugin.
The view has a simple form on it.
I am getting problems with it not finding the controller.
My controller is called "SiteWideDocumentSearchController"
I have the following action in the controller:
[HttpPost, ActionName("DocumentSearch")]
public ActionResult DocumentSearch(string searchType, string searchValue) {
.....
Return View();
}
In my view the form looks like this:
@using (Html.BeginForm("SiteWideDocumentSearch", "DocumentSearch", FormMethod.Post)) {
<select name="searchType">
<option value="SmartWorksId">Smart Works Id</option>
<option value="DocumentTitle">Document Title</option>
</select>
<input type="text" name="searchValue" />
<input type="submit" value="Search">
}
When I look at the raw html generated for the page the form gets rendered like this:
<form action="/DocumentSearch/SiteWideDocumentSearch" method="post">
The GET action of this controller is reached with the following url..
http://trev.chili-publish.com/Plugins/SiteWideReOrder/DocumentSearch
Can anyone help please?
Thanks