Click here to Skip to main content
15,897,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Updated 22-Jan-13 18:41pm
v2

1 solution

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
JavaScript
function httpGet(theUrl)
{
    var xmlHttp = null;
    
    xmlHttp = new XMLHttpRequest();
    xmlHttp.open( "GET", theUrl, false );
    xmlHttp.send( null );
    return xmlHttp.responseText;
}


Cheers,
Edo
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900