I have a url:
Forwarding / Search / {SearchType} / {searchValue}
and controller action:
ActionResult Search(ShipmentSearchType searchType, string searchValue)
So this means that I can print beautiful URLs, for example:
Forwarding / Search / PartNumber / Widget-01
And get a list of all shipments with this number.
Now I'm working on the application and got to the point where I create a search form that asks for the part number, and it sends it back to Search. So basically I want:
Forwarding / Search / PartNumber / {user input-from-text field}
Unfortunately, I cannot get the form for the above URL - it needs to be generated on the server side. So instead, I will have a form message back to "Shipping / Search / PartNumber" with {user-input} as the value of the submit request.
, :
[AcceptVerbs(HttpVerbs.Post)]
ActionResult Search(ShipmentSearchType searchType, string searchValue, bool? post)
{
return RedirectToAction("Search", new { searchType = searchType, searchValue = searchValue});
}
2 :
1) , post Search javascript ?
2) Bool? post , . . ?
!
:
" , , ( , javascript)". " , javascript?"
. , , url/Shipment/Search/PartNumber/{value-from-textbox} get. , javascript ( URL-), . , javascript .