dimanche 1 octobre 2017

How to use checkbox instead of Dropdownlist/Editorfor in asp.net mvc create/edit view?

I had generated scaffolded item using Entity Framework. In some of the generated view, I have two fields namely PageID and PageIsAccessible (in my Create and Edit view page) as shown below,

Page View

PageID is list of pages generated as dropdownlist and Page Accessible is a bool value i.e., not set, true and false, generated as EditorFor. Page Accessible field is used to set if the pageID is accessible or not. I want to use checkbox instead of this dropdownlist/editorfor i.e. All the page id should be listed and next to each pageid will be the checkbox for PageIsAccessible. How can I create such a view for Create/Edit in asp.net mvc?




Aucun commentaire:

Enregistrer un commentaire