日期:2014-05-16  浏览次数:20511 次

帮我看看这个有什么语法错误
<%if(pair.Value.Count>=3){ %>
          <div class="xllist" style="display: none;">
          <%foreach(TeaCategory teacategory in pair.Value){%><%if(teacategory.CategoryID==46){ %><a href="/MingRen.html">
          <%=teacategory.CategoryName %></a>          
          <%else if(teacategory.CategoryID==23){%><a href="/Minn.html"><%=teacategory.CategoryName %></a><%}          
          <%}else{ %>
          <a href="/ProductSort.html?BigProductType=<%=pair.Key.CategoryID %>&SmallProductType=<%=teacategory.CategoryID %>">
          <%=teacategory.CategoryName %></a><%}} %></div>
                          <%}}} %>
------解决方案--------------------

<%if(pair.Value.Count>=3){ %>
          <div class="xllist" style="display: none;">
          <%foreach(TeaCategory teacategory in pair.Value){%>
            <%if (teacategory.CategoryID == 46){ %>
                <a href="/MingRen.html"><%=teacategory.CategoryName%></a>          
            <%} else if (teacategory.CategoryID == 23){%>
                <a href="/Minn.html"><%=teacategory.CategoryName%></a>
            <%} else { %>
                <a href="/ProductSort.html?BigProductType=<%=pair.Key.CategoryID %>&SmallProductType=<%=teacategory.CategoryID %>">
                <%=teacategory.CategoryName%></a>
            <%}
           } %>
           </div>
      <%} %>


else if那边少了一个结束的括号}
后面的else那里多了一个<%标签
------解决方案--------------------
<%if(pair.Value.Count>=3)
      { %>
    <div class="xllist" style="display: none;">
        <%foreach(TeaCategory teacategory in pair.Value)
  {%>
     &