重定向页面ASCX [英] Redirecting Ascx page
本文介绍了重定向页面ASCX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能使用重定向的页面ASCX
的Response.Redirect();
我的code是
<$p$p><$c$c>HttpContext.Current.Response.Redirect(\"~/postauthenticated/employeereprintw2requestconfirmtest.ascx\");你有什么想法?
解决方案
没有,这是不可能的。一个ASCX控制不能独自生活。它应该始终在一个WebForm(ASPX)主办。你只能重定向到的WebForms或通用处理器。其实只是一般的处理程序这是Web请求的基本入口点。该WebForms的仅仅是一个自定义的通用处理器。
Is it possible to redirect an ascx page using
Response.Redirect();
My code is
HttpContext.Current.Response.Redirect("~/postauthenticated/employeereprintw2requestconfirmtest.ascx");
Do you have any idea?
解决方案
No, that's not possible. An ASCX control cannot live alone. It should always be hosted in a WebForm (ASPX). And you can only redirect to WebForms or generic handlers. Actually only to generic handlers which are the basic entry points for web requests. The WebForms is just a custom generic handler.
这篇关于重定向页面ASCX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文