简体   繁体   English

重定向到同一解决方案中其他项目的页面

[英]redirect to page on a different project in same solution

I have a solution with 2 projects. 我有2个项目的解决方案。

    • prjLauncher -- Launcher.aspx prjLauncher-Launcher.aspx
    • prjTestHarness -- TestPage.aspx prjTestHarness-TestPage.aspx

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.

相关问题 重定向到同一解决方案的不同项目中的另一个页面 - Redirect to another page in different project of same solution 是否可以从同一解决方案中将项目A中的一个页面重定向到项目B中的页面 - Is it possible to redirect from one page in Project A to a page in Project B from within the same solution 是否可以从同一解决方案中将项目A中的一页重定向到项目B中的页面? - Is it possible to redirect from one page in Project A to a page in Project B from within the same solution? Blazor - 在一个解决方案中重定向到另一个项目中的页面 - Blazor - redirect to page in another project in one solution 钩子和测试项目在不同的项目中,但在相同的解决方案中 - Hooks and test project are in different project but in same solution 同一项目的不同解决方案标志配置 - same project different solution sign configuration .NET 核心重定向到 Controller 在同一解决方案下的另一个项目中 - .NET Core Redirect to Controller in another Project under same Solution 在同一解决方案中从另一个项目中的一个项目打开xaml页面 - Open a xaml page from one project in another project in the same solution 从同一解决方案MVC中的不同项目访问EF ConnectionString - Accessing EF ConnectionString from different project within same solution MVC 同一解决方案 Visual Studio 中每个项目的不同测试设置 - Different Test Settings per project in same solution Visual Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM