<script type="text/javascript">
function GetSelectedValue() {
var selectedValue = document.GetElementById('<%= pnSearch.FindControl("ddlFromFolders").ClientID %>').value;
alert(selectedValue);
}
</script>
<asp:Panel ID="pnSearch" runat="server" GroupingText="Search Positions for move historic PnL" DefaultButton="btnMove" Width="550">
<asp:DropDownList ID="ddlFromFolders" Width="150" runat="server" DataTextField="ShortName" DataValueField="Id" AppendDataBoundItems="True">
<asp:ListItem Value="" Text="Choose folder" />
</asp:DropDownList>
<div align="right">
<asp:Button runat="server" Text="Move PnL" ID="btnMove" OnClick="btnMove_OnClick" OnClientClick="GetSelectedValue();" />
</div>
</asp:Panel>
Seeking assistance to retrieve the chosen value from the dropdownlist. Any guidance would be appreciated.