PC Review


Reply
Thread Tools Rate Thread

In-correct formatting in the HTML displayed by the custom HTML Control

 
 
Asheesh
Guest
Posts: n/a
 
      15th Sep 2003
Hello All,

I'm stuck in a strange situation. Please help me in this.
I ported the HTML Viewer control written in eVB to C#.
Now, the HTML pages I was displaying in my eVB created custom HTML control
don't possess the same formatting when displayed using the same HTML control
though created in C#.

Strangely though the same HTML document displays fine, when displayed in the
eVB created HTML control.
E.g. espaņol is displayed without the ~ and the n character. It is displayed
as espaol.

Also some bulleted items are displayed without bullets, but the sane get
displayed properly in the eVB custom created control.
I wonder why is this so, since all I've done is to simply migrate the same
piece of code to C#.

Please help me as to what is the reason behind this strange behavior?

Thanks in anticipation,
Regards,
Asheesh


 
Reply With Quote
 
 
 
 
Asheesh
Guest
Posts: n/a
 
      15th Sep 2003
More on this problem.
The HTML file I'm displaying in the Custom control is an embedded resource
for my application exe.
So, I'm reading the HTML content from the embedded resource in the following
fashion..
Sr=new
StreamReader(System.Reflection.Assembly.GetExecutingAssembly().GetManifestRe
sourceStream("MyApp.Help.htm"));

sText=Sr.ReadToEnd();

HtmlCtrl.SetText(sText,true);

Sr.Close();

Does reading the embedded resource in the Stream format, and then passing
the string converted to Stream leads to an erroenous display? Could this be
the problem.
Please help

Regards,
Asheesh
"Asheesh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello All,
>
> I'm stuck in a strange situation. Please help me in this.
> I ported the HTML Viewer control written in eVB to C#.
> Now, the HTML pages I was displaying in my eVB created custom HTML control
> don't possess the same formatting when displayed using the same HTML

control
> though created in C#.
>
> Strangely though the same HTML document displays fine, when displayed in

the
> eVB created HTML control.
> E.g. espaņol is displayed without the ~ and the n character. It is

displayed
> as espaol.
>
> Also some bulleted items are displayed without bullets, but the sane get
> displayed properly in the eVB custom created control.
> I wonder why is this so, since all I've done is to simply migrate the same
> piece of code to C#.
>
> Please help me as to what is the reason behind this strange behavior?
>
> Thanks in anticipation,
> Regards,
> Asheesh
>
>



 
Reply With Quote
 
Asheesh
Guest
Posts: n/a
 
      15th Sep 2003
Hi All,

I solved my problem... I was missing the Encoding stuff..

Simply used the Encoding parameter one StreamReader character with

StreamReader Sr=new StreamReader(FileName, System.Text.Encoding.Default);

and the formatting that was missing was restored back again.

Asheesh

"Asheesh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> More on this problem.
> The HTML file I'm displaying in the Custom control is an embedded resource
> for my application exe.
> So, I'm reading the HTML content from the embedded resource in the

following
> fashion..
> Sr=new
>

StreamReader(System.Reflection.Assembly.GetExecutingAssembly().GetManifestRe
> sourceStream("MyApp.Help.htm"));
>
> sText=Sr.ReadToEnd();
>
> HtmlCtrl.SetText(sText,true);
>
> Sr.Close();
>
> Does reading the embedded resource in the Stream format, and then passing
> the string converted to Stream leads to an erroenous display? Could this

be
> the problem.
> Please help
>
> Regards,
> Asheesh
> "Asheesh" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hello All,
> >
> > I'm stuck in a strange situation. Please help me in this.
> > I ported the HTML Viewer control written in eVB to C#.
> > Now, the HTML pages I was displaying in my eVB created custom HTML

control
> > don't possess the same formatting when displayed using the same HTML

> control
> > though created in C#.
> >
> > Strangely though the same HTML document displays fine, when displayed in

> the
> > eVB created HTML control.
> > E.g. espaņol is displayed without the ~ and the n character. It is

> displayed
> > as espaol.
> >
> > Also some bulleted items are displayed without bullets, but the sane get
> > displayed properly in the eVB custom created control.
> > I wonder why is this so, since all I've done is to simply migrate the

same
> > piece of code to C#.
> >
> > Please help me as to what is the reason behind this strange behavior?
> >
> > Thanks in anticipation,
> > Regards,
> > Asheesh
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Visual Studio 2005 html-view does not recognize the generated html-tag of a custom control Rolf Welskes Microsoft ASP .NET 3 6th Oct 2006 07:49 PM
HTML formatting is lost in custom Outlook Stationary. Why? =?Utf-8?B?anMuaGFycmlzLnNsYw==?= Microsoft Outlook Discussion 0 29th Jun 2006 11:03 PM
HTML formatting is lost in custom Outlook Stationary. Why? =?Utf-8?B?anMuaGFycmlzLnNsYw==?= Microsoft Outlook Discussion 0 29th Jun 2006 11:03 PM
Custom html output with custom server control DKode Microsoft ASP .NET 4 7th Nov 2005 12:40 PM
Export data from Access to HTML file and control the formatting (to be used in HTML Help) Vincent Microsoft Access External Data 1 18th Dec 2003 02:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:26 PM.