BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
List<Orders> data = new List<Orders>();
public IActionResult Index()
{
string RootPath = _hostingEnvironment.ContentRootPath;
SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=" + RootPath +"\\Data\\NORTHWND.MDF;Integrated Security=True;Connect Timeout=30");
using (con)
{
con.Open();
SqlDataReader myReader = null;
SqlCommand myCommand = new SqlCommand("select * From [Orders]",
con);
myReader = myCommand.ExecuteReader();
while (myReader.Read())
{
data.Add(new Orders(myReader["ShipName"].ToString()));
}
con.Close();
ViewBag.datasource = data;
}
return View(); |
<ej-drop-down-list id="bikeList" datasource="(IEnumerable<Orders>)ViewBag.datasource" watermark-text="Select ShipName"width="100%">
<e-drop-down-list-fields text="ShipName" />
</ej-drop-down-list> |