Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/275.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 预期的';)';在aspx页面中_C#_Asp.net_Checkboxlist - Fatal编程技术网

C# 预期的';)';在aspx页面中

C# 预期的';)';在aspx页面中,c#,asp.net,checkboxlist,C#,Asp.net,Checkboxlist,我得到一个错误“预期”) 页面已成功加载,但处于浏览器页脚状态“已完成,但有错误” .aspx <td align="left" valign="top" style="width: 18%;"> <div id="Div2" style="overflow:auto;height:120px;"> <asp:CheckBoxList ID="chklstCourse" DataTextField="CourseName" DataValueFi

我得到一个错误“预期”)

页面已成功加载,但处于浏览器页脚状态“已完成,但有错误”

.aspx

<td align="left" valign="top" style="width: 18%;">
   <div id="Div2" style="overflow:auto;height:120px;">
       <asp:CheckBoxList ID="chklstCourse" DataTextField="CourseName" DataValueField="CourseName" runat="server"></asp:CheckBoxList>
   </div>
</td>

<td align="left" valign="top" style="width: 18%;">
    <div id="Div4" style="overflow:auto;height:120px;">
       <asp:CheckBoxList ID="chklstCategory" DataTextField="Category" DataValueField="Category" runat="server"></asp:CheckBoxList>
    </div>
</td>
<td align="left" valign="top" style="width: 18%;">
    <div id="Div5" style="overflow:auto;height:120px;">
         <asp:CheckBoxList ID="chklstSubCat" DataTextField="SubCategory" DataValueField="SubCategory" runat="server"></asp:CheckBoxList>
    </div>
</td>

查看来源:

<tr>
                <td><input id="ctl00_PageMainContent_filterPane_content_chklstCourse_0" type="checkbox" name="ctl00$PageMainContent$filterPane_content$chklstCourse$0" checked="checked" onclick="SelectAll(&#39;ctl00_PageMainContent_filterPane_content_chklstCourse&#39;,0);" /><label for="ctl00_PageMainContent_filterPane_content_chklstCourse_0">Select All</label></td>
            </tr><tr>
                <td><input id="ctl00_PageMainContent_filterPane_content_chklstCourse_1" type="checkbox" name="ctl00$PageMainContent$filterPane_content$chklstCourse$1" checked="checked" onclick="SelectAll(&#39;ctl00_PageMainContent_filterPane_content_chklstCourse&#39;,7 Habits of Highly Effective People);" /><label for="ctl00_PageMainContent_filterPane_content_chklstCourse_1">7 Habits of Highly Effective People</label></td>
            </tr><tr>
                <td><input id="ctl00_PageMainContent_filterPane_content_chklstCourse_2" type="checkbox" name="ctl00$PageMainContent$filterPane_content$chklstCourse$2" checked="checked" onclick="SelectAll(&#39;ctl00_PageMainContent_filterPane_content_chklstCourse&#39;,Advanced Networking for EBI/DVM);" /><label for="ctl00_PageMainContent_filterPane_content_chklstCourse_2">Advanced Networking for EBI/DVM</label></td>
            </tr><tr>

全选
高效能人士的7个习惯
EBI/DVM的高级网络
在checkboxlist控件onclick事件自动添加的view source中,这背后有什么问题吗


有什么想法吗?提前感谢

这两个函数调用中的第一个参数是用引号括起来的(
';
),第二个参数也需要用引号括起来吗

SelectAll(&#39;ctl00_PageMainContent_filterPane_content_chklstCourse&#39;,Advanced Networking for EBI/DVM);
SelectAll(&#39;ctl00_PageMainContent_filterPane_content_chklstCourse&#39;,7 Habits of Highly Effective People);

第二个参数看起来像字符串,但它们没有被引用。

“有错误的完成”通常意味着存在脚本问题(JavaScript)而不是ASP.NET问题-如果是这个问题,页面根本无法编译。问题肯定出在这个字符串中:SelectAll(';ctl00#PageMainContent#filterPane#content#chklstCourse';,EBI/DVM的高级网络);因为系统将“'”编码为';somewhy。您应该提供与chklstCourse相关的信息。