Setting folder default page in aspnet(在 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 中设置文件夹默认页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 aspnet 中设置文件夹默认页面


基础教程推荐
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01