Asp.Net MVC Form[GET]. Correct action url
I've got search form, which contains checkboxlist which is binded to my model. So when I set GET method to form I got long url: (I even have exception:
The length of the query string for this request exceeds the configured maxQueryStringLength value.)
it's expecting, [0].IsSelected=false&[0].Id=6&[1].IsSelected=false
...
But I would like url like this
www.domain.com/Action/Comma-separated-selected-idx
for example:
www.domai开发者_StackOverflown.com/Search/1,6,7
How can I fix,edit form get action? Thanks
I would do a POST instead, then redirect to the URL you desire.
OR
You could capture the form with some JavaScript and build the URL there.
agreed, POST or JS are your best options, I'd opt for a POST.
精彩评论