2013-11-04 4 views
0

내가 페이지가 성공적으로로드하지만

에서 .aspx "오류와 함께 완료"브라우저 바닥 글 상태에

오류 "예상을 ')'"얻고 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> 

checkboxlist 컨트롤에서 onclick 이벤트가 자동으로 추가 된보기 소스에서이 문제가 발생 했습니까?

아이디어가 있으십니까? 미리 감사드립니다.

+2

"오류가 발생했습니다"는 일반적으로 ASP.NET 문제가 아니라 스크립팅 문제 (JavaScript)가 있다는 것을 의미합니다. 문제가있는 경우 페이지가 전혀 컴파일되지 않습니다. – James

+0

문제는 확실히이 문자열에 있습니다 : SelectAll (' ctl00_PageMainContent_filterPane_content_chklstCourse ', EBI/DVM 용 고급 네트워킹); 시스템에서 " '"을 ' somewhy로 인코딩합니다. 당신은 chklstCourse와 관련된 제안을 제공해야합니다. – Agat

답변

0

이 두 함수 호출의 첫 번째 매개 변수는 큰 따옴표로 묶습니다 (&#39;). 두 번째 매개 변수도 따옴표로 묶어야합니까?

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); 

두 번째 매개 변수는 문자열처럼 보이지만 따옴표로 묶이지는 않습니다.