两个网站之间的交流 [英] Communication between two websites

查看:81
本文介绍了两个网站之间的交流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个网站上有一个链接,单击该链接后会打开一个新标签页中的新网站.

在新标签页中打开网站时,我设置了一个标志并打开了新网站.

我的问题是,当我关闭新标签页时,即网站我想重置标志,以便我可以检查标志是否尚未重置(新站点仍处于打开状态)或其完成.如果仍在选项卡中打开,则单击链接将无法打开其他站点.

因此,当我关闭选项卡时,必须将标志重置并发送到主网站,以便我可以检查其在主网站中的状态!该怎么做??

有人可以帮忙吗?

I have a link on a website on click of which a new website in a new tab gets opened.

While opening the site in new tab, i set a flag and open the new site.

My question is when i close new tab ie site i want to reset the flag, so that i can check if the flag is not yet RESET (new site is still opened) or its done. If its still opened in tab then i cant open another site on clicking the link.

So when i close the tab that flag must be reset and send to main website, so that i can check its status in main website! How to do this??

Can anybody Help??

推荐答案

您可以使用会话变量来保存标志值,并设置一个带有查询字符串值的页面,以允许设置会话var当另一个网站调用该页面时.当然,仅当您同时控制两个网站时,此方法才有效.

您可能还可以利用某些DOM技巧,但这将需要一些微妙的Google搜寻技巧.

然后再次(如果您同时控制两个网站),则始终可以在它们之间设置WCF通信.

我没有任何站点间通信经验,所以我只能猜测搜索词组.
You could use a session variable to hold the flag value, and setup a page with a querystring value that allows the session var to get set when the other web site calls the page. Of course, this will only work if you have control of both web sites.

There also may be some sort of DOM trickery you can take advantage of, but that''s going to require some delicate googling skills.

Then again (if you have control of both web sites), you could always setup WCF communications between them.

I don''t have any inter-site communications experience to speak of, so I could only guess at search phrases.


您可以尝试使用PostBackUrl和PreviousPage属性来实现这一点. .


发布到ASP.NET 2.0中的另一个页面 [
You can try making use of the PostBackUrl and PreviousPage properties to acheive this.


Post To Another Page in ASP.NET 2.0[^]

I am not sure if it has "set" access to properties using Previous page..You may try it with this article''s help.


这篇关于两个网站之间的交流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆