asp.net中的jquery datepicker

Nic*_*ahn 1 asp.net datepicker

以下代码有什么问题,它给我一个错误的编译错误信息:CS1002 :; 预期

    $(document).ready(function() {

      $('<%=StartDate.UniqueID%>').datepicker({ showOn: 'button',
          buttonImage: '../images/Calendar.png',
          buttonImageOnly: true, onSelect:
                function() { },
          onClose: function() { $(this).focus(); }
      }); 
    });

<label for="sd">StartDate:</label>
    <asp:TextBox ID="StartDate" runat="server"></asp:TextBox>
Run Code Online (Sandbox Code Playgroud)

错误

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). 
Run Code Online (Sandbox Code Playgroud)

Nic*_*ahn 5

我得到错误的原因:

"Microsoft JScript运行时错误:对象不支持此属性或方法"

因为我有冲突.js引用,页面上有两组不同的.js

希望这有助于其他人.