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 中设置文件夹默认页面
基础教程推荐
- WPF 模态进度窗口 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
