Click here to Skip to main content
13,191,877 members (54,059 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
Hello,
URL are coming from DB, and I have to show that page of that URL, right now i am using IFrame for that, is there any other alternative for this.. please help me out.
Ex:-
searchHolder is my <asp:PlaceHolder id="searchHolder" runat="server" />
String strurlNew="http://www.xyz.com";
HtmlGenericControl searchFrame = new HtmlGenericControl("iframe");
searchFrame.ID = "searchFrame" + Convert.ToString(i);
searchFrame.Attributes.Add("height", strHeight);
searchFrame.Attributes.Add("width", strWidth);
searchFrame.Attributes.Add("src", strurlNew);
searchHolder.Controls.Add(searchFrame);

Thanks is advance,
Shubhranshu
Posted 22-Jan-13 18:40pm
Updated 22-Jan-13 18:41pm
v2

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Hi Shubhranshu,

One other nice solution for you is to use client side Javascript to create the HTTP Request on the background and then fill the response into elements on your web page, on the client side.

See this JS example of how to create an HTTP Request
function httpGet(theUrl)
{
    var xmlHttp = null;
    
    xmlHttp = new XMLHttpRequest();
    xmlHttp.open( "GET", theUrl, false );
    xmlHttp.send( null );
    return xmlHttp.responseText;
}


Cheers,
Edo
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy |
Web02 | 2.8.171017.2 | Last Updated 23 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100