Niyazi Toros

Niyazi Toros

  • NA
  • 41
  • 6.7k

How to load dropdownbox with 2 value?

May 26 2016 7:43 AM
Hi,
 
In below code I need to get CustomerSurname as well. In the dropdown box I must show customer surname as: "CustomerName" + " " + "CustomerSurname".
 
  1. // GET: APPROVALs/Create    
  2. public ActionResult Create()    
  3. {    
  4.     ViewBag.CUSTID = new SelectList(db.CUSTOMER, "CUSTID""CustomerName");    
  5.     return View();   
  6. }
 
I also need the "db.CUSTOMER" must only get a customer list where CustomerActive = False...
 
Any help please,
Kind Regards,
 

Answers (4)