如何先点击oursite网址,然后再加载目标网址. [英] How to hit first oursite url then load destination url.

查看:195
本文介绍了如何先点击oursite网址,然后再加载目标网址.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


如何首先访问oursite网址,然后将目标网址加载到newtab.
例如:
网址:www.destinationurl.com
当我单击上面的链接时,首先打开newtab并点击我的网站网址,如www.mysiteurl.com,然后加载destinationurl.

请帮帮我.
谢谢.

Hi,
How to hit first oursite url then load destination url to newtab.
Ex:
url:www.destinationurl.com
when I click on above link first open newtab and hit my site url like www.mysiteurl.com then load destinationurl.

Please help me.
Thanks.

推荐答案

单击按钮或任何超链接

重定向到url http://ursite.com/redirect.aspx?url=http://fb.com


在redirect.aspx页面加载中,写下代码

on the click of button or any hyperlink

redirect to url http://ursite.com/redirect.aspx?url=http://fb.com


In the redirect.aspx page load write down the code

protected void Page_Load(object sender, EventArgs e)
{
   if(Request.QueryString["url"]!=null)
   {
       Response.Redirect(Request.QueryString["url"].ToString());
   }
}



希望对您有帮助...



hope it will help you...


发送为http://localhost:52489/Default1/index?url = codeproject.com
然后在动作结果中写下代码...


send as http://localhost:52489/Default1/index?url=codeproject.com
and in the action result write down the code...


public ActionResult Index(string url)
{
    Response.Redirect("http://"+url);
    return View();
}




我认为您的问题没问题.




I think it will be okay for your problem.


这篇关于如何先点击oursite网址,然后再加载目标网址.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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