2013-03-08 38 views
0
 <fieldset id="trans"> 

      <legend>Transaction info 

      </legend> 
      <table> 

       <tr class="PickListItem"> 
        <td>Issued By:</td> 
        <td>#= ActionInitiatedBy #</</td> 
       </tr> 
       <tr> 
        <td>Exp Date Override:</td> 
        <td>#=ExpDateOverridden #</td> 
       </tr> 
       <tr> 
        <td>billing Status:</td> 
        <td></td> 
       </tr> 
       <tr> 
        <td>Bill Batch Date:</td> 
        <td></td> 
       </tr> 
       <tr> 
        <td>Refunded:</td> 
        <td> #=RefundedDate#</td> 
       </tr> 
       <tr> 
        <td>Refunded By:</td> 
        <td>#=RefundedBy#</td> 
       </tr> 
       <tr> 
        <td> 
         <div> 
          Note: 
         <br /> 
          #= Note# 

         </div> 



        </td> 

       </tr> 
       <tr> 
        <td> 

          #if ("#= Refunded #" == 'no' ) 
          {# 
          <div> 
            <label>Refund Amount : $ #= PatronChargeAmount #</label> &nbsp; <a onclick="Refund(' #= ActionHistory_id # ')" class="k-button">Refund?</a> 

          </div> 

          #}# 


        </td> 

       </tr> 
      </table> 

     </fieldset> 

我是新來的MVC &劍道控制。 條件語句不是錯誤的,但div從不顯示。我究竟做錯了什麼。請幫忙。劍道外部模板綁定到網格

回答

0

你的HTML是錯誤的!你寫道:<td>#= ActionInitiatedBy #</</td>(有一個額外的</)。它應該是<td>#= ActionInitiatedBy #</td>

0

事實上,你的情況是不正確的 - check the documentation

應該是這樣的

<td> 
      #if (Refunded == 'no'){# 
         <div> 
          <label>Refund Amount : $ #= PatronChargeAmount #</label> &nbsp; <a onclick="Refund(' #= ActionHistory_id # ')" class="k-button">Refund?</a> 
         </div> 
      #}# 
</td>