473,385 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

display an aspx page on a panel

Is there a way to place an aspx page on a panel contained on another aspx
page? I can display an HTML page on the panel using a literal can figure no
way to put and aspx page there.
Nov 18 '05 #1
4 12835
Why not use ascx user controls to build your composite page?

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"William LaMartin" <la******@tampabay.rr.com> wrote in message
news:O3*************@TK2MSFTNGP11.phx.gbl...
Is there a way to place an aspx page on a panel contained on another aspx
page? I can display an HTML page on the panel using a literal can figure no way to put and aspx page there.

Nov 18 '05 #2
Place an Iframe on the panel and set its source to your aspx page.

<div id="panel1" class="panel" >
<iframe name="iframe" src="your.aspx" class="iframe"> </iframe>
</div>
Nov 18 '05 #3
I have an aspx page I have already built using several ascx user controls.
I would like to display that page in a panel on another page.

The reason I did not add the user controls via code to the panel is that
when I try code like

Me.Panel1.Visible = True
Me.Panel1.Controls.Clear()
Dim MyHeader As New System.Web.UI.UserControl
MyHeader.LoadControl("header.ascx")
Me.Panel1.Controls.Add(MyHeader)

I get the error: The virtual path '/header.ascx' maps to another
application, which is not allowed. And I can find no way to get away from
the error message.

However, on a second look, I discovered that code like

Dim uc1 As Control = Page.LoadControl("header.ascx")
Me.Panel1.Controls.Add(uc1)

does not produce the error. so I can use the method you suggest. But now I
am curious as to why the first block of code produces the error and the
second doesn't.
"Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
Why not use ascx user controls to build your composite page?

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"William LaMartin" <la******@tampabay.rr.com> wrote in message
news:O3*************@TK2MSFTNGP11.phx.gbl...
Is there a way to place an aspx page on a panel contained on another aspx page? I can display an HTML page on the panel using a literal can
figure no
way to put and aspx page there.


Nov 18 '05 #4
Is there a way to add the iframe in code only? Something like

Dim MyIframe As New HtmlGenericControl
MyIframe.Attributes("SRC") = "Join.aspx"
Me.Panel1.Controls.Add(MyIframe)

which doesn nothing.
"Brian Watkins" <ra********@aol.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Place an Iframe on the panel and set its source to your aspx page.

<div id="panel1" class="panel" >
<iframe name="iframe" src="your.aspx" class="iframe"> </iframe>
</div>

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Victor | last post by:
Hi I need to open an html file from the file system and embed that html file within my main aspx form. I have 2 questions: 1) How do I open the html file? I tried the File.open(Path, mode) didnt...
5
by: David Elliott | last post by:
I need a control on a Web Page that can accept an HTML Document and will display it. Any help would be appreciated. Thanks, Dave Here is what I was trying...
4
by: MCDONAMW | last post by:
First off, forgive me for being such a noob. I typically program vb.net, but I need to do some asp.net programming. I have something simple I have no idea how to do! I have an aspx page which...
2
by: John Blair | last post by:
Hi, In my webform HTML i have the following code, but i cannot view and configure this chart control in the code behind class. In the code behind class i have a reference to this com control...
3
by: | last post by:
One thing I did a lot of in Classic ASP involved showing page elements conditionally based on whether a user was logged in or not. Logged in users or "superusers" would get more content and/or more...
4
by: Jono | last post by:
Hi Everyone, As it says in the title, I'm looking for a way to display a page while long running operations are performed on the server. Ideally, I'd like some way to push the current request...
1
by: satish.vell | last post by:
Hi, I have a ASP.NET page inside which I toggle the display of a field using javascript. How can I save this display value between postbacks. Here is my code: <pre>
7
by: John Morgan | last post by:
I have done a fair amount of programming of ASP.NET 1.1 without poroblem I am now involved in my first project with ASP.NET 2.0 and I am having difficulties with understanding the compilation or...
6
by: =?Utf-8?B?S2Fp?= | last post by:
Hi all, using AJAX Toolkit with vb.net 2.0 how could I make this "Updating..." Screen like e.g. on Codeplex when you click on the "Vote" button...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.