title: Load a div without refreshing the page in asp.net
body: <p>I'm loading a popup div dynamically with different html page contents. The HTML page controls are rending on div successfully but the problem is, the whole page is refreshing during loading the content using <code>$("#middlepart").load()</code>
  I want to reload the content without refreshing the page in asp.net.
  The code is given below:</p>
  
  <pre><code> &lt;div class="popmiddlepart"&gt;
                  &lt;div class="type-benifit"&gt;
                      &lt;div class="subdivOne"&gt;
                          &lt;div class="fl-lt"&gt;
                              &lt;label&gt;Type of Benefit&lt;/label&gt;
                          &lt;/div&gt;
                          &lt;div class="fl-lt"&gt;
                              &lt;div id="ddlBenefitType" &gt;
                              &lt;/div&gt;
  
                          &lt;/div&gt;
                          &lt;div class="clearfix"&gt;&lt;/div&gt;
                          &lt;hr style="margin-bottom: 10px; margin-top: 10px;"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  
  
                  &lt;div id="relate-message-box-html" style="display: none"&gt;
                      &lt;i class="fa fa-info-circle" aria-hidden="true" style="color: red;"&gt;&lt;/i&gt;&lt;strong&gt;&lt;/strong&gt;
                      &lt;span id="spnToolTipTexthtml"&gt;&lt;/span&gt;
                  &lt;/div&gt;
  
                  &lt;div class="clearfix"&gt;&lt;/div&gt;
                  &lt;div id="middlepart" class="dynamic-content"&gt;
                      &lt;div class="middle-part"&gt;
                          content goes here
                      &lt;/div&gt;
                  &lt;/div&gt;
  
               &lt;/div&gt;
  </code></pre>
  
  <p>I'm updating the div calling the dropdown onchange event  </p>
  
  <pre><code>  $("#ddlBenefitType").relateSelectControl({
              selectControlDataSource: benefittypedata,
              dataValueField: 'id',
              dataTextField: 'text',
  
              onchange: function (e) {
                  e.preventDefault();
                  var selectedtype = $("#ddlBenefitType").getSelectControlText();
  
                  if (selectedtype == 'Accommodation') {
                      var key = getQueryStringValue('id');
                      $("#middlepart").load(baseUrl + "employee/accomodationdetails_ie.html?id=" + key);
                  }
  
                  if (selectedtype == 'Loan') {
                      var key = getQueryStringValue('id');
                      $("#middlepart").load(baseUrl + "employee/loandetails_ie.html?id=" + key);
                  }
              }
          });
  </code></pre>