[英]redirect to page on a different project in same solution
I have a solution with 2 projects. 我有2个项目的解决方案。
TestHarness is the start up project with testpage.aspx at the startup page. TestHarness是启动项目,在启动页上带有testpage.aspx。
On a button click on testpage i would like to redirect to Launcher.aspx page with a querystring appended. 在按钮上单击测试页,我想重定向到带有附加查询字符串的Launcher.aspx页。
Response.Redirect(string.Format("/prjLauncher/Launcher.aspx?{0}", ToQueryString(post)));
above is the code i am using. 以上是我正在使用的代码。 I have also referenced Launcher projects reference to TestHarness project. 我还引用了Launcher项目,引用了TestHarness项目。
I get following exception : The resource cannot be found.
我收到以下异常: The resource cannot be found.
what am i missing ?? 我想念什么??
If you are running two separate projects then they will have two separate base urls (or ports) depending on how you are hosting them. 如果您正在运行两个单独的项目,则根据您托管它们的方式,它们将具有两个单独的基本url(或端口)。
Check the 'web' tab of each projects' properties to find the base addresses. 检查每个项目属性的“ Web”选项卡以查找基本地址。
You should also check that you have selected to start multiple projects enabled and have the 'prjLauncher' project set to 'wait for a request' on startup. 您还应该检查是否已选择启动多个项目,并且在启动时将“ prjLauncher”项目设置为“等待请求”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.