ASP.net Examples of CSS styling for a ListBox

Murray Brown
Murray Brown used Ask the Experts™
on
Hi

I am looking for free online examples of CSS styling for a ListBox control in ASP.net


Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018
Commented:
Hi Murray,

Listbox can be styled like any other HTML control. Is there something specific you want to achieve?
Also, I was wondering have you seen Jquery UI? https://jqueryui.com/selectmenu/

Regards,
Chinmay.
Zakaria AcharkiAnalyst Developer
Distinguished Expert 2018

Commented:
Hi Murray, Take a look at Bootstrap List-Box :

https://documentation.devexpress.com/AspNetBootstrap/117910/Data-Editors/List-Box

Else you may need to use select2 with multiple options.
Murray BrownASP.net/VSTO Developer

Author

Commented:
Hi Zakaria. Thanks, but I am specifically looking for css code and not third party software that I have to pay for
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Analyst Developer
Distinguished Expert 2018
Commented:
https://select2.org/getting-started/basic-usage

Select2 is an open source library if the tags format interest you?

https://jsfiddle.net/NathanFriend/rLmztr2d/

Then you could use it it's so simple. you need just to include the CSS file and JS file then :

$('#listbox-id-here').select2({
    placeholder: 'Select a month'
});

Open in new window


And your list box will be adjusted.
Zakaria AcharkiAnalyst Developer
Distinguished Expert 2018
Commented:
Here is a live fiddle :

https://dotnetfiddle.net/M3a9ka
Murray BrownASP.net/VSTO Developer

Author

Commented:
Thanks very much
Zakaria AcharkiAnalyst Developer
Distinguished Expert 2018

Commented:
Glad I could help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial