2013-11-13 3 views
0

У меня действительно проблемы с лямбда-выражениями.Какова эквивалентность VB.NET этого синтаксиса бритвы?

@model CalculateSimpleInterest.Models.SimpleInterestModel 

@{ 
    ViewBag.Title = "SimpleInterest"; 
} 
<h2>Calulate Simple Interest</h2>@using (Ajax.BeginForm("CalculateSimpleInterestResult","CalculateSimpleInterest", 
          new AjaxOptions { UpdateTargetId = "divInterestDeatils" })) 
    { 

    <fieldset> 
     <legend>Calulate Simple Interest</legend><div id="div1"></div> 

     <div class="editor-label"> 
      @Html.LabelFor(model => model.Amount) 
     </div> 
     <div class="editor-field"> 
      @Html.EditorFor(model => model.Amount)   
     </div> 

     <div class="editor-label"> 
      @Html.LabelFor(model => model.Rate) 
     </div> 
     <div class="editor-field"> 
      @Html.EditorFor(model => model.Rate)   
     </div> 

     <div class="editor-label"> 
      @Html.LabelFor(model => model.Year) 
     </div> 
     <div class="editor-field"> 
      @Html.EditorFor(model => model.Year)   
     </div> 
     <p> 
      <input type="submit" value="Calculate" /> 
     </p> 
    </fieldset> 
} 

@section Scripts { 
    @Scripts.Render("~/bundles/jqueryval") 
} 

ответ

0

Синтаксис вы ищете

@Html.YourHelperFor(Function(model), model.Property) 

например

<div class="editor-label"> 
    @Html.LabelFor(Function(model), model.Amount) 
</div> 
Смежные вопросы