views:

324

answers:

3

ASP.NET with C#: I have a web page which is intended to be a help page. Actually I am using a treeview component, and when someone clicks on a node a label on the page will change text by reading it from text file.

what I want is to put some images in the help so a .txt file will not be suitable. So I may use a .html file instead.

How to read such a .html file and display it in my page? May I replace the label with some thing else or what?

+3  A: 

Use <asp:PlaceHolder runat="server"> - it's a more general purpose way of inserting blocks of content into a page.

Nathan Ridley
can you explain more please
3bd
Google is your friend - I found this: http://devhood.com/tutorials/tutorial_details.aspx?tutorial_id=752
Nathan Ridley
A: 

Use placeholder or literal asp control, because these controls don't put any html for its self, it just render whats inside.

But for example the normal asp label will render as a span.

Amr ElGarhy
what should i put in a place holder, i tried the literal but it doesn't allow styles and i have tried to use the place holder but i didn't know what to add to it.
3bd
+4  A: 

Use ASP.NET Literal control instead. The Literal control is used to display text on a page. The text is programmable.

Note: This control does not let you apply styles to its content!

<asp:Literal />
Mahin
I used a literal and loaded the html file in :Literal1.Text but images in this html file didn't displayed
3bd
Please check the paths of images. Are images coming from StyleSheet ?
Mahin