我如何与动态导航的动态内容? [英] How do I make dynamic content with dynamic navigation?
问题描述
我创建一个ASP.NET网站,所有网页挂了一个数据库驱动的树状层次结构。页面通常present HTML内容。但是,有些人会执行程序。
I'm creating an ASP.NET web site where all pages hang off a database-driven tree-hierarchy. Pages typically present HTML content. But, some will execute programming.
例如:(1)联系我们的形式或(2)报告生成
Examples: (1) a "contact us" form or (2) a report generator
我应该如何重新present /引用数据库内的节目?我应该有一个Web用户控件(.ascx)名称的VARCHAR值?或Web窗体(.aspx)的名字吗?别的东西吗?还是应该仅仅是我的应用程序中在字典中的一个整数或其他类似的ID?
How should I represent/reference the programming within the database? Should I have a varchar value of a Web User Control (.ascx) name? Or a Web Form (.aspx) name? Something else? Or should it just be an integer or other such ID in a dictionary within my application?
我可以做一个ASP.NET站点地图提供这种结构?
Can I make an ASP.NET Site Map Provider with this structure?
在这里查看更多信息:哪是最好的数据库模式我的导航?
See more information here: Which is the best database schema for my navigation?
推荐答案
您可以考虑插入占位符如<我:联系美型/>
在数据库特定页面;这样的数据库可以描述所有静态文本内容,而不是完全替换该数据库驱动的内容与的.ascx
控制。
You might consider inserting placeholders like <my:contact-us-form/>
in the database on specific pages; that way the database can describe all the static text content instead of completely replacing that database-driven content with an .ascx
control.
这篇关于我如何与动态导航的动态内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!