P
Peter Morris
var editionList =
from edition in software.Editions
select new
{
ID = edition.ID,
Name = edition.Name
};
How can I ensure that the result starts with an "empty" row
ID = -1, Name = "<select>"
So that I can use this in a HTML drop down?
There's got to be a more simple way that what I am currently doing....
var blankSoftware =
from software in new string[] { "" }
select new { ID = -1, Name = "" };
var softwareList =
from product in softwareRepository.GetAll()
select new
{
ID = product.ID,
Name = product.Name
};
ViewData["SoftwareList"] = blankSoftware.Union(softwareList);
Thanks
Pete
from edition in software.Editions
select new
{
ID = edition.ID,
Name = edition.Name
};
How can I ensure that the result starts with an "empty" row
ID = -1, Name = "<select>"
So that I can use this in a HTML drop down?
There's got to be a more simple way that what I am currently doing....
var blankSoftware =
from software in new string[] { "" }
select new { ID = -1, Name = "" };
var softwareList =
from product in softwareRepository.GetAll()
select new
{
ID = product.ID,
Name = product.Name
};
ViewData["SoftwareList"] = blankSoftware.Union(softwareList);
Thanks
Pete