我想webBrowser.NavigateToString(varivale);
在这个变量中传递字符串变量,我存储了一个 html 源代码。我如何在这种方法中传递变量?
我的代码是
string varible=<body>..<p>some text</p>..</body>;
webBrowser1.NavigateToString(variable);
查看我的实际代码:
JObject cityblog1 = (JObject)cityblog[0];
string cityimg = (string)cityblog1["CityImage"];
string citydetail = (string)cityblog1["CityDetail"];
//var = (string)cityblog1["CityDetail"];
City_Blog cb = new City_Blog();
cb.CityImage = cityimg;
cb.CityDetail = citydetail;
lstcityblogdetail.Add(cb);
setimg();
webBrowser1.NavigateToString(ConvertExtendedASCII(citydetail));
}
private static string ConvertExtendedASCII(string HTML)
{
string retVal = "";
char[] s = HTML.ToCharArray();
foreach (char c in s)
{
if (Convert.ToInt32(c) > 127)
retVal += "&#" + Convert.ToInt32(c) + ";";
else
retVal += c;
}
return retVal;
}
问题:
当我运行应用程序时,我的输出是控制器之类的所有标签, 
但我不想要那样。