简体   繁体   English

使用jQuery从一个项目中的网页重定向到另一个项目

[英]Redirect from web page in one project to another project using jquery

I've 2 projects, Project 1 contains Login.aspx and Project 2 contains Welcome.aspx . 我有2个项目,项目1包含Login.aspx ,项目2包含Welcome.aspx How can I redirect from Login.aspx to Welcome.aspx after logging in? 登录后如何从Login.aspx重定向到Welcome.aspx? I've used 我用过

window.location.href = "Welcome.aspx?username=" + returnValue;

It's not working. 没用 Please help. 请帮忙。

U can do it this way. 你可以这样 I didnt tried this. 我没有尝试过。 But it may be usefull. 但这可能有用。

<a href="Http://localhost/<name of the second project page"> click here </a>

or 要么

 window.location.href = "http://localhost:8080/Welcome.aspx?username=" + returnValue;
  • In addition if you would like to run two web sites simultaneously it is better to configure the project to use the local IIS instead of webdev. 另外,如果您想同时运行两个网站,最好将项目配置为使用本地IIS而不是webdev。
  • Use iis name for each project for redirect 为每个项目使用iis名称进行重定向

    在此处输入图片说明

Here ImageUpload and Image are 2 different project. 这里的ImageUpload和Image是2个不同的项目。 Using this name it can be connected. 使用此名称可以连接它。

EG:- 例如:-

To redirect from Login.aspx in Image project to Welcome.aspx in ImageUpload project Image项目中的Login.aspx重定向到ImageUpload项目中的Welcome.aspx

window.location.href = "http://ImageUpload/Welcome.aspx?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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