EDUDOTNET

Monday, April 29, 2013

ASP.NET MVC: DROPDOWNLIST WITH ENUM




Create Drop-down list with enum values in MVC:




Inside model we need to define:
    1. a property of enum type.
    2. a property of SelectedListItem as IEnumerable.
    3. Inside constructor filling Dropdown list from enum.
ASP.NET MVC: DROPDOWNLIST WITH ENUM
Model
Enum (County list):
ASP.NET MVC: DROPDOWNLIST WITH ENUM
Enum

Action (Creating object of model and return model):
ASP.NET MVC: DROPDOWNLIST WITH ENUM
Action

View (Calling mode on top and filling dropdown list)
ASP.NET MVC: DROPDOWNLIST WITH ENUM
View







2 comments:

  1. Its very fantastic article, its very helpful

    ReplyDelete
  2. Send Unlimited Marketing Mails?
    It's 100% Cheap & Inbox Guaranteed Delivery.

    Take 14 Days Free Trial.
    Add 1000 contacts & send unlimited campaigns.

    Visit: http://j.mp/outboxmailer-affiliate-004 at Just $59/month

    - You can ADD UNLIMITED CONTACTS
    - You Can SEND UNLIMITED MailS without limits.
    - Custom HTML editor, Web forms, Follow ups, and Auto-Responder.
    - 99.5% Inbox Delivery and Real time reporting.
    - Simple and Easy.

    USE COUPON CODE & SAVE 50%: MADOFFER786

    Take 14 Days Free Trial.
    Add 1000 contacts & send unlimited campaigns.

    In other network, they are charging +1000 USD for 1 Million Mails / contacts.
    But in http://j.mp/outboxmailer-affiliate-004 is cheap at Just $59/month.?

    ReplyDelete