0

我在for循环上做了:

 @foreach (var ObjCompanyContact in (List<BalCentral.DataModel.VisaCaseDestinationCountryEmploymentContact>)ViewData["VisaCaseDestinationCountryEmployment"])
                                   { 
                                       <table class="email_phone" style="width:100%">
                                              <thead>
                                                 <tr>
                                                   <th></th>
                                                   <th><label class="control-label-superscript">Primary?</label></th>
                                                   <th></th>
                                                </tr>
                                               </thead>

                                      <tr>
                                        <td>@*<input type="text" id="Text22" class="span4" placeholder="Email Address" value="test@test.com">*@

                                          @Html.TextBox("Email",ObjCompanyContact.Email,new {@class="span4",@placeholder="Email Address"})
                                        </td>
                                        <td style="text-align:center">
                                            <input type="checkbox" name="Email"/></td>
                                        <td><a href="#" class="btn"><i class="icon-remove"></i></a></td>
                                      </tr>
                                      <tr>
                                        <td><input type="text" id="Text21" class="span4" placeholder="Email Address" value="test@test.com"></td>
                                        <td style="text-align:center"><input type="checkbox" /></td>
                                        <td><a href="#" class="btn"><i class="icon-remove"></i></a></td>
                                      </tr>
                                      <tr style="background-color: #F0F0F0 ">
                                        <td colspan="3" style="padding: 5px 0px 0px 10px; "><label class="help-block" style="margin-bottom: 0px"">Add Email Address:</label></td>
                                      </tr>
                                      <tr style="background-color: #F0F0F0 ">
                                        <td><input type="text" id="Text23" class="span4" placeholder="Add Email Address"></td>
                                        <td style="text-align:center"><input type="checkbox" /></td>
                                        <td><a href="#" class="btn btn-info"><i class="icon-plus"></i></a></td>
                                      </tr>

                                      </table>  

                                   }  

问题 id 它的 for loop 缺少结束标签。检查几次后,我无法找到问题。感谢您的帮助。

4

1 回答 1

1

更新以下行

<td colspan="3" style="padding: 5px 0px 0px 10px; "><label class="help-block" style="margin-bottom: 0px"">Add Email Address:</label></td>

            <td colspan="3" style="padding: 5px 0px 0px 10px;">
            <label class="help-block" style="margin-bottom: 0px">
                Add Email Address:</label>
        </td>

格式很好,并解决了您的问题,也在运行时检查。

于 2013-05-04T13:13:57.857 回答