title: modal pop-up ok button not working as expected for a dropdown menu
body: <p>CODE BEHIND:</p>
  
  <pre><code>  private void Page_Load(object sender, System.EventArgs e)
      {
          if (!Page.IsPostBack)
          {
              ddlLanguage.SelectedValue = Thread.CurrentThread.CurrentCulture.Name;
          }
  
      }
  
  
  
      protected void ddlLanguage_SelectedIndexChanged(object sender, EventArgs e)
      {
  
          if (ddlLanguage.SelectedValue == "es-ES")
          {
              mdlPopup.Show();
          }
          //Sets the cookie that is to be used by Global.asax
          HttpCookie cookie = new HttpCookie("CultureInfo");
          cookie.Value = ddlLanguage.SelectedValue;
          Response.Cookies.Add(cookie);
  
          //Set the culture and reload the page for immediate effect. 
          //Future effects are handled by Global.asax
          Thread.CurrentThread.CurrentCulture = new CultureInfo(ddlLanguage.SelectedValue);
          Thread.CurrentThread.CurrentUICulture = new CultureInfo(ddlLanguage.SelectedValue);
          //Server.Transfer(Request.Path);
      }
  
  
      protected void OKButton_Click(object sender, EventArgs e)
      {
          Server.Transfer(Request.Path);
      }
  </code></pre>
  
  <p>ASPX PAGE:</p>
  
  <pre><code> &lt;asp:DropDownList ID="ddlLanguage" class="langpnl" runat="server" AutoPostBack="True"
        OnSelectedIndexChanged="ddlLanguage_SelectedIndexChanged"&gt;
     &lt;asp:ListItem Value="en-US"&gt;Eng&lt;/asp:ListItem&gt;
     &lt;asp:ListItem Value="es-ES"&gt;Esp&lt;/asp:ListItem&gt;
   &lt;/asp:DropDownList&gt;
  &lt;ajaxToolkit:ModalPopupExtender ID="mdlPopup" runat="server" TargetControlID="testhidden"
     PopupControlID="pnlPopup" OkControlID="OKButton" /&gt;
  &lt;asp:Panel ID="pnlPopup" runat="server" Width="500px" Style="display: none"&gt;
     All content may not be in Spanish.
  &lt;asp:Button ID="OKButton" runat="server" Text="OK" OnClick="OKButton_Click" /&gt;
  &lt;/asp:Panel&gt;
  &lt;asp:HiddenField ID="testhidden" runat="server" /&gt;
  </code></pre>
  
  <p>I am trying to set the language as per the selection in the Dropdown box. But if the user selects spanish I want to display a popup modal with a msg &amp; once the button OK is pressed I want to postback the whole page.
  Currently I am able to display the popup but the page never refreshed so the language still doesn't change. In the code behind if I remove the server.transfer from the OK button and put it in the SelectIndexChange then the page postback is working but there is no popup masg .I think the page gets postback after the popup executes so it never gets displayed...please need some help I am breaking my head since last 3 days.</p>