Why is AutoPostBack trying to load a page if I only have it for set for a DropDownList in an update panel
<p>I have a DropDownList in a popup where I am trying to get a user's input. I also have a "onselectedIndexChanged" for getting the users input. I have my entire DropDownList in an updatePanel so that only the DropDownList gets updated.(the popup is built using JQuery/JS) I user JS to the hiddenfield value then pass it to another function)
Here is my code :</p>

<pre><code>&lt;div id="ddlFiles"&gt;
    &lt;label&gt;
        Select new CaseFile:&lt;/label&gt;
    &lt;asp:ScriptManager ID="ScriptManager1" runat="server" /&gt;
    &lt;asp:UpdatePanel runat="server" ID="UpdatePanel1"&gt;
        &lt;ContentTemplate&gt;
            &lt;asp:DropDownList runat="server" ID="ddlCaseFilesNew" DataSourceID="dsCaseFiles"
                DataTextField="Display" DataValueField="FileID" OnPreRender="ddl_PreRender" Width="300px"
                AutoPostBack="true" OnSelectedIndexChanged="ddlCaseFilesNew_SelectedIndexChanged"&gt;
                &lt;asp:ListItem&gt;Item 1&lt;/asp:ListItem&gt;
            &lt;/asp:DropDownList&gt;
        &lt;/ContentTemplate&gt;
        &lt;Triggers&gt;
            &lt;asp:AsyncPostBackTrigger ControlID="ddlCaseFilesNew" EventName="SelectedIndexChanged" /&gt;
        &lt;/Triggers&gt;
    &lt;/asp:UpdatePanel&gt;
&lt;/div&gt;
</code></pre>

<p>and here is my selectedIndexChanged:</p>

<pre><code>&lt;script runat="server"&gt;
    protected void ddlCaseFilesNew_SelectedIndexChanged(object sender, EventArgs e)
    {
        hidNewCaseFile.Value = ddlCaseFilesNew.SelectedItem.Value;
    }
&lt;/script&gt;
</code></pre>

<p>Now for some reason as soon as I select something from the list it sends me to a "cannot find resource " page. I don't know why it does that. My url looks like this:</p>

<pre><code>http://localhost:49355/base/Expenses/ViewExpenses.aspx?CaseFileID=2001
</code></pre>

<p>When I try to select a value, it opens that error (cannot find resource) page and says I can't find the link. </p>

<p>Here is a picture of the error:<img src="http://i.stack.imgur.com/Lx8tN.png" alt="enter image description here"></p>

<p>Page_load:</p>

<pre><code>Response.Cache.SetAllowResponseInBrowserHistory(false);
    Response.Cache.SetCacheability(HttpCacheability.NoCache);
    if (!isLoggedIn())
        return;

    if (Request.QueryString["ExpenseID"] != null)
    {
        if (!IsPostBack)
        {
            ddlCaseFilesNew.DataSourceID = "dsCaseFiles";
            ddlCaseFilesNew.SelectedIndex = -1;
            ddlCaseFilesNew.DataTextField = "Display";
            ddlCaseFilesNew.DataValueField = "FileID";
            ddlCaseFilesNew.DataBind();
            if (Request.QueryString["CaseFileID"] != null)  // from view&gt;casefiles&gt;casefile#&gt;notes
                hidCaseFile.Value = Request.QueryString["CaseFileID"].ToString();
        }
    }
    if (Request.QueryString["CaseFileID"] != null)  // from view&gt;casefiles&gt;casefile#&gt;notes
        hidCaseFile.Value = Request.QueryString["CaseFileID"].ToString();
    else if (Request.QueryString["FileID"] != null &amp;&amp; Request.QueryString["TaskID"] != null)    // from view&gt;task&gt;specific task notes
    {
        hidCaseFile.Value = Request.QueryString["FileID"].ToString();
        hidTaskID.Value = Request.QueryString["TaskID"].ToString();
    }
}

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>
