Also Read:I’ll first create a simple Web API using Asp.Net and MVC 4, which will provide the data to the HTML SELECT dropdown list. A Web API is a perfect framework for creating web services for high performance Single Page Applications, such as AngularJS. Both the technologies use a similar architecture called for designing powerful web applications.Let’s get started.However, before creating the API we will create a small table in SQL Server. The table dbo.Books contains a list of books. We will use the second column in the table, that is, BookName.
![Dari Dari](https://i.ytimg.com/vi/kzFJ7St_ma8/maxresdefault.jpg)
![Laravel get selected value from dropdown Laravel get selected value from dropdown](/uploads/1/2/5/6/125601968/674614388.jpg)
Please click below link for creating the table.SQL Server dummy table: The Web API (MVC 4)Remember: You should have MCV 4 installed on your computer. Therefore, please make sure that you have it.I am assuming you have some knowledge about creating a Web API in Asp.Net.
Sometimes their is a need to fill a Drop Down List from a database table. For that many beginners get into trouble trying to fill the DropDownList from database table. So by considering above requirement i have written this article for beginners, students and anyone who wants to learn how to fill a DropDownList from a database table.
Don’t worry if you are not well versed with it. I have an article for newbie’s, with an extremely simple and yet useful example.Related: Add a Model in the Web APIA Model represents the data in the Web API. Since, in the example here, I have only one Dropdown list on the page, therefore, I’ll add a single property in the Books class, which will return a list of string values (the name of the Books).Read.