Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a menu from the server side

I am creating my menu with javascript. How possible it is that on page load it is created from the server side (VB ASP.NET) rather than the client side? And if this is possible how is this done? My main aim is that I can create menu items from a database.

Feel free to give your opinion.

like image 483
David Bonnici Avatar asked Apr 22 '26 16:04

David Bonnici


1 Answers

You may want to look at micro-templating, where you create a template that uses json as it's data source. This way you can control the menu items with a database query, xml, whatever. The template is a nice feature as you will not have to rebuild and re-deploy should you want to change the look and feel. There are several asp.net examples:

Dave Ward's Encosia's blog

Rick Strahl's blog

StackOverflow

like image 93
David Robbins Avatar answered Apr 25 '26 06:04

David Robbins