从ASP.NET中的404页重定向到另一页
我有一个定制的404页面,配置了从ASP.NET中的404页重定向到另一页,asp.net,redirect,Asp.net,Redirect,我有一个定制的404页面,配置了responseMode=“ExecuteURL” 我还有一个母版页,里面有一个搜索框。 提交搜索框后,页面将重定向到/search.aspx?q= 但是,如果我在自定义404页面上,重定向将不起作用。 我在url中得到类似的内容 http://localhost:49321/nothere?error=404&404%3bhttp%3a%2f%2flocalhost%3a49321%2fnothere http://localhost:49321/nothere
responseMode=“ExecuteURL”
我还有一个母版页,里面有一个搜索框。
提交搜索框后,页面将重定向到/search.aspx?q=
但是,如果我在自定义404页面上,重定向将不起作用。
我在url中得到类似的内容
http://localhost:49321/nothere?error=404&404%3bhttp%3a%2f%2flocalhost%3a49321%2fnothere
http://localhost:49321/nothere
是我测试自定义404页面的url
如果将响应模式设置为重定向
,它就可以正常工作,但我不希望这样
怎么解决这个问题
这里是为搜索框呈现的html
<div id="searchPanel" onkeypress="javascript:return WebForm_FireDefaultButton(event, 'searchButton')">
<input name="ctl00$searchBox" type="text" id="searchBox" placeholder=" Search..." />
<input type="submit" name="ctl00$searchButton" value="" id="searchButton" style="display: none" />
</div>
您的搜索框表单是如何实现的?请向我们展示呈现的HTML。@Dai有一个按钮,单击它将调用master.cs中的函数。我在搜索框中包含了呈现的html