Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CameraDevice
- {
- public string IPAddress { get; set; }
- public string UDN { get; set; }
- public string DocumentURL { get; set; }
- public string FriendlyName { get; set; }
- public bool IsUSB { get; set; }
- public string Model { get; set; }
- public string Make { get; set; }
- public string DisplayName { get; set; }
- }
- var devices = new List<CameraDevice>();
- public ActionResult Connection()
- {
- var model = new ConnectionData();
- model.Devices = new SelectList(devices.Select(i => new { i.FriendlyName }), "Device");
- return View(model);
- }
- public class ConnectionData
- {
- [Display(Name = "Device")]
- [Required(ErrorMessage = "Select")]
- public string SelectedDevice { get; set; }
- public IEnumerable<SelectListItem> devices { get; set; }
- }
- @Html.DropDownListFor(m => m.SelectedDevice, Model.Devices, "Select Device", new { @style = "width: 355px;height:21px; border:none;outline:0px;" });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement