I have some 3 different dropdown list and each dropdown fetch data from database table.
Tables
- TableSchool
- TableSubject
- TableClass
As the for load data is fetch using LINQ To SQL. I want to add first row of dropdown to --Select School-- --Select Subject-- --Select Class--
How can that be done?
Code -
var list = (from i in context.MAT_TableSchool
select
new
{
SchoolName= string.Format("SN - {0}", i.SchoolName),
SchoolId = i.SchoolId
});
this._schoolDropdown.DataSource = list; this._schoolDropdown.DataBind();
What I want is to add a record SchoolName="-Select-" SchoolId=0 at top of this list or dropdown