ASP.NET - Embedding a ASP File in ASP.NET  ASP.NET - Embedding a ASP File in ASP.NET

Asked By Sreenath Kalahasti
14-Jan-09 03:42 PM

Hi Guys,

I have a webpage created in ASP.NET. I want to embed a ASP page of another website into mine.

I am using iFrame. However, I read from some websites to try to avoid iFrame.

I tried using <object> but it doesnt display in IE , but works well in Firefox.

Is there any other alternative?

Thanks,

Sree

 

re  re

14-Jan-09 11:36 PM
http://www.longtailvideo.com/support/forum/Setup-Problems/9101/Works-in-Firefox-but-not-Internet-Explorer-6-and-7

Check this  Check this

14-Jan-09 11:58 PM
hi,
check the security level in the IE.

Click Tools -> Option-> Security Level

Adjust the security level then check.

if you see any yellow bars in the IE , right click and click allow.


read this  read this

15-Jan-09 05:53 AM
you'll need to ensure that allow_url_fopen (fopen wrapper) is enabled on the server, see here..

http://www.zend.com/manual/ref.filesystem.php
http://www.zend.com/manual/function.fopen.php
TRY THIS  TRY THIS
15-Jan-09 05:56 AM
I think we can consider different approachs according
to different scenairo:
1. If we want to display another page inside an existing page and the inner
page need to interact with the user, I think use a IFRAME element (or
frame) is suitable(seems also the only means).

2. As you mentioned that the ASP page use some report component, is it
displaying some graphic report and need to be print together with the
container page?
If so ,I think it's better to contain's the ASP page's output html as part
of the container ASP.NET page's output. In .net framework , the
HttpWebRequest class can help us to programly request a certain web
resource and retrieve back the response stream. Thus, we can use it to
manually request the ASP page in ASP.NET page's code behind and embeded the
ASP page's response html into the ASP.NET page's output ( for example , in
a <div> ..</div> ). And following is a simple sample on this:

============container aspx page==========
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>outer</title>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<table width="100%">
<tr>
<td>
<asp:Label id="lblTitle" runat="server">Below is the embeded ASP
Report</asp:Label>
</td>
</tr>
<tr>
<td>
<div id="divInner" runat="server"></div>
</td>
</tr>
</table>
</form>
</body>
</HTML>

============aspx page codebehind===============
public class outer : System.Web.UI.Page
{
protected System.Web.UI.HtmlControls.HtmlGenericControl divInner;
protected System.Web.UI.WebControls.Label lblTitle;

private void Page_Load(object sender, System.EventArgs e)
{
try
{
string url = Request.Url.ToString();
url = url.Substring(0,url.LastIndexOf("/")+1) + "inner.asp";
divInner.InnerHtml = GetPageOutput(url);
}
catch(Exception ex)
{
Response.Write("<br>" + ex.Message);
}
}

private string GetPageOutput(string url)
{
WebRequest wr = WebRequest.Create(url);
StreamReader sr = new StreamReader(wr.GetResponse().GetResponseStream()) ;
return sr.ReadToEnd();
}

..................................

}

=============inner asp page =================
<table width="100%" align="center" border="1">
<%
for i = 1 to 5
%>

<tr>
<td>Report Item: <%= i %></td>
</tr>

<%
Next
%>
</table>


========================================

Hope helps. Thanks.

http://www.velocityreviews.com/forums/t87225-embed-asp-page-in-aspnet.html
iFrames  iFrames
15-Jan-09 10:09 AM

Thanks

I think I will use iFrame as C_A P mentioned.

The 2nd option mentioned is ruled out for me .

2. As you mentioned that the ASP page use some report component(NO), is it
displaying some graphic report (NO)and need to be print together with the
container page?(NO)

Thanks,
Sree

Create New Account
help
me the FAQs on Masterpages in asp.net. Thanks alot var Hi What are Master Pages in ASP.NET? or What is a Master Page? ASP.NET master pages allow you to create a consistent layout for the pages in your application. A single master page defines the look and feel and standard behavior that you want for all of the pages (or a group of pages) in your application. You can then create individual content pages that contain the content you want to display. When users request the content pages, they
Page Directive? What is the purpose of page directive in aspx page? Directive Syntax Directives are instructions used to specify settings (related to how a page should render and processed) used by the page and user control compilers when they process ASP.NET Web Forms page (.aspx) and user control (.ascx) files. These are the essential part of every ASP.NET Page or Control. Directives can be located anywhere in an .aspx or .ascx file, but the values, same as any HTML tag) that are specific to that directive. Special Note: The @ Page directive can be used only in .aspx files, and the @ Control directive can be used
while creating an ASP.NET application? There are two level of asp.net debugging 1. Page level debugging For this we have to edit the page level debugging enable the trace to true in the line in the html format of the page. %@ Page Language = ”vb” trace = ”true”AutoEventWireup = ”false” Codebehind = ”WebForm1.aspx.vb” Inherits = ”WebApplication2.WebForm1?&gt; 2 Enable trace enabled = true. If there is a calendar control to be included in each page of your application, and and we do not intend to use the Microsoft-provided calendar do you develop it? Do you copy and paste the code into each and every page of your application? Create the Calendar User Control The control we will create will contain Specify the best ways to store variables so that we can access them in various pages of ASP.NET application? Declare the variables in Global.aspx How many objects are there cookies: Session cookies Persistent cookies Tell few steps for optimizing (for speed and resource) ASP page / application. Avoid mixing html code with asp code Which command using Query Analyzer will give
renders the same css differently. Very odd. Sir also some other features : in our profile page we are not able to see the symbol of answer unchecked, checked , ignored, 3* , 1 just missed that feature. Sir, now most of things are working fine as expected ! Profile page , My Post Page etc working good ! site looks great ! Sir one thing i notice . . Every posts has the asp-net / 17 / 10371909 / gridview-sorting-using-jquery.aspx Navigation menu missing in forum merit page http: / / www.eggheadcafe.com / forummerit.aspx Regards Hi Robbe, I suggest you that, if you hi. . previously there is dropdownlist in which we used to select number of posts per page . . . but in the New site it is missing. . . . hi. . . check out the belowlines 2 Replies each Answer posted Hi Robbe, After giving replay for the question and submitting the button, page is showing the top of the page. My suggestion is if the page shows the answer which we have replied wiil be better. hi. . in the below link