Best way to move .htm file data to a InnerHtml

Discussion in 'ASP .Net' started by AAaron123, Mar 2, 2009.

  1. AAaron123

    AAaron123 Guest

    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?
    AAaron123, Mar 2, 2009
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Hearn
    Replies:
    2
    Views:
    362
    David Hearn
    Aug 9, 2003
  2. AAaron123

    Copy HTM file contents to InnerHtml

    AAaron123, Mar 13, 2009, in forum: ASP .Net
    Replies:
    5
    Views:
    1,111
    AAaron123
    Mar 21, 2009
  3. Rich
    Replies:
    6
    Views:
    175
    Tom Bates
    Sep 10, 2003
  4. Replies:
    6
    Views:
    163
    Dr.Ruud
    Feb 6, 2007
  5. sonic
    Replies:
    5
    Views:
    280
    Randy Webb
    Jul 11, 2006
Loading...

Share This Page