473,586 Members | 2,855 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 10907
Use File.ReadAllTex t() and use the return value to the InnerHtml property of
the DIV tag (should have runat="server") .

"jobs" <jo**@webdos.co mwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.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.co mwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.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.ReadAllTex t() 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
3273
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 will get the page displayed. But I don't want to display it, instead save those files in one of the network directories that can be accessed by...
2
5632
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{ public delegate void
9
2947
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 text in the file. We've been trying to use the RichTextBox control to load
0
2685
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 the web page, I can somehow redirect the received HTML in HTMLDocument object. Any help how to do this. Thanks & Regards,
1
11695
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
4523
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. So everytime the button is clicked only the html source of that div is refreshed and not other. The names of html files are like page_1, page_2,...
1
3598
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 know using ExtJS I can load html using Ajax. What I can't do is load html containing scripts. I didn't want to use IFRAME. I've looked at
6
2518
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. This PHP code works: the HTML file with added comments displays correctly in my browser. However, appending text to the very end of the HTML file...
5
10063
by: Andy B | last post by:
How do you load an html file into an XmlDocument?
0
7839
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8338
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...
0
8215
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...
0
6610
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...
1
5710
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...
0
5390
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...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2345
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
1
1448
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.