开发者

Should ASP.Net MVC apps be more link-driven?

Strange question, I know, but one thing I seem to be feeling with开发者_如何转开发 ASP.Net MVC is that it's smoother and more logical to try and avoid form-submissions unless totally necessary (especially if you have more than 1 on a single view).

As an example, you have a list of items and you can sort the items, to me it seems to be a more 'fitting' implementation to have a handful of links that filter the list rather than say, a drop-down with a submit button next to it?

Is it just me or does anyone else feel that you need to run with a certain approach in order for ASP.Net MVC to achieve perhaps better maintainability?

Thanks


With links users will benefit from seeing sorting in URL, being able to change it in URL, bookmark to specific sorting, and so on. They won't see "Data will be sent again" dialog box.

However, the post can create the correct url and redirect there, following the PRG (post/redirect/get) principle, allowing to use combo/submit without their drawbacks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜