Well, the function "GetStringInBetween" has two boolean parameters
called "includeBegin" and "includeEnd". I presume that passing true
for them gets the string in between inclusive of the enclosing tags.
This way you can simply get the entire body contents inclusive of the
<body......> tags as well. In your target document, replace the
existing <body> tags.

On May 5, 10:58 am, rhitam <[email protected]> wrote:
> Hi all ,
>
> I am trying to generate an html file using c# . Now , the idea is to
> take an existing html , read another html file using the streamreader
> class, then read the content between the <body></body>
> in the second file , append this content to the existing body of the
> first html file .
>
> Now , the problem is , while reading the second file , it is possible
> that the body tag may have some attribute like some style definition
> or background color etc etc , and i do not know what that is. So what
> would be the best approach to solve something like this ?
>
> I already have a function  to get any string between two tags :
>
> http://www.mycsharpcorner.com/Post.aspx?postID=15
>
> But what if the tag itself is not constant?
>
> Any help appreciated,
>
> Regards,
> Rhitam

Reply via email to