locked
Ajax error in VS 2008 RRS feed

  • Question

  • User-39953368 posted

    I have a page that uses update panel. There are a couple of cascading drop down list and a button. When I make my selections in the drop downs and click Submit button I get :

    "Error: Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format."

    I set enablePartialRendering to false to see if I can get the actual error but I just get another JS error, this time:

    "Error: Unable to get property 'add_pageLoaded' of undefined or null reference"

    The compiled code works fine when accessed through a browser (or is it suppressing the error display?)

    Friday, November 7, 2014 9:25 AM

All replies

  • User465171450 posted

    It could be swallowing the error. In the IE options you can turn on script debugging which should show any errors. Also the F12 developer console in a modern browser should also report any JS errors.

    If you are testing this with the VS development server try using IIS instead. The development server that shipped with VS was originally a project called Cassini that was intended for enabling Windows XP Home edition users to be able to develop and test web apps (since Home didn't come with IIS like Pro did). Cassini isn't always the best test platform as it isn't code identical to IIS and has some goofiness.

    Friday, November 7, 2014 9:28 AM
  • User724169276 posted

    Can you share some related codes ?

    Friday, November 7, 2014 9:29 AM
  • User-39953368 posted

    How do I set it to use IIS and not Cassini?

    Friday, November 7, 2014 10:05 AM
  • User-39953368 posted

    This is the jest of it; I removed additional drop downs, etc.

    <ajaxToolkit:ToolkitScriptManager runat="server" ID="ScriptManager1" EnablePartialRendering="false">
    </ajaxToolkit:ToolkitScriptManager>
    
    <asp:UpdatePanel runat="server" ID="uppnlSelUser">
        <ContentTemplate>
            <asp:DropDownList 
                runat="server" 
                ID="ddlArea" 
                AutoPostBack="true" 
                AppendDataBoundItems="true" 
                DataSourceID="odsArea" 
                DataTextField="Area" 
                DataValueField="AreaID" 
                OnSelectedIndexChanged="ddlArea_SelectedIndexChanged">
                <asp:ListItem Text="Select Area" Value="-1" />
            </asp:DropDownList>
            <asp:ImageButton runat="server" 
                ID="ibSelAreaUser" 
                AlternateText="Select This User" 
                ImageUrl="selectUser.gif" 
                onclick="ibSelect_Click" 
                CausesValidation="true" 
                ValidationGroup="vgSelAreaUser" />
        </ContentTemplate>
    </asp:UpdatePanel>
    
    

    Friday, November 7, 2014 10:15 AM
  • User61956409 posted

    Hi NoBullMan,

    Thanks for your post.

    This is the jest of it; I removed additional drop downs, etc.

    <ajaxToolkit:ToolkitScriptManager runat="server" ID="ScriptManager1" EnablePartialRendering="false">
    </ajaxToolkit:ToolkitScriptManager>
    
    <asp:UpdatePanel runat="server" ID="uppnlSelUser">
        <ContentTemplate>
            <asp:DropDownList 
                runat="server" 
                ID="ddlArea" 
                AutoPostBack="true" 
                AppendDataBoundItems="true" 
                DataSourceID="odsArea" 
                DataTextField="Area" 
                DataValueField="AreaID" 
                OnSelectedIndexChanged="ddlArea_SelectedIndexChanged">
                <asp:ListItem Text="Select Area" Value="-1" />
            </asp:DropDownList>
            <asp:ImageButton runat="server" 
                ID="ibSelAreaUser" 
                AlternateText="Select This User" 
                ImageUrl="selectUser.gif" 
                onclick="ibSelect_Click" 
                CausesValidation="true" 
                ValidationGroup="vgSelAreaUser" />
        </ContentTemplate>
    </asp:UpdatePanel>
    

    Have you resolved the problem? Besides, the dropdownlists are cascading, why did you remove additional drop downs?

    Best Regards,

    Fei Han

    Monday, November 10, 2014 3:33 AM
  • User-39953368 posted

    Still exists.

    I thought other controls were irrelevant. You make a selection form one drop down, it takes the ID of selected item and populates the next drop down.

    Tuesday, November 11, 2014 8:04 PM