日期:2014-05-17  浏览次数:20550 次

请问怎么获取网址
http://s.click.taobao.com/t?e=zGU34CA7K%2BPkqB07S4%2FK0CFcRfH0GoT805sipKj3WFgObCOjeMxxCTFxN6Vm7j4ewiKkN9jps1h0xwpsosUSBTJl%2Bsn9DQ1mMZl%2BUXg0Gj6BRg%3D%3D


打开以上的淘宝客链接,会经过跳转,最后跳到以下的链接,在asp.net里怎么取得这个链接地址
http://detail.tmall.com/item.htm?id=12730886528&ali_trackid=2:mm_26282330_0_0:1365997719_410_699961681

------解决方案--------------------
看了一下,不是JS中转,就是 Response中头信息的Locatoin
------解决方案--------------------

            var request = HttpWebRequest.Create("http://s.click.taobao.com/t?e=zGU34CA7K%2BPkqB07S4%2FK0CFcRfH0GoT805sipKj3WFgObCOjeMxxCTFxN6Vm7j4ewiKkN9jps1h0xwpsosUSBTJl%2Bsn9DQ1mMZl%2BUXg0Gj6BRg%3D%3D");
            var response = request.GetResponse();
            var url = response.Headers["Location"];
------解决方案--------------------
可以结贴给分了

    public class GHtmlToImage
    {
        /// <summary>
        /// 地址
        /// </summary>
        private string _url = "about:blank";
        /// <summary>
        /// 宽
        /// </summary>
        private int _width = 800;
        /// <summary>
        /// 高
        /// </summary>
        private int _height = 600;
        /// <summary>
        /// 缩略图宽
        /// </summary>
        private int _swidth = 320;
        /// <summary>
        /// 缩略图高
        /// </summary>
        private int _sheight = 250;

        private Bitmap _image;
        private Bitmap _thumbnailimage;
        private object _lock = new object();
        private object _lock2 = new object();
        private string _charset = "utf-8";
        public string Url
        {
            set { _url = value; }
        }
        public int Width