How can I build a tabbed menu in ASP.NET MVC?

后端 未结 4 531
-上瘾入骨i
-上瘾入骨i 2021-01-30 15:42

I would like to build a tabbed menu pretty similar to the profile management of StackOverflow.

tabbed menu StackOverflow http://img410.imageshack.us/img410/3037/image1nw

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-30 16:04

    Another solution would be to create a custom route (Derive from RouteBase) that uses the querystring to select a different action. Each action would have a separate view that uses a master page containing the common content for the page.

    Basically you'd have "UsersController" with actions "stats", "prefs", etc. All chosen by a custom route class that you've implemented.

提交回复
热议问题