创建从服务器侧的菜单 [英] Creating a menu from the server side

查看:132
本文介绍了创建从服务器侧的菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创造我用JavaScript菜单。它是如何可能是在该网页上加载被从服务器侧(VB ASP.NET),而不是在客户端创建的?如果这是可能的,这是怎么做的?我的主要目的是,我可以从一个数据库中的菜单项。

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.

请随意提出您的意见。

推荐答案

您可能想看看的微模板,在那里你创建一个使用JSON,因为它的数据源的模板。这样,您就可以控制使用数据库查询,XML,无论菜单项。模板是因为你不会有重建和重新部署应该要改变它的外表和感觉一个不错的功能。有几个asp.net的例子:

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:

戴夫病房的Encosia的博客

里克·斯特劳的博客

计算器

这篇关于创建从服务器侧的菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆