title: Call jquery modal popup from asp.net dropdownlist change
body: <p>I have a requirement to do some logic execution upon change of dropdownlist value. Before executing the logic i need to take user confirmation and then call service side method to complete the process. Not sure How to call server side method based on modal popup confirmation response from user. So if user confirms with Yes button on the modal popup server side code should be called otherwise do nothing.</p>
  
  <p>Here is the code i have . Server side does not get called upon modal popup confirmation.</p>
  
  <pre><code>    function PopupDialog(title, text) {
          var div = $('&lt;div&gt;').html('&lt;br&gt;'+text).dialog({
          title: title,
          modal: true,
          height: 190,
          width: 320,
          buttons: {
              "Yes": function () {
                  $(this).dialog('close');
  
              },
              "No": function () {
                  $(this).dialog('close');
  
              }
           }
           });
  
           return true;
        };
  
  
  
       &lt;asp:GridView runat="server" ID="grdTransactions" SkinID="gridviewskin"  
          AllowSorting="true" AllowPaging="true" PageSize="30" Width="100%" 
          OnRowDataBound="grdTransactions_RowDataBound"
          OnDataBound="grdTransactions_DataBound"  
          OnSelectedIndexChanged="grdTransactions_SelectedIndexChanged"&gt;
  
         .............
  
      &lt;asp:TemplateField Visible="true" HeaderText="Status" &gt;
          &lt;ItemTemplate&gt;
              &lt;asp:Label runat="server" ID="lblStatus"  Visible="False" Text='&lt;%# ShowStatus( Container.DataItem ) %&gt;' /&gt;
              &lt;asp:DropDownList ID="ddlTransactionList" AutoPostBack="True"  OnSelectedIndexChanged="ddlTransactionList_SelectedIndexChanged" onchange="return PopupDialog('Remittance Confirmation','Are you sure you want to update the status?.');"  runat="server"&gt;&lt;/asp:DropDownList&gt;
              &lt;br/&gt;
          &lt;/ItemTemplate&gt;
      &lt;/asp:TemplateField&gt;
  
  
     **Server Side Code --**
      protected void ddlTransactionList_SelectedIndexChanged(object sender, 
            EventArgs e)
      {
          //Your Code
          if (OnDataChanged != null)
              OnDataChanged(sender, e);
      }
  </code></pre>
  
  <p>Thank you</p>