When trying to populate a DropDownList in an UpdatePanel, I get a 404 error(> Uncaught Sys.WebForms.PageRequestManagerServerErrorException: )
<p>Please bare with me. I am going to paste all the code I have. Then explain what I am trying to do. The reason for posting all the code is so that in hopes that I maybe forgot to add something somewhere because this issue has gotten me close to banging my head against the wall.</p>

<p>I have a dropDownList with radio buttons. The radio buttons are there for sorting the DropDownList(by name, by id etc). The DropDownList is being populated by the Database via stored procedure. It is surrounded by an update panel.</p>

<pre><code>    &lt;div id="casefiles"&gt;
    &lt;ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" /&gt;
  &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always"&gt;
            &lt;ContentTemplate&gt;
                &lt;div id="rbfileByHolder" runat="server"&gt;
                    &lt;label&gt;Sort By&lt;/label&gt;
                    &lt;span&gt;&lt;asp:RadioButton class="aspRBs" GroupName="rbfileByNameOrID" ID="rbMyFiles" Text="My Files" Checked="true"
                        runat="server" AutoPostBack="True" OnCheckedChanged="rbMyFiles_CheckedChanged" /&gt;&lt;/span&gt;
                    &lt;span&gt;&lt;asp:RadioButton class="aspRBs" GroupName="rbfileByNameOrID" id="rbByFileID"
                        Text="By File ID"  runat="server" AutoPostBack="True"
                        oncheckedchanged="rbByFileID_CheckedChanged" /&gt;&lt;/span&gt;
                    &lt;span&gt;&lt;asp:RadioButton class="aspRBs" GroupName="rbfileByNameOrID" id="rbByFileName"
                        Text="By File Name" runat="server" AutoPostBack="True"
                        oncheckedchanged="rbByFileName_CheckedChanged" /&gt;&lt;/span&gt;            

                &lt;/div&gt;&lt;br /&gt;
            &lt;/ContentTemplate&gt;
        &lt;/asp:UpdatePanel&gt;
    &lt;asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"&gt;
            &lt;ContentTemplate&gt;
                &lt;label&gt;Select New CaseFile&lt;/label&gt;
                &lt;asp:DropDownList runat="server" ID="ddlCaseFiles" DataSourceID="dsMyCaseFiles" DataTextField="Display" DataValueField="FileID" OnPreRender="ddl_PreRender" Width="524px" /&gt;
                &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlCaseFiles" ToolTip="Casefile Required" InitialValue="-1" Text="*" Display="Dynamic" /&gt;
                &lt;ajaxToolkit:ListSearchExtender ID="ddlExtCaseFiles" runat="server" PromptCssClass="ListSearchExtenderPrompt" TargetControlID="ddlCaseFiles" BehaviorID="ddlExtCaseFiles" Enabled="True"/&gt;
            &lt;/ContentTemplate&gt;
            &lt;Triggers&gt;
                &lt;asp:AsyncPostBackTrigger ControlID="rbByFileName" EventName="CheckedChanged" /&gt;
                &lt;asp:AsyncPostBackTrigger ControlID="rbByFileID" EventName="CheckedChanged" /&gt;
                &lt;asp:AsyncPostBackTrigger ControlID="rbMyFiles" EventName="CheckedChanged" /&gt;
            &lt;/Triggers&gt;
        &lt;/asp:UpdatePanel&gt;
        &lt;/div&gt;
</code></pre>

<p>Here is my javascript function for showing the controls in a popup:</p>

<pre><code>//create popup with dropdownLists then call moveCaseFile
    function getCaseFiles(canCopyTo) {
        //create Popup with content from div
        $('#casefiles').dialog({
            autoOpen: true,
            height: 'auto',
            width: 'auto',
            modal: true,
            buttons: {
                "Ok": function () {
                    debugger;
                    alert("test");
                    var t = $("#casefiles");
                },
                Cancel: function () {
                    $(this).dialog('close');
                    $("#viewExpensesGrid").flexReload();
                }
            }
        });
    }
</code></pre>

<p>And here is the relevant code behind(radio button sorting and assigning default values for the dropdownlist):</p>

<pre><code>protected void rbByFileName_CheckedChanged(object sender, EventArgs e)
{
    ddlCaseFiles.DataSourceID = "dsCaseFilesReverse";
    ddlCaseFiles.DataTextField = "Display";
    ddlCaseFiles.DataValueField = "FileID";
}

protected void rbByFileID_CheckedChanged(object sender, EventArgs e)
{
    ddlCaseFiles.DataSourceID = "dsCaseFiles";
    ddlCaseFiles.DataTextField = "Display";
    ddlCaseFiles.DataValueField = "FileID";
}

protected void rbMyFiles_CheckedChanged(object sender, EventArgs e)
{
    ddlCaseFiles.DataSourceID = "dsMyCaseFiles";
    ddlCaseFiles.DataTextField = "Display";
    ddlCaseFiles.DataValueField = "FileID";
}
protected void ddl_PreRender(object sender, EventArgs e)
{
    DropDownList ddl = (DropDownList)sender;
    try
    {
        if (ddl.Items[0].Value != "-1")
            ddl.Items.Insert(0, new ListItem("--Select--", "-1"));
    }
    catch
    {
        ddl.Items.Insert(0, new ListItem("--Select--", "-1"));
    }
}
</code></pre>

<p>Ok. Time to explain more.</p>

<p>A popup is suppose to appear and look like this:
![enter image description here][1]</p>

<p>If you click on myFiles, it sorts the drop down list showing all the files you have (via stored procedure). So for every radio button, it gets sorted differently with different information(via stored procedure). But my problem is that when I select a radio button(and it has to execute the stored proc), I get this error:</p>

<p>Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 404</p>

<p>What I think is messing it up is the UpdatePanel/AutoPostback. Instead of just updating the dropdownlist, it tries to refresh the page as well but to another link or something. Please help  before kittens get drop kicked</p>

<p>This is the error I get from the chrome debugger:</p>

<blockquote>
  <p>Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 404</p>
</blockquote>

<p>All these errors happend when I added the AutoPostback="true".</p>
