Category - DropDownList
Results 21 - 25 of 105
24 Jul 2018 24 Jul 2018 1 Comments  7989 Views
Here Mudassar Ahmed Khan has explained with an example, how to dynamically add DropDownList in ASP.Net GridView using C# and VB.Net.

The DropDownList will be added inside TemplateField column of GridView in ASP.Net.
23 Jul 2018 23 Jul 2018 0 Comments  16465 Views
Here Mudassar Ahmed Khan has explained with an example, how to populate (bind) DropDownList from ViewBag in ASP.Net MVC Razor.

The records from the database will be populated into a Generic List collection of Model class objects and then will be saved into a ViewBag object.

Inside the View, the ViewBag object will be passed to the Html.DropDownList Helper function for populating the DropDownList in ASP.Net MVC Razor.
17 Jul 2018 24 Aug 2018 0 Comments  15718 Views
Here Mudassar Ahmed Khan has explained with an example, how to Call Controller’s Action method on DropDownList Change (SelectedIndexChanged) in ASP.Net MVC Razor.

The DropDownList will be placed inside a Form and when an Item (Option) is selected, the Form will be submitted using the JavaScript onchange (SelectedIndexChanged) event handler of the DropDownList in ASP.Net MVC Razor.
10 Jul 2018 10 Jul 2018 0 Comments  12969 Views
Here Mudassar Ahmed Khan has explained with an example, how to implement jQuery AutoComplete DropDown (ComboBox) in ASP.Net MVC 5 Razor.

The jQuery AutoComplete plugin is actually applied to a TextBox but it can be made to work as a DropDown (ComboBox) by populating the AutoComplete results on TextBox focus as well as when User types in some Text.

The data for the jQuery AutoComplete DropDown (ComboBox) will be populated from database using Entity Framework in ASP.Net MVC Razor.
04 Jul 2018 04 Jul 2018 0 Comments  7206 Views
Here Mudassar Ahmed Khan has explained with an example, how to use For Each loop for populating DropDownList using Model in ASP.Net MVC Razor.

HTML SELECT element will be created in View and a For Each loop will be executed over the Model to create and add HTML OPTION elements to the DropDownList.

The Selected Value of DropDownList is easily available using Model or using Request.Form collection, but in order to get the Selected Text, the Selected Text is copied to a Hidden Field using jQuery and then it is fetched inside Controller in ASP.Net MVC Razor.
Results 21 - 25 of 105