When I use the ScriptManager and UpdatePanel (asp.net 4.0) When I deployed the code to the server, I opened F12 of the browser and found the following error: "Sys is not defined"
This error is in the js code generated by ScriptManager
<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ScriptManager', 'Form1', ['tUpdatePanel',''], ['btnHistorySearch',''], [], 90, '');
//]]>
</script>
The code of my aspx is as follows:
<div class="userContainer">
<asp:ScriptManager ID="ScriptManager" runat="server" />
<asp:UpdatePanel ID="UpdatePanel" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:GridView ID="gvHistory" runat="server" EnableViewState="false" AutoGenerateColumns="false"
RowStyle-Height="20" BorderColor="#e6e6e6" CssClass="gvTable" Width="100%">
<Columns>
<asp:BoundField HeaderText="Field Name" DataField="FieldName" HeaderStyle-CssClass="gvTopLeft" />
<asp:BoundField HeaderText="Old Value" DataField="OldValue" HeaderStyle-CssClass="gvTopLeft" />
<asp:BoundField HeaderText="New Value" DataField="NewValue" HeaderStyle-CssClass="gvTopLeft" />
<asp:BoundField HeaderText="Recorded By" DataField="CreatedByName" HeaderStyle-CssClass="gvTopLeft" />
<asp:BoundField HeaderText="Recorded On" DataField="CreatedOn" HeaderStyle-CssClass="gvTopLeft" DataFormatString="{0:MM/dd/yyyy HH:mm:ss}" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
The strange thing is that everything work fine when I debug locally, and so does my colleague, but when deploying to the server, my colleague logs in and sees a normal page, and I see the error described above
It is worth mentioning that after the comparison, I found that we have different performances about ScriptResource.axd and WebResource.axd. His request to obtain these two files is normal, and my return is
Cannot find the specified user. Please verify your login information.
I read the answers from the article below, but it doesn't seem to work for me, can anyone help with this? Sys is undefined
Thanks!