常量中有换行符 是怎么回事

来源:百度知道 编辑:UC知道 时间:2024/05/24 08:59:53
编了一点小程序,运行时有错误代码如下:
public partial class main : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string userName = Request.QueryString["userName"].ToString();
Response.Write("<font size=24 color=red >欢迎"+userName+"光临本网站"< /font>");

}
}
在"< /font>");这个地方运行时提示:"常量中有换行符"
刚学习C# 不是很明白,哪位给指点一下,谢谢了!

多了个引号!!!
应为:
Response.Write("<font size=24 color=red >欢迎"+userName+"光临本网站< /font>");
你再试试看

顶楼上的 如果仍然不行 再尝试个给/转义

我怎么看你那一句双引号不匹配呢?