MVC - how to find and get value from public static list<object> created in model

MVC - how to find and get value from public static list<object> created in model

Here is how my code looks like:


in model:


  1. public class SystemUser  {
  2.             public string Name { get; set; }
  3.             public string Email { get; set; }
  4. }


  5. public static List<SystemUser> listSystemUser;
  6.         public static void CreateListSystemUser() {
  7.             listSystemUser = new List<SystemUser>();
  8.         }


  9. public static void FillListSystemUser() {
  10.             SystemUser firstUser = new SystemUser();
  11.             firstUser.Name = "firstName";
  12.             firstUser.Email = "firstEmail";            
  13.             listSystemUser.Add(firstUser);


  14.             SystemUser secendUser = new SystemUser();
  15.             secendUser.Name = "secendName";
  16.             secendUser.Email = "secendEmail";          
  17.             listSystemUser.Add(secendUser);   
  18.         }


In view:


  1. @Html.DropDownListFor(model => Model.SelectListSystemUser, Model.SelectListSystemUser,
  2. new { id = "listSystemUser", onchange = "
i want to get here specific email value from list named listSystemUser in model where email is in same object as is its name (selected value from dropdownlist).


To make it more clearly i will write example.


I am selecting value in created select box. This value is named "secendName". I want to change label value (not included in code) to email adress of this name (it is named "secendEmail")


Could someone tell me if it is even possible in this way or i need to send somehow value from model to view. In controller i am using  FillListSystemUser() so instance of list is created.