lewismallard
New Member
How do I go about getting the selected value from the DropDownList in asp.Net using selectedIndexChanged with an update Panel? I've tried but when I add the AutoPostBack to my DropDownList, it sends me to an error page saying it cannot find the resource.(doesn't even hit my "selected_IndexChanged") I have the hiddenField being assigned the selected value.Here is my DropDownList:\[code\]<asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:UpdatePanel runat="server" ID="UpdatePanel1"> <ContentTemplate> <asp
ropDownList runat="server" ID="ddlCaseFilesNew" DataSourceID="dsCaseFiles" DataTextField="Display" DataValueField="FileID" OnPreRender="ddl_PreRender" Width="300px" AutoPostBack="true" OnSelectedIndexChanged="ddlCaseFilesNew_SelectedIndexChanged" Visible="False"> <asp:ListItem>Item 1</asp:ListItem> </asp
ropDownList> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="ddlCaseFilesNew" EventName="SelectedIndexChanged" /> </Triggers> </asp:UpdatePanel>\[/code\]When I click on a value inside the DropDownList it sends me to a "cannot find resource" page. I have no idea why. It doesn't even touch my "onSelectedIndexChanged"\[code\] <script runat="server"> protected void ddlCaseFilesNew_SelectedIndexChanged(object sender, EventArgs e) { hidNewCaseFile.Value = http://stackoverflow.com/questions/12679720/ddlCaseFilesNew.SelectedItem.Value; }</script>\[/code\]

