LIVRE D'OR EN ASP.NET ET XML

cs_fabrice69 Messages postés 1765 Date d'inscription jeudi 12 octobre 2000 Statut Membre Dernière intervention 11 décembre 2013 - 18 sept. 2002 à 23:26
Josh08 Messages postés 1 Date d'inscription jeudi 25 octobre 2007 Statut Membre Dernière intervention 10 février 2008 - 10 févr. 2008 à 20:50
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.

https://codes-sources.commentcamarche.net/source/8923-livre-d-or-en-asp-net-et-xml

Josh08 Messages postés 1 Date d'inscription jeudi 25 octobre 2007 Statut Membre Dernière intervention 10 février 2008
10 févr. 2008 à 20:50
Hello.
Tout d'abord, merci pour ce code qui marche très bien.

Mais j'ai un petit soucis (surement un truc débile...) :
comment faire pour récupérer à l'affichage les retours à la ligne enregistrer dans le fichier XML ? En effet, les retours à la ligne "tapés" dans la textBox sont bien enregistrés dans le XML mais à l'affichage, ils sont ignorés.

Merci.
dotnet11 Messages postés 1 Date d'inscription samedi 6 août 2005 Statut Membre Dernière intervention 21 mars 2006
21 mars 2006 à 16:54
maous
phildarvador Messages postés 106 Date d'inscription jeudi 7 février 2002 Statut Membre Dernière intervention 30 novembre 2004
17 sept. 2003 à 20:10
Pour la configuration de IIS, cherche sur le site ou sur google...
cs_Jackboy Messages postés 757 Date d'inscription vendredi 7 septembre 2001 Statut Membre Dernière intervention 19 juin 2008
20 févr. 2003 à 05:33
Invalid byte was found at byte index 101.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Invalid byte was found at byte index 101.

Source Error:


Line 55: Dim mArray As New ArrayList
Line 56: Dim doc As New XMLDocument
Line 57: doc.Load(Server.MapPath("suggest.XML"))
Line 58:
Line 59: Dim mNodeChild As XMLNode


Source File: d:inetpubwwwrootlivre d'orsuggest.aspx Line: 57

Stack Trace:


[ArgumentException: Invalid byte was found at byte index 101.]
System.Xml.XmlScanner.GetChars(Byte[] srcBuffer, Int32& srcOffset, Int32 srcLen, Char[] destBuffer, Int32 destOffset, Boolean zeroedOut) +171
System.Xml.XmlScanner.Read() +129
System.Xml.XmlScanner.ScanContent() +412
System.Xml.XmlTextReader.ParseBeginTagExpandCharEntities() +266
System.Xml.XmlTextReader.Read() +216
System.Xml.XmlValidatingReader.ReadNoCollectTextToken() +38
System.Xml.XmlValidatingReader.Read() +14
System.Xml.XmlLoader.LoadChildren(XmlNode parent) +33
System.Xml.XmlLoader.LoadElementNode() +144
System.Xml.XmlLoader.LoadCurrentNode() +38
System.Xml.XmlLoader.LoadCurrentNode() +192
System.Xml.XmlLoader.LoadChildren(XmlNode parent) +47
System.Xml.XmlLoader.LoadElementNode() +144
System.Xml.XmlLoader.LoadCurrentNode() +38
System.Xml.XmlLoader.LoadCurrentNode() +192
System.Xml.XmlLoader.LoadChildren(XmlNode parent) +47
System.Xml.XmlLoader.LoadElementNode() +144
System.Xml.XmlLoader.LoadCurrentNode() +38
System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) +49
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +121
System.Xml.XmlDocument.Load(XmlReader reader) +72
System.Xml.XmlDocument.Load(String filename) +78
ASP.suggest_aspx.GetDataSource() in d:inetpubwwwrootlivre d'orsuggest.aspx:57
ASP.suggest_aspx.Page_Load(Object sender, EventArgs e) in d:inetpubwwwrootlivre d'orsuggest.aspx:14
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +724
phildarvador Messages postés 106 Date d'inscription jeudi 7 février 2002 Statut Membre Dernière intervention 30 novembre 2004
19 sept. 2002 à 19:38
C'est sûr qu'avec un fichier volumineux il faut plutot envisager une liaison avec une base =)
cs_fabrice69 Messages postés 1765 Date d'inscription jeudi 12 octobre 2000 Statut Membre Dernière intervention 11 décembre 2013 5
18 sept. 2002 à 23:26
Pas mal le systeme de sauvegarde en XML de plus c'est vraiment très rapide. reste à voir quand le fichier est conséquent.

F___
Rejoignez-nous