How to create label text using html helper from Model in ASP.Net MVC 5 (Razor View) -


i trying create label text using html helper model roomavailabilitysummary

view design:

@model ienumerable<wbe.model.roomavailabilitysummary>  @using(ajax.beginform("roomsavail", new ajaxoptions                                        {                                         updatetargetid = "roomsavaildata",                                         insertionmode = insertionmode.replace                                        })) {  @html.antiforgerytoken()  <div class="container paddingzero">     <div class="row rowbackground">         @html.displayfor(model => model.arrdat)     </div>     <div class="row rowbackground">         @html.editorfor(model => model.arrdat)     </div>     <div class="row rowbackground">         @html.displayfor(model => model.depdat)     </div>     <div class="row rowbackground">         @html.editorfor(model => model.depdat)     </div>  </div> } <div class="tab-content" id="roomsavaildata">     @html.partial("_availableroomsandpackages", model); </div> 

controller:

public class roomavailabilitysummary {     [key]     public int custcode { get; set; }     [display(name = "checkin")]     public string arrdat { get; set; }     [display(name = "check out")]     public string depdat { get; set; } } 

problem: unable create label text using model html helper.

error getting: ienumerable' not contain definition 'arrdat' , no extension method 'arrdat' accepting first argument of type ienumerable

what have done mistake in code?

i have done following changes in design , working expected.

@html.partial("_bookinginputs")                  <div class="tab-content" id="roomsavaildata">  @html.action("availableinventory", "bookings");  </div> <div id="loading" class="loading"> </div> 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -