Questo sito utilizza cookies, anche di terze parti, per mostrare pubblicità e servizi in linea con il tuo account. Leggi l'informativa sui cookies.
Username: Password: oppure
C# / VB.NET - Problemi webbrowser-un pò lungo ma inquietante...
Forum - C# / VB.NET - Problemi webbrowser-un pò lungo ma inquietante...

Avatar
scaricatore (Normal User)
Newbie


Messaggi: 9
Iscritto: 05/09/2006

Segnala al moderatore
Postato alle 16:36
Sabato, 17/03/2007
Confido in voi!!
Ho creato una paginetta html, cerco di caricarla su un webbrowser ma su alcuni pc non si riesce e viene visualizzato il codice html invece che la pagina interpretata...Per fare le prove ho utilizzato sia altri pc che VirtuaPC.
Per poter riprodurre l'errore scrivo anche un esempio:le possibili soluzioni per la corretta visualizzazione sono

A)rimuovere tutto il codice contenuto fra <!-- e -->
B)Sostituire le righe dalla 2 alla 5 con <html>

ho creato una form con il codice seguente:

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
        Dim bg As String
        bg =
My.Computer.FileSystem.ReadAllText(Application.StartupPath &
"\prova.htm")
        WebBrowser1.DocumentText = bg
        While Me.WebBrowser1.IsBusy = True
            Application.DoEvents()
        End While

    End Sub
End Class


Il file da caricare(prova.htm) è il seguente :

<?xml version="1.0" encoding="Windows-1252"?>
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">;

<head>
<meta http-equiv="Content-Language" content="it">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Titolo</title>
</head>

<body>



<table class="MsoNormalTable" style="width: 758px; border-collapse:
collapse; margin-left: -0.4pt" border="0" cellpadding="0"
cellspacing="0" >
<tr style>
<td style="width: 258.25pt; border-left: medium none -moz-use-text-
color; border-right: medium none -moz-use-text-color; border-top: 1pt
solid windowtext; border-bottom: 1pt solid windowtext; padding-left:
5.4pt; padding-right: 5.4pt; padding-top: 0cm; padding-bottom: 0cm"
valign="top" width="344">
<p class="MsoNormal" style="text-align: center" align="center"><b>
<span style="font-size: 18pt; font-family: Arial Narrow; letter-
spacing: -0.05pt">
 </span></b></p>
<p class="MsoNormal" style="text-align: center" align="center"><b>
<span style="font-size: 18pt; font-family: Arial Narrow; letter-
spacing: -0.05pt">
TerIMO</span></b></p>
<p class="MsoNormal" style="text-align: center" align="center">
<span style="font-family: Arial Narrow">SEerbo</span><br>

<span style="font-family: Arial Narrow">Telono </span><br>

<span style="font-family: Arial Narrow">C5N - P.
IV66</span></p>
<p class="MsoNormal"> </td>
<td style="width: 412px; padding-left: 5.4pt; padding-right: 5.4pt;
padding-top: 0cm; padding-bottom: 0cm" valign="top">
<p class="MsoNormal" style="line-height: 20.4pt"><b>
<span style="font-size: 10pt; font-family: Arial Narrow; letter-
spacing: -0.1pt">
STRIA DEL CONATO</span></b></p>
<p class="MsoNormal"><b>
<span style="font-size: 16pt; font-family: Arial Narrow; letter-
spacing: 0.5pt">
DICHFORMITA</span></b>
<b>
<span style="font-size: 16pt; font-family: Arial Narrow; letter-
spacing: 0.4pt">
DELL'IMPIRTE</span></b></p>
<p class="MsoNormal"><span class="GramE">
<span style="font-size: 8pt; font-family: Arial Narrow; letter-
spacing: -0.15pt">
AR90 </span>
<span style="font-size: 8pt; font-family: Arial Narrow; letter-
spacing: 0.7pt">
- </span><span style="font-size: 8pt; font-family: Arial Narrow">
D.M92 <span style="letter-spacing: 0.7pt">- </span>
<span style="letter-spacing: 0.1pt">D.4 N. 392</span></span></span>
<p class="MsoNormal"><span class="GramE">
<span style="font-size: 10pt; font-family: Arial Narrow; letter-
spacing: 0.1pt">
n.</span></span><span style="font-size: 10pt; font-family: Arial
Narrow; letter-spacing: 0.1pt">
______________________________________________________</span></td>
</tr>
</table>

<!--
<table class="MsoNormalTable" style="width: 758px; border-collapse:
collapse; margin-left: -0.4pt" border="0" cellpadding="0"
cellspacing="0" >
<tr style>
<td style="width: 258.25pt; border-left: medium none -moz-use-text-
color; border-right: medium none -moz-use-text-color; border-top: 1pt
solid windowtext; border-bottom: 1pt solid windowtext; padding-left:
5.4pt; padding-right: 5.4pt; padding-top: 0cm; padding-bottom: 0cm"
valign="top" width="344">
<p class="MsoNormal" style="text-align: center" align="center"><b>
<span style="font-size: 18pt; font-family: Arial Narrow; letter-
spacing: -0.05pt">
 </span></b></p>
<p class="MsoNormal" style="text-align: center" align="center"><b>
<span style="font-size: 18pt; font-family: Arial Narrow; letter-
spacing: -0.05pt">
TerIMO</span></b></p>
<p class="MsoNormal" style="text-align: center" align="center">
<span style="font-family: Arial Narrow">SEerbo</span><br>

<span style="font-family: Arial Narrow">Telono </span><br>

<span style="font-family: Arial Narrow">C5N - P.
IV66</span></p>
<p class="MsoNormal"> </td>
<td style="width: 412px; padding-left: 5.4pt; padding-right: 5.4pt;
padding-top: 0cm; padding-bottom: 0cm" valign="top">
<p class="MsoNormal" style="line-height: 20.4pt"><b>
<span style="font-size: 10pt; font-family: Arial Narrow; letter-
spacing: -0.1pt">
STRIA DEL CONATO</span></b></p>
<p class="MsoNormal"><b>
<span style="font-size: 16pt; font-family: Arial Narrow; letter-
spacing: 0.5pt">
DICHFORMITA</span></b>
<b>
<span style="font-size: 16pt; font-family: Arial Narrow; letter-
spacing: 0.4pt">
DELL'IMPIRTE</span></b></p>
<p class="MsoNormal"><span class="GramE">
<span style="font-size: 8pt; font-family: Arial Narrow; letter-
spacing: -0.15pt">
AR90 </span>
<span style="font-size: 8pt; font-family: Arial Narrow; letter-
spacing: 0.7pt">
- </span><span style="font-size: 8pt; font-family: Arial Narrow">
D.M92 <span style="letter-spacing: 0.7pt">- </span>
<span style="letter-spacing: 0.1pt">D.4 N. 392</span></span></span>
<p class="MsoNormal"><span class="GramE">
<span style="font-size: 10pt; font-family: Arial Narrow; letter-
spacing: 0.1pt">
n.</span></span><span style="font-size: 10pt; font-family: Arial
Narrow; letter-spacing: 0.1pt">
______________________________________________________</span></td>
</tr>
</table>

-->


</body>

</html>
Codice sorgente - presumibilmente Plain Text

  1.  


PM Quote