【问题标题】:The server tag is not well formed error in my connection string我的连接字符串中的服务器标记格式错误
【发布时间】:2020-04-27 04:03:17
【问题描述】:

我在尝试运行以下错误时遇到了我的代码问题: 解析器错误 说明:解析服务此请求所需的资源时出错。请查看以下特定的解析错误详细信息并适当地修改您的源文件。

解析器错误消息:服务器标签格式不正确。

它说下面这一行有错误 第 109 行:<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=vremsdb;Initial Catalog=Survey;Persist Security Info=True;User ID=Survey;Password=$urvey12345;Max Pool Size=10000"SelectCommand="SELECT * FROM [vSurveyQuestion] WHERE ([SubmissionID] = @SubmissionID) ORDER BY [QOrderNo]">

【问题讨论】:

标签: sql asp.net visual-studio


【解决方案1】:

The server tag is not well formed 错误提示asp.net页面存在xml语法错误。

在您的情况下,xml 属性定义无效。您必须在 SelectCommand 属性之前添加空格,如下所示:

ConnectionString="Data Source=vremsdb;Initial Catalog=Survey;Persist Security Info=True;User ID=Survey;Password=$urvey12345;Max Pool Size=10000" SelectCommand="SELECT * FROM [vSurveyQuestion] WHERE ([SubmissionID] = @SubmissionID) ORDER BY [QOrderNo]"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-09-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-02
    相关资源
    最近更新 更多