"-6ren"> "-我想使用 Response.Write 在使用 ASP.NET 的屏幕上显示一些文本我创建了一个变量 String s = "There is some which is not visible";-6ren">
gpt4 book ai didi

c# - 如何使 Response.Write 显示特殊字符,如 "<",">"

转载 作者:太空宇宙 更新时间:2023-11-03 21:34:51 25 4
gpt4 key购买 nike

我想使用 Response.Write 在使用 ASP.NET 的屏幕上显示一些文本我创建了一个变量

String s = "There is some <hidden text> which is not visible";
Response.Write(s);

我发现当浏览器只显示“有一些不可见”时浏览器会忽略符号 '<'......'>' 之间的任何文本。

如何显示整个文本?

请指教。

最佳答案

你可以试试这个:

String s = @"There is some <hidden text> which is not visible";
Response.Write(s);

关于c# - 如何使 Response.Write 显示特殊字符,如 "<",">",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22282282/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com