среда, 4 мая 2011 г.

Best Way to Register jquery and other scripts in asp.net pages


This time I want to explain the best way to register scripts in asp.net pages using the script manager. If you need to know what is the script manager go to script manager Overview.
Here the code for register.
<asp:ScriptManager ID="ScriptManager1" runat="server">
      <Scripts>
          <asp:ScriptReference 
Path="jquery/jquery-1.3.2.js" 
ScriptMode="Release" />
          <asp:ScriptReference 
Path="jquery/ui/ui.core.js" 
ScriptMode="Release" />
          <asp:ScriptReference 
Path="jquery/ui/ui.datepicker.js" 
ScriptMode="Release" />
          <asp:ScriptReference 
Path="jquery/jquery.jqURL.js" 
ScriptMode="Release" />
      </Scripts>
  </asp:ScriptManager> 
Remeber put this code inside form tag.
any suggestion leaves a comment.
good luck.

Комментариев нет: