Last post Sep 10, 2009 10:37 AM by satalaj
Sep 03, 2009 12:26 PM|ashkant|LINK
i want to know if it is possible to have a part of another site for example part of yahoo in my page.
it is kinda impossible i think;) but at least is it possible to resize the pop-out page to show the part i need ?
for example someone select sth from a dropdownlist in my page and he sees information related to that part as i specify in yahoo (a new window with the size of 400*400 for example)
Sep 03, 2009 12:39 PM|Shane77E|LINK
You can do this with IFrames (inline frames). An <iframe> will allow you to pull in another URL into a portion of your page.
Do a search for iframes and you should find evrything you need.
Hope this helps,
Sep 03, 2009 12:39 PM|jackyang|LINK
Do some more digging and see if the section of the other web page has RSS feed. I think most popolar sites do that. The worst case is to parse out the HTML code. In both cases, you will need to get the CSS synced with the source.
Sep 04, 2009 11:01 AM|ashkant|LINK
thanks a lot
ok. i want to customize it through the c# code for example as the valueof a dropdownlist changes the <iframe> shows different urls with different height and width.
i don't know how to import my iframe to the c# code. any help is appreciated
Sep 04, 2009 02:15 PM|jackyang|LINK
There is little trick to help you solve the XY offsets, you need to analyze the external site bit, and provide an anchor of the section of your interest. See my code below, pay special attention as '#today' and '#sw_content'.
<asp:DropDownList runat="server" ID="drpShowExternalPage" AutoPostBack="true">
<asp:ListItem Text="Select a site" Value="" />
<asp:ListItem Text="yahoo" Value="http://www.yahoo.com#today" />
<asp:ListItem Text="bing" Value="http://www.bing.com#sw_content" />
<asp:Literal runat="server" ID="litIFrame" />
protected void Page_Load()
private void renderIFrame(ListItem pair)
litIFrame.Text = "<iframe id='IFrameExternal' name='IFrameExternal' src='" + pair.Value + "' frameborder='1' scrolling='no' title='iframe for external site' style=";
if (pair.Text == "bing")
litIFrame.Text += "'width:656px;height:523px;'";
else if (pair.Text == "yahoo")
litIFrame.Text += "'width:440px;height:271px;'";
litIFrame.Text += "/>";
Sep 10, 2009 10:37 AM|satalaj|LINK
you can look into their API and see which functionality you would like to show in your page.
you can use their api using HttpWebRequest , HttpWebResponse and render your part of page as
per your requirement.