2017-04-24 1 views
0

사용자가 보관 용 계정에서 샘플 ID를 선택하면 페이지가 새로 고쳐지지 않아야합니다. 내가 붕괴 부트 스트랩 기능을 사용하기 때문에 새로운 샘플 ID가 쿼리 결과를보기 위해 선택 될 때마다 사용자가 링크 (여기를 클릭하여 샘플 업데이트)를 클릭하는 것을 원하지 않습니다. 아래 이미지를 참조하십시오 추신 : SQL 코드가 작동합니다. 감사합니다부트 스트랩 및 C#을 사용하여 페이지 새로 고침 중지

enter image description here

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> 

답변

0

당신은 자바 스크립트를 사용하여 일시 정지를 할 수있는 : 다시 다시로드

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

초 육십 후. 이 번호를 올리면 재로드 할 때까지 더 오래 기다릴 수 있습니다.

+0

답장을 보내 주셔서 감사합니다. pause() –

관련 문제