Hi,
We have a combobox and a button inside a form (all HTML helper) and when we submit (its just a search form) two querystring items are appended to the forms destination - one with the name of the "Combobox" giving the value and one with "ComboBox_input" giving the text.
We're using a combobox so we can have the Text and the Value separate.
How can we stop both the Text AND Value being added as a querystring value?
I know we can do an on change event and window.location, but we've a requirement for an actual button to click and I thought this would work ...
01.@using (Html.BeginForm("Details", "Property", FormMethod.Get))02. {03. 04. @(Html.Kendo().ComboBox()05. .Name("PropertyId") 06. .DataTextField("Searchable") 07. .DataValueField("PropertyRef")08. .Placeholder("Search for property by ref or name ...")09. .Filter(FilterType.Contains)10. .AutoBind(false)11. .MinLength(4)12. .DataSource(source =>13. {14. source.Read(read =>15. {16. read.Action("PropertySearch_Read", "Search"); 17. })18. .ServerFiltering(false); 19. })20. .HtmlAttributes(new { style = "width:100%" })21. )22. 23. 24. @(Html.Kendo().Button()25. .Name("btnSubmit")26. .HtmlAttributes(new { type = "submit" })27. .Content("Search")28. )29.}Thanks,
Daniel