is any library to allow create dynamic javascript menu from code ?
If you are using ASP controls like <ASP:MENU>
, the dropdown effect is javascript-ed by the control at the server-side. You should be able to use it in ASP.NET MVC too.
See Leveraging Existing ASP.NET Features in ASP.NET MVC
Another good example is WebForm validations, the client-side validation scripts are all generated dynamically at the server-side.
UPDATE
This is probably what you are looking for:
ASP.NET and JQuery MVC Menu and Part 2
My understanding is that a primary benefit of the MVC framework is that you have complete control of the presentation layer markup. As such, you can tailor it to match pretty much any javascript based menuing system. You can build a lot of great systems with jQuery, for instance.
Just use plain jane UL/LI and use the javascript to do the visual effects. Tons of menu's out on the net that operate this way.
Example:
<UL>
<% foreach(var item in ViewData["MyMenu"]){%>
<LI><%= item.Title %></LI>
<%} %>
</UL>
I have used Telerik Mvc Extensions in my mvc apps. They are free and really easy to work with. Plus the skinning feature along with http://www.telerik.com/products/aspnet-ajax/visual-style-builder.aspx can make the extensions feel like home with any site design. The extensions are written in JQuery.