Tuesday, November 26, 2013

keep current url and fill up with the content of another page

//for test
         
            //string fullOrigionalpath = Request.Url.ToString();

            //if (fullOrigionalpath.Contains("Gastro/Login.aspx"))
            //{
                ////Context.RewritePath("~/Stellenmarkt/default.aspx");

                ////else if (fullOrigionalpath.Contains("/Products/DVDs.aspx"))
                ////{
                ////    Context.RewritePath("/Products.aspx?Category=DVDs");
                ////}


                ////string requestURL = ((HttpApplication)sender).Request.Url.ToString();
                ////string sourceURL = requestURL.Replace("http://localhost:49788/Immobilienmarkt/Default.aspx", "http://localhost:49788/login.aspx");

                //HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create("http://localhost:49788/Stellenmarkt/default.aspx");
             

                //HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse();

                //string WebResp_html = "";
                //using (StreamReader sr = new StreamReader(WebResp.GetResponseStream()))
                //{
                //    WebResp_html = sr.ReadToEnd();
                //}

                //this.Response.Clear();
                //this.Response.ContentType = WebResp.ContentType;
                //this.Response.AddHeader("Content-Length", WebResp.ContentLength.ToString());
                //this.Response.Write(WebResp_html);
                //this.Response.Flush();
                //this.Response.Close();
            //}

No comments:

Post a Comment