Link to home
Create AccountLog in
Avatar of DowntownIT
DowntownITFlag for United States of America

asked on

Page Error

I am getting the following error and have no idea where to start looking. Also you should know that this page is ran in a 3rd party app and this is where I get the error. In debug and if I hit the page directly I do not get the error. The app returns this User-Agent header from a trace.

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MDDR; InfoPath.3)


 User generated image

<%@ Page Language="VB" CodeFile="PerformancePositions.aspx.vb" Inherits="PerformancePositions" MasterPageFile="MasterPage.master" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="content2" ContentPlaceHolderID="cphPageTitle" runat="server">
    <asp:Label ID="lblcontTitle" Text="Position Manager" runat="server" Font-Bold="true"
        Font-Size="36px" ForeColor="#8B0020"> </asp:Label>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">
            <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"  EnablePartialRendering="False">
            </asp:ToolkitScriptManager>
    <asp:Label ID="lbPerfType" runat="server" Text=""></asp:Label>
    <div id="dvOuter" runat="server">
        <div id="divMain">

        </div>
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
                <br />
                <asp:Label ID="lbPointsAssigned" runat="server" ForeColor="#FF3300" Visible="False"></asp:Label>
                <br />
                <br />
                <table style="width: 100%;">
                    <tr>
                        <td class="style1" colspan="4">
                        
                                Number of rows per page:
                                <asp:TextBox ID="txtBoxNumberofPages" runat="server" Width="32px">15</asp:TextBox>
                                <asp:LinkButton ID="lbRefresh" runat="server">Refresh</asp:LinkButton>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtBoxNumberofPages"
                                    ErrorMessage="Only numbers are allowed" SetFocusOnError="True" ValidationExpression="^\d+$"
                                    ValidationGroup="check"></asp:RegularExpressionValidator>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtBoxNumberofPages"
                                    ErrorMessage="Number of rows is required" SetFocusOnError="True"></asp:RequiredFieldValidator>
                        </td>
                        <td valign="top" class="style2">
                            &nbsp;
                        </td>
                        <td valign="top">
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="style1" colspan="2" rowspan="2">
                            <i><span class="style4">Confirm(C) Confirm the Ambassador for the event</span></i><br />
                            <i><span class="style4">Assign(A) Assign the Ambassador to a position</span></i><br />
                            <i><span class="style4">Request(R) Move the Ambassador to requested</span></i><br />
                            <i><span class="style4">Waiting List(W) Move the Ambassador to the Waiting List</span></i><br />
                            <i><span class="style4">Clear(D) Clear new position</span></i>
                        </td>
                        <td valign="top" class="style2" rowspan="2">
                        </td>
                        <td align="center" class="style2" valign="top">
                            <asp:Button ID="cmdMoveToRequested" runat="server" Text="Not Needed" CssClass="TessiButton" />
                            <i><span class="style4">
                                <br />
                                <span class="style5">Warning: This will move all requested to not needed</span></span></i>
                        </td>
                        <td valign="top" rowspan="2">
                        </td>
                        <td rowspan="2">
                        </td>
                    </tr>
                    <tr>
                        <td class="style2" valign="top">
                            &nbsp;
                        </td>
                    </tr>
                    <tr class="tessitura">
                        <td class="style1" valign="top" colspan="4">
                                <asp:GridView ID="GridView1" runat="server" Width="775px" OnPageIndexChanging="GridView1_PageIndexChanging"
                                    AllowPaging="True" Font-Size="10pt" AllowSorting="True" OnSorting="gridView_Sorting"
                                    CssClass="TessiGrid">
                                    <Columns>
                                        <asp:ButtonField ButtonType="Link" Text="C" CommandName="Move_To_Confirm" />
                                        <asp:ButtonField CommandName="Assign_To_Position" Text="A" />
                                        <asp:ButtonField CommandName="move_to_requested" Text="R" />
                                        <asp:ButtonField CommandName="Move_To_Wait" Text="W" />
                                        <asp:ButtonField CommandName="clear" Text="D" />
                                    </Columns>
                                    <SelectedRowStyle BackColor="#FFFF99" />
                                    <AlternatingRowStyle CssClass="TessiGridAltRow" />
                                </asp:GridView>
                            <br />
                        </td>
                        <td valign="top" rowspan="1" class="tessitura" height="230px">
                                    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" CssClass="TessiDropDown">
                                    </asp:DropDownList>
                                    <br />
                                    <asp:ListBox ID="ListBox1" runat="server" Height="220px" Font-Size="10pt" CssClass="TessiListBox">
                                    </asp:ListBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style6" valign="top">
                            <asp:Button ID="cmdSubmitChanges" runat="server" Text="Submit Changes" 
                                CssClass="TessiButton" />
                            <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                                <ProgressTemplate>
                                    <div id="IMGDIV" align="center" valign="middle" runat="server" style="position: absolute;
                                        left: 45%; top: 75%; visibility: visible;">
                                        <img src="Images/progress_gif.gif" alt="" style="width: 56px; height: 49px" /><br />
                                        Updating...
                                    </div>
                                </ProgressTemplate>
                            </asp:UpdateProgress>
                        </td>
                        <td valign="top">
                            &nbsp;
                        </td>
                        <td valign="top" colspan="2">
                            <asp:Label ID="lblWarning" runat="server" Font-Bold="True" Font-Size="Large"></asp:Label>
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
        <!-- End UpdatePanel2 -->
        <asp:Label ID="lblTest1" runat="server"></asp:Label>
        <br />
        <asp:Label ID="lblTest2" runat="server"></asp:Label>
        <br />
        <br />
        <asp:CheckBox ID="CheckBox1" runat="server" Text="Delete all Seats" Visible="false" />
    </div>

    <script type="text/javascript">
        Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(startRequest);
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);

        function startRequest(sender, e) {
            //disable button during the AJAX call
            document.getElementById('<%=cmdSubmitChanges.ClientID%>').disabled = true;
            document.getElementById('<%=cmdSubmitChanges.ClientID%>').value = 'Updating Records...';
            document.getElementById('<%=cmdMoveToRequested.ClientID%>').disabled = true;
            document.getElementById('<%=cmdMoveToRequested.ClientID%>').value = 'Updating Records...';

        }
        function endRequest(sender, e) {
            //re-enable button once the AJAX call has completed
            document.getElementById('<%=cmdSubmitChanges.ClientID%>').disabled = false;
            document.getElementById('<%=cmdSubmitChanges.ClientID%>').value = 'Submit Changes';
            document.getElementById('<%=cmdMoveToRequested.ClientID%>').disabled = false;
            document.getElementById('<%=cmdMoveToRequested.ClientID%>').value = 'Not Needed';
        }

    </script>

</asp:Content>
<asp:Content ID="Content3" runat="server" contentplaceholderid="head">
    <style type="text/css">
        .style5
        {
            font-size: small;
        }
    </style>
</asp:Content>

Open in new window

Avatar of sammySeltzer
sammySeltzer
Flag of United States of America image

Try to disable these lines *temporarily* and the actual problem will be revealed.
 
           <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"  EnablePartialRendering="False">
            </asp:ToolkitScriptManager>

Avatar of DowntownIT

ASKER

I ended up with this error.

The control with ID 'UpdatePanel2' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.


Thanks,
Ok, please look in web.config file and see if there is an entry like this:

 <xhtmlConformance mode="Legacy"/>

If you see it, please remove it and try running your code again to see if it fixes it.
Not there.
wow!

There is only one thing else I can try.

Change this line:

           <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"  EnablePartialRendering="False">
            </asp:ToolkitScriptManager>

to this line:

           <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"  EnablePartialRendering="False" CombineScripts="False">
            </asp:ToolkitScriptManager>

and see what happens

Back to the orginal error.
ASKER CERTIFIED SOLUTION
Avatar of GlobaLevel
GlobaLevel
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
I assume you are talking about this part of the code?

        Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(startRequest);
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);

How would I handle partial rendering? sorry, but I am very new at this stuff.
I removed all of this code.

    <script type="text/javascript">
        Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(startRequest);
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);

        function startRequest(sender, e) {
            //disable button during the AJAX call
            document.getElementById('<%=cmdSubmitChanges.ClientID%>').disabled = true;
            document.getElementById('<%=cmdSubmitChanges.ClientID%>').value = 'Updating Records...';
            document.getElementById('<%=cmdMoveToRequested.ClientID%>').disabled = true;
            document.getElementById('<%=cmdMoveToRequested.ClientID%>').value = 'Updating Records...';

        }
        function endRequest(sender, e) {
            //re-enable button once the AJAX call has completed
            document.getElementById('<%=cmdSubmitChanges.ClientID%>').disabled = false;
            document.getElementById('<%=cmdSubmitChanges.ClientID%>').value = 'Submit Changes';
            document.getElementById('<%=cmdMoveToRequested.ClientID%>').disabled = false;
            document.getElementById('<%=cmdMoveToRequested.ClientID%>').value = 'Not Needed';
        }

    </script>


In doing so, My page works with no errors. This code was used to prevent the user clicking buttons while the DB was being updated so I wonder if there is a better way of doing that.
I removed all of the code using the PageRequestManager.

Thanks,