HTML Page inside ASPX page

J

Jai

Hi All,

As When I am displaying my html page which contains images also inside
content placeholder with panel control.....it is only showing text and
not the Images.....................please suggest me...how can i do
this.....

I want to display html page(with images) inside a panel,and that panel
is in contentplaceholder(master page)...............

here is my code..........

........................
If Request.QueryString("page") Is Nothing Then
Server.Transfer("Default.aspx")
End If

Dim title As String = Request.QueryString("title").ToString()

Dim pageName As String = Request.QueryString("page")
Dim fullPath As String = pageName

Dim thegen As HtmlGenericControl = New HtmlGenericControl()

If (Not File.Exists(Server.MapPath(fullPath))) Then
Server.Transfer("Default.aspx")
End If
Dim rdr As StreamReader = Nothing
Try
rdr = New StreamReader(Server.MapPath(fullPath))
Catch
rdr.Close()
Server.Transfer("Default.aspx")
End Try
Dim content As Object = rdr.ReadToEnd()
rdr.Close()
thegen.InnerHtml = content(I think problem is here but not
getting it)
Me.Panel1.Controls.Add(thegen)
Me.Title = title
........................

possibly provide some reference code for that.....

plzzzz....I am in great need of your reply....

Waiting for reply..........
 
L

Laurent Bugnion

Hi,
Hi All,

As When I am displaying my html page which contains images also inside
content placeholder with panel control.....it is only showing text and
not the Images.....................please suggest me...how can i do
this.....

I want to display html page(with images) inside a panel,and that panel
is in contentplaceholder(master page)...............

here is my code..........

<code snipped, the OP reads a HTML file and includes the content in a
HtmlGenericControl>

Wild guess:
I am pretty sure that it's a path problem. Most likely, the HTML page
references pictures according to its own location, and the ASPX is
placed in another location. The best way to be sure is to view the HTML
source on the client, and check that the path for the pictures (relative
to the ASPX page) exists.

HTH,
Laurent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top