如何将变量的值从一个网站传递到另一个网站 [英] How to pass a value of variable from one website to another
本文介绍了如何将变量的值从一个网站传递到另一个网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想像这样传递变量的值
i want to pass value of variable like this
Response.Redirect("http://www.onlinench.com/admin.aspx");
我不想从url发送,我想像会话一样发送,但是会话范围在其他站点页面上不可用请指导我
I not want to send from url, i want to send like session but session scope is not available on another sites page plese guide me
推荐答案
嗨 VinodKumar,
您不能将变量从一页传递到另一页,但是可以将变量的值从一页或站点传递到另一页或站点.
示例:
Hi VinodKumar,
You can not pass variable from one page to another, but you can pass the value of variable from one page or site to another.
Example:
Response.Redirect("http://www.onlinench.com/admin.aspx?UserName=Imdadhusen&Sex=Male");
上面的示例我传递了两个值,例如UserName = Imdadhusen和Sex = Male
您可以使用
从服务器端访问它
The above example i passed two value like UserName=Imdadhusen and Sex=Male
you can access it from server side using
string strUser = Request.QueryString["UserName"];
string strSex = Request.QueryString["Sex"];
如果您仍有问题,请告诉我.
如果有帮助,请提供您的投票.
谢谢,
Imdadhusen
Please do let me know, if you still have problem.
Please provide your vote if this would be helpful.
Thanks,
Imdadhusen
这篇关于如何将变量的值从一个网站传递到另一个网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文