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 中设置文件夹默认页面
基础教程推荐
- C# 9 新特性——record的相关总结 2023-04-03
- 如果条件可以为空 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- 将数据集转换为列表 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
