Asp.Net MVC - Searchable and Multi-select Drop DownList Using Chosen Plugin
HTML-код
- Опубликовано: 10 сен 2024
- 🍒 Related Videos
Asp.Net Core MVC CRUD Operations: • Asp.Net Core MVC CRUD ...
MVC Login & User Registration: • Asp.Net Core MVC & Ide...
Convert MVC App to Single Page(jQuery Ajax): • jQuery Ajax CRUD in AS...
Expense Tracker App in Asp.Net Core MVC: • Build an Expense Track...
More MVC Tutorials: • Asp.Net Core MVC Tutorial
Chosen Plugin Official Website: harvesthq.gith...
📂 GitHub Repository
► goo.gl/bshbEo
💖 Channel Support
➤ Paypal: bit.ly/3L36ut4
➤ UPI App: geni.us/ScanQR...
➤ Amazon: geni.us/Amazon...
💌 For Business Inquiries
➤ codaffection@gmail.com
🚶♂️ Follow us
Facebook : / codaffection
Discord : / discord
Twitter : / codaffection
---
Asp.Net MVC - Searchable and Multi-select Drop DownList Using Chosen Plugin
In this video, we will create searchable and multi-select drop down in asp.net MVC using chosen plugin
Content.
1. Create Normal Html Dropdown in asp.net MVC using HTML.dropdownlistfor.
2. Convert normal dropdown to searchable dropdown using chosen plugin
3. Create Html Multi-Select Drop Down in asp.net MVC using Html.ListBoxFor and MultiList Class.
4. Convert Multi-Selec6t Drop Down into chosen multi-select dropdown.
#AspNetMvc #CodAffection
goo.gl/bPcyXW : Buy me a Coffee
bit.ly/36IA1cH : AspNet Core MVC CRUD Operations
bit.ly/3Pn2S7y : Expense Tracker App in AspNet Core MVC
bit.ly/2yEPlpB : Convert MVC App to Single Page(jQuery Ajax)
bit.ly/403lUVC : MVC Login & User Registration
bit.ly/39B6xdh : Image Upload in AspNet Core MVC
bit.ly/30fPDMg : More MVC Tutorials
You are legend dude. Hats off to your Knowledge. May God bless u
Great video of how to do a somewhat complicated thing! Thank you for putting this on youtube for anyone to watch and learn from!! I struggled at first, but this works!!
Thanks for your kind words.
I have implement use of Select2 instead of chosen and was badly stuck with multiple select list implementation in my application. Thanks you really saved my time and helped me a lot. Thanks and excellent tutorial. I have subscribed to your channel.
Thanks for your kind words. I appreciate that.
Thank you so much. Very well explained. It was very helpful. Hats off.
Amazing. Very succinct and exactly what I've been looking for, for weeks!
didn't work for me I don't even get any error but nothing changed too...
You solved the problem?
Excellent Tutorial
when clicked on the save button while using Multiple drop down feature, it is not storing the selected values in an array and posting back to controller, i can see only null values being passed instead to the array, Please help!
also can I have checkbox for multi-select, and I also want to display values when selected as comma separated values instead of multiple buttons displayed inside the drop down field
This video was really helpful , thank you for uploading the same.
Why can I use [HttpPOST] but not [NotMapped] as Node Mapper ? NotMapped could not be found
Hi, how to allow user to type non-existing value so that we can add thw value on the fly?
what if i dont want to show id on the sql what if i want to show string values what should i do
Works like wonders for me !
Hi sir
After adding MultiSelectList, I am getting error "The parameter 'expression' must evaluate to an IEnumerable when multiple selection is allowed".
@Html.ListBoxFor(model => model.USER_ID, new MultiSelectList(Model.UserCollection, "USER_ID", "DISPLAY_NAME"), new { id = "multiSelectDropDown", multiple="multiple" })
My code
how can i do this with database table. I have sql query and dont know how to use in Linq. in this query if i select department then related workstation populate in the second drop down with check boxes.
SELECT DISTINCT Department.Name, Workstations.Name from Department
inner join Workstations on Department.ID = Workstations.DepartmentID
AND Department.id = ( CASE WHEN Department.id IN (5) THEN Workstations.DepartmentID End)
at 10:55 I'm getting the following errors : "CS1031: "The name "Html" does not exist in the current context". The same applies for "Model".
I've been stuck for some time and been looking for solution with no result.
I also got the same problem as you, but i managed to fix it by turn off the visual studio and turn it on again, and don't open the page.
THANKS
Thank you so much! This helped me a lot!
Glad it helped!
Thank you so much !
How to get the Selected Value text as separated by comma. Plz help
Thank you very much, It's very useful ..
You are welcome :)
This is really useful
we can this in two lines with choosen
Hi, what if the project is in .Net5 and it doesn't have ADO.NET Entity Data Model, is there an alternative?
.NET 5 CRUD is discussed here : ruclips.net/video/S5dzfuh3t8U/видео.html
Please check that.
after refreshing the database the new property that you add are gone every time when i refresh the database
There no such a thing as DBModel for me, any help ?
Thank you this is very helpful and informative, however how to implement the plugin in chat c# code using SignalR we want to get AspNetUser and Groups please help.
Please can You Explain How to Show SelectedEmployeesIDs as a Names not a Values in the View Page ???? thanks a lot
Thank you very much! it's works
Glad you found the video helpful.
How to get values back in edit page?
may i know how to change chosen dropdown height?? thank you
thank you, it is a very very good,
you are welcome.
wow
Thanks bro... But I have a problem when I use it on the modal view
How do we search using datepicker in mvc?? Anyone with a link or can codeAffection do another video.
How do I implement in .net core...thank you
Hello,
I did everything what you've shown in your video, but I've got a error like Object reference not set to an instance of an object.
Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 14: Select Employee
Line 15: @*Normal DropDown*@
Line 16: @Html.DropDownListFor(model => model.SelectedEmployeeIDs, new SelectList(Model.EmployeeCollection, "EmployeeID", "Name"), new { id = "normalDropDown"})
Line 17:
Line 18:
Source File: E:\VS_ASP_APPS\ChoseninMvc\ChoseninMvc\Views\Employee\AddOrEdit.cshtml Line: 16
Can you please help me fixed this errors?
try with break point, find exact source of error .
Check your connection to database
Same error... can anyone help?
Does anyone get the same problem as me ?
System.ArgumentNullException: 'Value cannot be null.
Parameter name: items'
Check on the values from list and then check the Nullable Condition
hey is it solved?? and if yes then can you share the solution?
Can I combined two tables in one multi selected drop down? I need to use this for one of my project.
yes, just join them into one collection first.
@@CodAffection Thanks for your reply. how can I write this query in Linq
(SELECT concat ( Employee.Name , ' - ' , Department.Name) As SUBDEP
FROM Workstations
JOIN Employee ON Employee.ID = Department.ID
)
both table do not have connection