我正在学习 ASP.Net Web 表单教程 here:在 asp.net 网站上。本教程包含自定义错误部分,这对我来说有点奇怪。
<customErrors mode="On" defaultRedirect="ErrorPage.aspx?handler=customErrors%20section%20-%20Web.config">
<error statusCode="404" redirect="ErrorPage.aspx?msg=404&handler=customErrors%20section%20-%20Web.config" />
</customErrors>
问题:有人可以解释一下 defaultRedirect 中的查询字符串参数 handler=customErrors%20section%20-%20Web.config"
& <强>重定向?
这个语法有什么特殊含义吗?
最佳答案
%20
只是 URL 编码的空格。它发送一个人类可读的名称,该名称在查询字符串中重定向到错误处理程序页面。
关于asp.net - Web.Config 奇怪的 <customErrors> 部分?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14125468/