dimanche 5 février 2017

How to fix order by?

I got this code in asp.net mvc3 controller for view and order in a dropdown. But my problem is as you can see in the picture below it order by text and next to it the number. How to fix this issue?.

ViewBag.AddrBarangay = new SelectList(db.Barangays, "BarangayId", "BarangayName", "").OrderBy(m => m.Text);

enter image description here

Aucun commentaire:

Enregistrer un commentaire