开发者

Navigation control for ASP.NET MVC

I have created an ASP.NET MVC project for dealing with buildings and environment classifications. Now i would like to create a navigation control that helps my user.

The idea is that on top of the every page there will be a vista like folder structure path that explains where the u开发者_高级运维ser is. To make an example

Start > Country1 > State2

City1 City2 City3 ...

And if the user click on a city in the list we get this page:

Start > Country1 > State2 > City3

Building1 Building2 Building3 ...

The tricky part is that you should also be able to list all the buildings in the database without choosing Country and State before. Like this:

Start

City1 City2 City3 ...

And when you click on a city you should get this page:

Start > City2

Building1 Building2 ...


Anyone have a suggestion on how I should solve this. I tried to create a navigation stack and push states to this stack from my controlleractions but whenever i used the browsers back and forward buttons the navigation stack gets inaccurate.


Presumably, you can click on any of the levels in the navigation tree. In that case I would have it be the same no matter how you got to a particular node, that is it should represent the path to that node. This would make it relatively easy, since you need only follow the foreign key relationships until you get to the top level to build the path. Since you always have the Start element as the root, the user can easily reset themselves back to the beginning.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜