简体   繁体   中英

redirect to page on a different project in same solution

I have a solution with 2 projects.

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

TestHarness is the start up project with testpage.aspx at the startup page.

On a button click on testpage i would like to redirect to Launcher.aspx page with a querystring appended.

            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.

I get following exception : 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.

Check the 'web' tab of each projects' properties to find the base addresses.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM