Hello everyone,
I'm working on MVC 5, there is a viewmodel class and contain a static list as the same class.
- public class PartnerProjectVM
- {
- public int idPartnerProject { get; set; }
- public string ProjectName { get; set; }
- public string ProjectDescription { get; set; }
- public static List
listPartnerProjectVM = new List(); - }
How can I check
- @model Reboxwebapp.Models.ViewModel.PartnerProjectVM
- @if (listPartnerProjectVM.Count() != null)
- {
- <div class="col-sm-3">
- <div>
- <a class="list-group-item active left-menu-head">Projects Lista>
- @foreach (var item in listPartnerProjectVM)
- {
- <a href="#" id="idProject" class="list-group-item" name="@item.idPartnerProject">@item.ProjectNamea>
- }
- div>
- div>
- }

Abhilash J APosted Mar 13, 2017, 2:21 AM
Catcher WongPosted Mar 13, 2017, 1:45 AM
Abhilash J APosted Mar 13, 2017, 1:36 AM
Catcher WongPosted Mar 13, 2017, 1:32 AM
Abhilash J APosted Mar 13, 2017, 1:13 AM
@if (listPartnerProjectVM.Count() != null)Catcher WongPosted Mar 13, 2017, 1:03 AM