473,796 Members | 2,462 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using a panel question

I have a form where I have a treeview control in the left sidebar and then a
panel next to it in the other pane. Based on user selection from the tree
view, I would like the panel to display a certain html page that was created
in Word as html. Currently I do have the treeview's nodes pointing to a URL,
however for design asthetics, I would love to have the html page just open in
this panel.

How would I got about doing this and thanks for the help.
Nov 19 '05 #1
4 1397
ASP:PANEL is a <DIV> tag when rendered to HTML and <DIV> cannot host another
HTML page. Adding an IFRAME to the right panel may be an option. IFRAME can
host new HTML/ASP/ASPX pages.

"Brad" wrote:
I have a form where I have a treeview control in the left sidebar and then a
panel next to it in the other pane. Based on user selection from the tree
view, I would like the panel to display a certain html page that was created
in Word as html. Currently I do have the treeview's nodes pointing to a URL,
however for design asthetics, I would love to have the html page just open in
this panel.

How would I got about doing this and thanks for the help.

Nov 19 '05 #2
Brad,

I wouldn't go the iFrame route myself. You can certainly display the page in
the panel.

Put a literal control into the panel and then get the html code like this:

'---Create the request

Dim WebRequest As System.Net.WebR equest

WebRequest = System.Net.WebR equest.Create(N ew Uri(CurrentLink ))

'---Optionally set the timeout (if you don't the default timeout will be
used)

WebRequest.Time out = 2000

'---Get the response produced by the request

Dim Response As System.Net.WebR esponse = WebRequest.GetR esponse

'---Download the page content into a stream

Dim Stream As System.IO.Strea m = Response.GetRes ponseStream

'---Place the stream into a stream reader

Dim StreamReader As New System.IO.Strea mReader(Stream)

'---Read the stream into a string object

Dim Html As String = StreamReader.Re adToEnd

'---Cleanup for the next request

Stream.Close()

StreamReader.Cl ose()

Literal1.Text = Html
Now, you may need to parse the html to remove html, head, and/or form tags
depending on what the html you are receiving contains. There are, of course,
tags that could mess up your page's display. But I use this technique to
display newsletters saved as html pages in an archive site and the
surrounding site's format is just fine in every browser. You'll just have to
test to see if any included tags mess things up and remove them from the
Html string if they do...

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Sreejith Ram" <Sr*********@di scussions.micro soft.com> wrote in message
news:4D******** *************** ***********@mic rosoft.com...
ASP:PANEL is a <DIV> tag when rendered to HTML and <DIV> cannot host
another
HTML page. Adding an IFRAME to the right panel may be an option. IFRAME
can
host new HTML/ASP/ASPX pages.

"Brad" wrote:
I have a form where I have a treeview control in the left sidebar and
then a
panel next to it in the other pane. Based on user selection from the
tree
view, I would like the panel to display a certain html page that was
created
in Word as html. Currently I do have the treeview's nodes pointing to a
URL,
however for design asthetics, I would love to have the html page just
open in
this panel.

How would I got about doing this and thanks for the help.

Nov 19 '05 #3
There is a lot of overhead in the technique you just described.
For performance reasons I think I'd have to lean toward the IFrame approach
for most situations, depending on your requirements.

Here's more information:
http://www.dotnet2themax.com/ShowCon...4-e565c8eab013

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate. com> wrote in
message news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
Brad,

I wouldn't go the iFrame route myself. You can certainly display the page
in the panel.

Put a literal control into the panel and then get the html code like this:

'---Create the request

Dim WebRequest As System.Net.WebR equest

WebRequest = System.Net.WebR equest.Create(N ew Uri(CurrentLink ))

'---Optionally set the timeout (if you don't the default timeout will be
used)

WebRequest.Time out = 2000

'---Get the response produced by the request

Dim Response As System.Net.WebR esponse = WebRequest.GetR esponse

'---Download the page content into a stream

Dim Stream As System.IO.Strea m = Response.GetRes ponseStream

'---Place the stream into a stream reader

Dim StreamReader As New System.IO.Strea mReader(Stream)

'---Read the stream into a string object

Dim Html As String = StreamReader.Re adToEnd

'---Cleanup for the next request

Stream.Close()

StreamReader.Cl ose()

Literal1.Text = Html
Now, you may need to parse the html to remove html, head, and/or form tags
depending on what the html you are receiving contains. There are, of
course, tags that could mess up your page's display. But I use this
technique to display newsletters saved as html pages in an archive site
and the surrounding site's format is just fine in every browser. You'll
just have to test to see if any included tags mess things up and remove
them from the Html string if they do...

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Sreejith Ram" <Sr*********@di scussions.micro soft.com> wrote in message
news:4D******** *************** ***********@mic rosoft.com...
ASP:PANEL is a <DIV> tag when rendered to HTML and <DIV> cannot host
another
HTML page. Adding an IFRAME to the right panel may be an option. IFRAME
can
host new HTML/ASP/ASPX pages.

"Brad" wrote:
I have a form where I have a treeview control in the left sidebar and
then a
panel next to it in the other pane. Based on user selection from the
tree
view, I would like the panel to display a certain html page that was
created
in Word as html. Currently I do have the treeview's nodes pointing to a
URL,
however for design asthetics, I would love to have the html page just
open in
this panel.

How would I got about doing this and thanks for the help.


Nov 19 '05 #4
Yes,

I'd agree, if an iFrame is compatible for all potential users of the
application, then that would be the way to go. It's just that while iFrames
are being adopted by more browsers there are still a lot of users out there
who are using older browser versions or browsers that don't render
iFrames...

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:es******** ********@TK2MSF TNGP12.phx.gbl. ..
There is a lot of overhead in the technique you just described.
For performance reasons I think I'd have to lean toward the IFrame
approach for most situations, depending on your requirements.

Here's more information:
http://www.dotnet2themax.com/ShowCon...4-e565c8eab013

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate. com> wrote in
message news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
Brad,

I wouldn't go the iFrame route myself. You can certainly display the page
in the panel.

Put a literal control into the panel and then get the html code like
this:

'---Create the request

Dim WebRequest As System.Net.WebR equest

WebRequest = System.Net.WebR equest.Create(N ew Uri(CurrentLink ))

'---Optionally set the timeout (if you don't the default timeout will be
used)

WebRequest.Time out = 2000

'---Get the response produced by the request

Dim Response As System.Net.WebR esponse = WebRequest.GetR esponse

'---Download the page content into a stream

Dim Stream As System.IO.Strea m = Response.GetRes ponseStream

'---Place the stream into a stream reader

Dim StreamReader As New System.IO.Strea mReader(Stream)

'---Read the stream into a string object

Dim Html As String = StreamReader.Re adToEnd

'---Cleanup for the next request

Stream.Close()

StreamReader.Cl ose()

Literal1.Text = Html
Now, you may need to parse the html to remove html, head, and/or form
tags depending on what the html you are receiving contains. There are, of
course, tags that could mess up your page's display. But I use this
technique to display newsletters saved as html pages in an archive site
and the surrounding site's format is just fine in every browser. You'll
just have to test to see if any included tags mess things up and remove
them from the Html string if they do...

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Sreejith Ram" <Sr*********@di scussions.micro soft.com> wrote in message
news:4D******** *************** ***********@mic rosoft.com...
ASP:PANEL is a <DIV> tag when rendered to HTML and <DIV> cannot host
another
HTML page. Adding an IFRAME to the right panel may be an option. IFRAME
can
host new HTML/ASP/ASPX pages.

"Brad" wrote:

I have a form where I have a treeview control in the left sidebar and
then a
panel next to it in the other pane. Based on user selection from the
tree
view, I would like the panel to display a certain html page that was
created
in Word as html. Currently I do have the treeview's nodes pointing to
a URL,
however for design asthetics, I would love to have the html page just
open in
this panel.

How would I got about doing this and thanks for the help.



Nov 19 '05 #5

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

Similar topics

3
1197
by: Dayne | last post by:
Why a panel on another panel (Win. Forms) doesn't display immediately, yet it will once u minimize then reopen the form? I have notice this. I have one panel ( color blue) on top of another panel (color red) .. the blue panel will not show up when I run the program..only after I minimize the reopen the window..Please help!! Dayne
2
3246
by: DotNetMania | last post by:
hi.. i have some question about Quartz.dll.. i am making avi player but there are a lot of problems i have to solve.. i want to know how to implement subtitle.. it means how to draw on the screen panel
2
1816
by: Lokhan Wong | last post by:
My question is whether it's possible to change the properties of a panel, that resides on the webform containing the usercontrol, in the usercontrol itself. Like this: <form> <asp:panel visibility=false .... </asp panel> <user:control> //a function here turns the visibilty to true </user:control>
0
1056
by: Christian Ista | last post by:
Hello, I have a database, a simple table called "FAQ" in this table 3 fields "ID", "QUESTION" and "ANSWER". I'd like for all record return by a query display the question next to an Imagebutton and under this question, the answer is placed in a panel, this panel is not visible by default. I'd like when I click on the button show the panel (with the answer in it).
1
1031
by: VB Programmer | last post by:
I have 2 flash menus. I put each of them into a panel (1 in each panel (2 panels total)). One flash menu is 200kb, one is only 50kb. (ie Menu for high speed or slow speed connections.) In my code I HIDE (visible=false) whatever panel I do not want to show. QUESTION: Will the Flash swf LOAD anyways, even if it's visible property is false?
1
1853
by: Larry | last post by:
Dear friends, I am a novice vb.net user and I am seeking some experts advice. I placed a panel control onto a form, set the autoscroll property (of the panel control) to true. Let's say The size of the panel control is 100 by 100 ( height =100, width=100) Then I draw some picture onto this panel control, the x range of the picture is from 0 to 500 and the height of the picture is 600. Because
3
2197
by: Ben Dewey | last post by:
Okay, so I have a base Page class called ArticlesPageBase. This base class has reads in an overridable ArticleId and Loads the data into a Panel object in the ContentPlaceHolder of the Master. The article that it loads from the Database is a xml field that contains html code for the article. I added some custom html to the database article called <question id="22" /> When the article contains inline questions are parse out the start...
1
8581
by: Barry L. Camp | last post by:
Hi all, Wondering if someone can help with a nagging problem I am having using a GridView and an ObjectDataSource. I have a simple situation where I am trying to delete a row from a table, but it doesn't seem to work at all. Below is my ASP.NET page, and further below, my VB.NET method that I am trying to call: <div id="admin-faq" class="page"> <h2>Site FAQs (Frequently Asked Questions)</h2>
3
2764
by: Doc John | last post by:
I have a windows Form that inherits from Base_form. In Base_form I added a panel that covers the whole Form (panel1.Dock = Fill). The problem is that all the controls in the Form that inherit from Base_form are "under" this panel, which means they're not visible.. Is it possible to make these controls visible again without having to make major changes in the Form? Thanks. VS2005
0
9683
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10457
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10231
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10013
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9054
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6792
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4119
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3733
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.