473,412 Members | 2,294 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,412 software developers and data experts.

load html file into a DIV ?

I have a list of html files and entries in a database with the file
locations.

I'd like to create a buttons for each file. Any way to load an html
file into a DIV of an asp.net page?
Do I have to read the files in with stringreader ? Any other way?

Anybody got any sample code?

Thanks.

Oct 19 '06 #1
3 10892
Use File.ReadAllText() and use the return value to the InnerHtml property of
the DIV tag (should have runat="server").

"jobs" <jo**@webdos.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
I have a list of html files and entries in a database with the file
locations.

I'd like to create a buttons for each file. Any way to load an html
file into a DIV of an asp.net page?
Do I have to read the files in with stringreader ? Any other way?

Anybody got any sample code?

Thanks.

Oct 20 '06 #2
An HTML page cannot display another full HTML page inside of itself unless
you use a Frame or IFrame.

Here's more info:
http://msdn.microsoft.com/library/de...cts/IFRAME.asp

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"jobs" <jo**@webdos.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
>I have a list of html files and entries in a database with the file
locations.

I'd like to create a buttons for each file. Any way to load an html
file into a DIV of an asp.net page?
Do I have to read the files in with stringreader ? Any other way?

Anybody got any sample code?

Thanks.

Oct 20 '06 #3
Hi,

Siva M wrote:
Use File.ReadAllText() and use the return value to the InnerHtml property of
the DIV tag (should have runat="server").
You cannot add the whole content of the HTML file into another HTML file
as is. You'll need to extract the content of the BODY tag.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Oct 20 '06 #4

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

Similar topics

6
by: Vijay | last post by:
I need to generate HTML files based on the some codes. One HTML file per code. I have the link (ex:http://123.234.345.456/WebPages/GetTestData.aspx?SomeCode=25), by passing the code as parameter I...
2
by: Gil Schulmann | last post by:
Hi. I am trying to load an HTML file into htmlDoc using c#. I see that the document does not load, but I can not understand where am I wrong. Any help ? My Code: class CFileHandler{...
9
by: Jay Kim | last post by:
Hi, We're implementing a Windows application using Visual Basic .NET. One of the key features we need to implement is that we should be able to get the accurate byte offset of user selected...
0
by: Irfan | last post by:
Hello, I want to load HTML file into HTMLDocument object. I don't want to use webbrowser object or any asyncrohonous call to load HTML into this file. Like if I call HTTPWebRequest to download...
1
by: Risen | last post by:
Hi, all, How can I to load Html file that in memory stream to webBrowser instead to load Html file from disk. can anybody help me? Thx. B.R. Risen
3
by: anejamanish | last post by:
Hi guys I am developing a website using php and ajax. Here I need to to design previous and next buttons to load new html files with every click. I am displaying these files within a div tag....
1
by: charlie imac | last post by:
I have a question on the capability of Ajax. My question is: Is it possible to dynamically load any of the javascript gallery programs such as: Adobe Spry Gallery SmoothGallery others I...
6
by: Shawn | last post by:
Hello: I have the following code in a PHP file. An HTML form passes user comment data to the PHP, which then appends the user comments to the end of the HTML file on which the form is located....
5
by: Andy B | last post by:
How do you load an html file into an XmlDocument?
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
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...

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.