C# ASP.NET网页中的XML视图问题
ASP.NET网页中的XML视图问题。用户正在从Ajax、HTML编辑器插入XML数据,但当我在标签中查看数据时,它的“不显示”页面也不会下降。下面是插入到SQL表中的XML数据C# ASP.NET网页中的XML视图问题,c#,asp.net,xml,C#,Asp.net,Xml,ASP.NET网页中的XML视图问题。用户正在从Ajax、HTML编辑器插入XML数据,但当我在标签中查看数据时,它的“不显示”页面也不会下降。下面是插入到SQL表中的XML数据 <!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:T
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF/> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:SplitPgBreakAndParaMark/> <w:DontVertAlignCellWithSp/> <w:DontBreakConstrainedForcedTables/> <w:DontVertAlignInTxbx/> <w:Word11KerningPairs/> <w:CachedColBalance/> <w:UseFELayout/> </w:Compatibility> <m:mathPr> <m:mathFont m:val="Cambria Math"/> <m:brkBin m:val="before"/> <m:brkBinSub m:val="--"/> <m:smallFrac m:val="off"/> <m:dispDef/> <m:lMargin m:val="0"/> <m:rMargin m:val="0"/> <m:defJc m:val="centerGroup"/> <m:wrapIndent m:val="1440"/> <m:intLim m:val="subSup"/> <m:naryLim m:val="undOvr"/> </m:mathPr></w:WordDocument></xml><![endif]--> <p class="MsoListParagraph"><span style='font-size: 12pt; line-height: 115%; font-family: "times new roman","serif";'>In most of the naxal hitrural remote locations Govt. Schools are the single available source ofeducation, but the quality of education at these schools is a serious concern. About48% of children in grade V cannot solve the division problems; about half ofthe children in grade V cannot read out contents of grade II. In general thenumerical abilities, language, analytical skills and conceptual development areat present severely missing in the learning system. T</span><span style='font-family: "times new roman","serif";'> from the local adf proper methods and techniques of teachingand learning in dfa block.</span></p><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true" DefSemiHidden="true" DefQFormat="false" DefPriority="99" LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Normal"/> <w:LsdException Locked="false" Priority="9" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/> <w:LsdException Locked="false" Priority="9" QFormat="tru
如何将XML数据查看到Label或其他控件中。ASP.NET中的Label控件将呈现为带有
Text
属性值的
标记。您的值似乎有html注释ASP.NET中的Label控件将呈现为
标记,并带有Text
属性的值。您的值似乎有html注释,但它显示为数据。我不需要显示xml,只需要显示xml内部的文本数据@SMIRNOVOV完整的XML是什么?如果您看到上面的示例,它以开始,实际上我已经对ajax html编辑器进行了一些验证,所以它的存储类似于结束标记。还有其他解决办法吗@smirnovAgain,您的XML无效,并且可能由于其格式而无法正确显示。如果您使用'lit\uuu Input.Text=Server.HtmlEncode()',它可以工作(显示纯XML,但可以工作)。如果您不使用` Server.HtmlEncode()',则不会显示内容,并且整个页面看起来都已损坏,对吗?如果为true,则表示它是由XML内容引起的,因此您必须检查并更正它,但它显示为数据。我不需要显示xml,只需要显示xml内部的文本数据@SMIRNOVOV完整的XML是什么?如果您看到上面的示例,它以开始,实际上我已经对ajax html编辑器进行了一些验证,所以它的存储类似于结束标记。还有其他解决办法吗@smirnovAgain,您的XML无效,并且可能由于其格式而无法正确显示。如果您使用'lit\uuu Input.Text=Server.HtmlEncode()',它可以工作(显示纯XML,但可以工作)。如果您不使用` Server.HtmlEncode()',则不会显示内容,并且整个页面看起来都已损坏,对吗?如果为true,则表示这是由于XML内容造成的,因此必须检查并更正它。
lit__Input.Text = ds.Tables[0].Rows[0]["lit_Input"].ToString();
lit__Input.Text = Server.HtmlEncode(ds.Tables[0].Rows[0]["lit_Input"].ToString());