asp.net - C# 返回 " 而不是 "
问题描述
我的代码正在返回"
而不是"
在 .cs
public string openingVal
{
get
{
string opening = "";
opening += "\"openingHoursSpecification\": [";
opening += "{";
opening += "\"@type\": \"OpeningHoursSpecification\",";
opening += "\"dayOfWeek\": [";
opening += "\"Tuesday\",";
opening += "\"Wednesday\",";
opening += "\"Thursday\",";
opening += "\"Friday\",";
opening += "\"Saturday\"";
opening += "],";
opening += "\"opens\": \"09:00\",";
opening += "\"closes\": \"19:00\"";
opening += "}";
opening += "],";
return HttpUtility.HtmlDecode(opening);
}
}
在 .aspx 中
<%:addressOpening.openingVal.Replace("quot;","\"") %>
然后返回
"openingHoursSpecification": [{"@type": "OpeningHoursSpecification","dayOfWeek": ["Tuesday","Wednesday","Thursday","Friday","Saturday"],"opens": "09:00","closes": "19:00"}],
我尝试了 HtmlDecode Utility,也使用了 Replace。两者都不做。
我失去理智了吗?
解决方案
推荐阅读
- android - 当我尝试实例化 ViewModelProviders 时,无法解析 of() 方法
- django - 如何通过 Queryset 在 Python 函数中访问 Django 模型实例的“absolute_url”
- python - 使用 Jinja 按嵌套字典值过滤
- c# - 同一数据库上的多个项目、上下文和表
- apache-kafka - 使用kafka为clickhouse生成数据
- google-cloud-platform - 尝试重新创建 cloudsql 实例时出现错误“项目中的资源是冲突的主题”的原因是什么?
- c# - 我可以将 ics 文件发送给 Outlook 与会者,将与会者状态更新为接受/拒绝吗
- python - 如何使用 webpy 在 python 中修复 500 Internal Server Error?
- objective-c - 绑定套接字时出错:NSPOSIXErrorDomain Code=1 "Operation not allowed"
- swagger - 如何在调用 Rest Endpoint 时在 Swagger 中设置输入参数选项