Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Best way to move .htm file data to a InnerHtml

Reply
Thread Tools

Best way to move .htm file data to a InnerHtml

 
 
AAaron123
Guest
Posts: n/a
 
      03-02-2009
A while ago I wanted to generate a way to copy the text in an .htm file to
the InnerHtml of a div element that was in a asp:Content element. I didn't
want any of the styles in the file's header to be used. Rather I wanted to
use the styles defined by the master.

One reason for all this is that the current master style sheet is selectable
by the user.

So I wrote a function that uses the StreamReader to copy the text between
the <body></body> elements of the .htm file into a string that I then
assigned to the InnerHtml.

Seems kind of kludgy to me even though it works well.

Can you suggest a more straight forward way?


Thanks

BTW, I use .htm for my file names. Is .html more commonly used by ASP.NET
developers?










 
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
Writing move constructors and move assignment Andrew Tomazos C++ 2 12-12-2011 01:45 PM
xhtml, innerHtml, appendChild, and innerHTML. what is the exact proper way to do this with DOM sonic Javascript 5 07-11-2006 08:17 AM
I am trying to move spaces to a weblistbox and when I move them... Eduardo78 ASP .Net Web Controls 0 11-03-2005 06:06 PM
Best way to move a share and change the links in documents? =?Utf-8?B?QW50b25jcm93bGV5?= MCSD 1 08-31-2005 01:41 PM
Best way to move data across multiple pages? David Hearn ASP .Net 2 08-09-2003 11:41 AM



Advertisments