2014-03-24 65 views
0

當我試圖做到這一點時,出現了一個奇怪的錯誤。'Model'與查看頁面中的聲明衝突MVC4

<tr> 
    <td> 
    @Html.LabelFor(Model=>Model.Company_Name) 
    </td> 
    <td> 
    @Html.TextBoxFor(Model=>Model.Company_Name) 
    </td> 
</tr> 
    <tr> 
     <td> 
     @Html.DisplayNameFor(m=>m.LOB_NAME) 
     </td> 
     <td> 
      @Html.DropDownListFor(x=>x.LOB_NAME,Model.Lobdata) 
//Error here saying 'Model' conflicts with the declaration'System.Web.Mvc.WebViewPage<TModel>.Model' 

//Similarly when i comment the above line the error is shifting down  
      @Html.DropDownListFor(x=>x.Lead_Source,Model.leadsourcedata) 

回答

0

發現Here

Model應該model

@Html.LabelFor(model=>model.Company_Name) 
+0

是這麼大的幫助:) TY這麼多的時間:) – user2061595

相關問題