Best way to move .htm file data to a InnerHtml

A

AAaron123

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?
 

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,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top