在 aspnet 中设置文件夹默认页面 [英] Setting folder default page in aspnet

查看:36
本文介绍了在 aspnet 中设置文件夹默认页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题很简单.我有一个包含多个子文件夹的 Web 应用程序,但其中的任何一个都没有 Default.aspx 页面.

My question is really simple. I have a Web application with multiple sub-folders and there's no Default.aspx page in any of these.

如何在每个文件夹中设置默认页面,以便用户可以键入/folder 而不是/folder/login.aspx?

How do I set the default page in each of these folders so users can type /folder instead of /folder/login.aspx?

这可以通过 web.config 文件完成吗?我应该将每个文件夹中的文件重命名为 Default.aspx 吗?

Can this be done through the web.config file? Should I just rename the file in each folder to Default.aspx?

谢谢!

推荐答案

有一个web.config 的默认文档部分,您甚至可以在每个文件夹中放置一个 web.config,并且在该配置中只设置默认文档.

There is a default document section for web.config, and you can even put a web.config in each folder, and inside that config just have the default document set.

这篇关于在 aspnet 中设置文件夹默认页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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