Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > include HTML code from html page

Reply
Thread Tools

include HTML code from html page

 
 
Kevin
Guest
Posts: n/a
 
      09-27-2005
How do I include mb.html if I check file is existed? I'm assuming I do this in codebehind, but how?

Basically if the file exists, it should display the page that will include mb.html.





---------------------------------------------------------------------------------------------------------

html code inside mb.html

<table><tr><td>9/27/2005 11:00:43 AM</td><td>God is great!</td></tr></table>
<table><tr><td>9/27/2005 11:01:03 AM</td><td>I love Jesus</td></tr></table>



In my codebehind,

if (File.Exists(Server.MapPath(mb.html)))

{

// include mb.html html code



}

else

{

do something else

}





 
Reply With Quote
 
 
 
 
Siva M
Guest
Posts: n/a
 
      09-27-2005
I don't think it is possible in that way. Rather, read the content of the file if it exists and assign it to a Label control's Text property. Place the Label control where you the mb.html's content should appear on the page.
"Kevin" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
How do I include mb.html if I check file is existed? I'm assuming I do this in codebehind, but how?

Basically if the file exists, it should display the page that will include mb.html.





---------------------------------------------------------------------------------------------------------

html code inside mb.html

<table><tr><td>9/27/2005 11:00:43 AM</td><td>God is great!</td></tr></table>
<table><tr><td>9/27/2005 11:01:03 AM</td><td>I love Jesus</td></tr></table>



In my codebehind,

if (File.Exists(Server.MapPath(mb.html)))

{

// include mb.html html code



}

else

{

do something else

}





 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/* #include <someyhing.h> */ => include it or do not include it?That is the question .... Andreas Bogenberger C Programming 3 02-22-2008 10:53 AM
How to include a given HTML page in aspx page..?? ms_sarwar ASP .Net 0 09-10-2007 12:19 PM
How to include a given HTML page in aspx page..?? ms_sarwar ASP .Net 1 09-07-2007 06:32 AM
Include file for code behind vb page for .aspx page =?Utf-8?B?RGF2aWQgSm9uZXM=?= ASP .Net 4 05-27-2005 02:16 PM
#include "bar" negates #include <string> ; how to fix? Danny Anderson C++ 5 08-15-2003 06:38 PM



Advertisments