开发者社区 问答 正文

为什么程序运行过程中提示运行报错 <b> ?报错

在VS2008调试环境下string提示是一个类类型,不能用做表达式,提示报错。

Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtName.TextChanged

End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
    String  strHtml = "";
    strHtml += txtName.value + "<br/>";
    strHtml += txtStreet.value +"<br/>";
    strHtml += txtCity.value +"<br/>";
    tdInnerHtml.innerHtml = strHtml;
End Sub

End Class

展开
收起
爱吃鱼的程序员 2020-06-23 13:56:07 391 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    你到底是VB还是C#,你的代码是C#的,粘贴到一个VB的源代码中了。

    2020-06-23 13:56:25
    赞同 展开评论
问答地址: