“动态文件夹" [英] "Dynamic Folders"

查看:177
本文介绍了“动态文件夹"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在数据库中检查每个子文件夹代表的站点的子文件夹,如果找到,则会加载页面"www.codeproject.com/center.aspx?id=test",但使用不同的页面内容.

例如:

I wish to create like a sub-folder to the site that each sub-folder represent is checked with the database and if found loads the page "www.codeproject.com/center.aspx?id=test" but with different content.

For Example:

www.codeproject.com/test 
to
www.codeproject.com/center.aspx?id=test
or

www.codeproject.com/example 
to
www.codeproject.com/center.aspx?id=example



那些链接将转到相同的页面名称示例(名称为center.aspx),但根据"/"后面的文本,将获得此信息.如果它存在于数据库中.

我的网站结构也有固定的子文件夹.

我该如何实施.已经阅读了本网站和其他一些网站

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

使用方法3:使用HttpModule通过IIS7执行不需扩展的URL重写

当前的问题是,来自该页面的每个文件请求都直接指向该页面,并且应该被定向到实际的文件夹.我该如何解决.

服务器信息:
IIS 7
ASP.NET 3.0、3.5及更高版本4.0
是否具有URLRewrite模块



Those to links go to the same page name example named center.aspx but according to the text behind the "/" gets the information. if it exists in the database.

My site structure also have fixed sub folders.

How can I implement this. Already read this and some other sites

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

Using Approach 3: Using an HttpModule to Perform Extension-Less URL Rewriting with IIS7

The current problem is that every file request from that page is being direct to the page and should be directed to the actual folder. How can I solve this.

Server Info:
IIS 7
ASP.NET 3.0, 3.5 & 4.0
Has URLRewrite Module

推荐答案

查看用于Webforms的asp.net路由:
Look into asp.net routing for webforms:
http://www.4guysfromrolla.com/articles/051309-1.aspx


这篇关于“动态文件夹"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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