After utilizing the ScriptManager and UpdatePanel in asp.net 4.0, I encountered an error upon deploying the code to the server. Upon inspecting the browser console (F12), I found the message "Sys is not defined" in the generated js code by ScriptManager.
<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ScriptManager', 'Form1', ['tUpdatePanel',''], ['btnHistorySearch',''], [], 90, '');
//]]>
</script>
The structure of my aspx file 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>
An interesting observation is that everything functions correctly during local debugging for both me and my colleague. However, upon deployment to the server, my colleague can access the page without any issues, while I encounter the aforementioned error.
I noticed a discrepancy between the performance of ScriptResource.axd and WebResource.axd between us. While his requests for these files are successful, mine returns:
Cannot find the specified user. Please verify your login information.
Although I have consulted various solutions from this article Sys is undefined, none seem to resolve my issue. Can anyone provide assistance with this matter?
Thank you!