Category - DropDownList
Results 1 - 5 of 86
18 Sep 2018 18 Sep 2018 0 Comments  589 Views
Here Mudassar Ahmed Khan has explained with an example, how to implement Grouped DropDownList using HTML OptGroup element in ASP.Net MVC Razor.

The Grouped DropDownList will be populated from database using Entity Framework in ASP.Net MVC Razor.

In HTML DropDownList OptGroup element, which is used to Group items (options) of a DropDownList while in MVC, the Grouping of DropDownList items (options) is done using SelectListItem class and SelectListGroup class.
05 Sep 2018 05 Sep 2018 1 Comments  868 Views
Here Mudassar Ahmed Khan has explained with an example, how to solve the problem of Bootstrap Modal Popup Auto Closes on PostBack in ASP.Net using C# and VB.Net.

Bootstrap Modal Popup is opened from Client Side and hence when PostBack happens and Page refreshes, the Bootstrap Modal Popup disappears.

Hence in order to keep the Bootstrap Modal Popup across PostBacks, it has to be re-opened after PostBack from Server Side (Code Behind) using RegisterStartupScript method of ClientScript class.
24 Aug 2018 24 Aug 2018 0 Comments  849 Views
Here Mudassar Ahmed Khan has explained with an example, how to bind (populate) DropDownList from ViewModel in ASP.Net MVC Razor.

The DropDownList will be populated from database using Model class and the Html.DropDownListFor Helper method.
24 Aug 2018 24 Aug 2018 0 Comments  732 Views
Here Mudassar Ahmed Khan has explained with an example, how to implement DropDownList SelectedIndexChanged event in ASP.Net MVC Razor.

When an item is selected in DropDownList, the JavaScript OnChange event handler will be raised which in turn will submit the Form, thus simulating the SelectedIndexChanged event in ASP.Net MVC Razor.
14 Aug 2018 14 Aug 2018 0 Comments  877 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) DropDownList Selected Value to Controller Action method using Html.ActionLink ASP.Net MVC Razor.
Results 1 - 5 of 86