Css 使用引导和C停止页面刷新

Css 使用引导和C停止页面刷新,css,postback,Css,Postback,当用户从Dropbox中选择Sample Id时,我需要停止页面刷新。因为我使用的是折叠引导功能,所以我不希望用户每次选择新样本ID查看查询结果时都单击链接单击此处更新样本。请看下图 附:SQL代码可以工作。谢谢 HTML代码 <div class ="container"> <asp:HyperLink ID="UpdateSample" runat="server" Enabled="False" Visible="False" href="#UpdateSampleF

当用户从Dropbox中选择Sample Id时,我需要停止页面刷新。因为我使用的是折叠引导功能,所以我不希望用户每次选择新样本ID查看查询结果时都单击链接单击此处更新样本。请看下图 附:SQL代码可以工作。谢谢

HTML代码

<div class ="container">
 <asp:HyperLink ID="UpdateSample" runat="server" Enabled="False" Visible="False" href="#UpdateSampleForm" data-toggle="collapse" CssClass="auto-style47">Click Here to Update Sample</asp:HyperLink>

  <div id="UpdateSampleForm" class="collapse">
      <div class="auto-style110">
      <div>
       <span class="auto-style98"><strong><span class="auto-style114">Select Sample ID&nbsp;&nbsp; </span></strong></span>&nbsp;&nbsp;&nbsp;

   <asp:DropDownList ID="DropDownListUpdateSample" runat="server" Height="37px" Width="132px" CssClass="auto-style111" AutoPostBack = "true" OnSelectedIndexChanged="DropDownListUpdateSample_SelectedIndexChanged" AppendDataBoundItems="False" OnClientClick="return false;" >
             </asp:DropDownList>                        

  </div>
  <table class="table table-condensed" style="width: 89%; font-size: smaller; height: 404px;">
     <thead>
        <tr class="auto-style54">
           <th class="auto-style12">MBID *</th>
           <th class="auto-style10">Sample ID*</th>
            <th class="auto-style11">Sample Type * </th>
             <th class="auto-style70">Sample Date</th>
             <th class="auto-style75">Sample Trial</th>
              <th class="auto-style12">First Sample Select</th>
               <th class="auto-style12">Comments</th>
             </tr>
           </thead>
        <tbody>
           <tr>
             <td class="auto-style48">
              <asp:TextBox class="form-control text-uppercase" ID="txtUpdateSample" runat="server" Height="29px" Width="145px" placeholde= "MBID" required="required" autofocus="autofocus" ReadOnly="True"></asp:TextBox>
              </td>
             <td class="auto-style49">
               <asp:TextBox  class="form-control text-uppercase" ID="txtUpdateSampleID" runat="server" Height="29px" Width="119px"  placeholde= "Sample Type" required="required" autofocus="autofocus" ReadOnly="True"></asp:TextBox>
            </td>
             <td class="auto-style73">
               <asp:TextBox  class="form-control text-uppercase" ID="txtUpdateSampleType" runat="server" Height="29px" Width="119px"  placeholde= "Sample Type" required="required" autofocus="autofocus"></asp:TextBox>
             </td>
             <td class="auto-style71">
             <asp:TextBox class="form-control text-uppercase" ID="txtUpdateSampleDate" runat="server" Height="32px" Width="104px" placeholde= "dd/mm/yyyy" required="required" autofocus="autofocus"></asp:TextBox>
          <asp:CompareValidator ID="CompareValidator9" runat="server" ControlToValidate="txtSampleDate" ErrorMessage="Invalid Date Format" 
          Type="Date" Operator="DataTypeCheck" Display="Dynamic" 
        Text="Invalid Date Format dd/MM/yyyy" ForeColor="Red" ValidationGroup="valGroup1">
        </asp:CompareValidator>
        </td>
         <td class="auto-style76">
          <asp:TextBox class="form-control text-uppercase" ID="txtUpdateSampleTrial" runat="server" Height="30px" Width="136px" placeholde= "Sample Trial Number" ></asp:TextBox>
          </td>
           <td class="auto-style49">
            <asp:DropDownList ID="DropDownListUpdateFirstSample" runat="server" Height="34px" Width="146px" class="text-uppercase" CssClass="auto-style29">
        <asp:ListItem></asp:ListItem>
        <asp:ListItem Value="Yes" Text="Yes"></asp:ListItem>
          <asp:ListItem Value="No" Text="No"></asp:ListItem>
          </asp:DropDownList>
          </td>

          <tr>
           <td class="auto-style5">
            <asp:Button class="btn btn-lg btn-info btn-block" ID="btnUpdateSample" runat="server" Text="Update Sample" Height="41px" Width="161px"  OnClick="btnAddSample_Click" UseSubmitBehavior="false" data-dismiss="modal" />
            </td>
              </tr>
       </tbody>
      </table>
     </div>                     
        </div>   

您可以使用Javascript暂停:

function pause() {
    setTimeout(function () {
        location.pause();
    }, (60 * 1000));
}

60秒后,它再次加载。您可以增加此号码,以便在重新加载时等待更长的时间。

感谢您回复“暂停”功能的调用位置