ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
empty string "" as content value is not populating in Odropdown
Title:
B
I
{code}
?
I am retrieving Id of type Guid (retrieved as key) and value (retrieved as content) of type string from database by stored procedure. I can see the values coming in the controller method but the key-content pair with content as `""` is not shown in the dropdown on frontend. Here is the code snippet View: @(Html.Awe().AjaxRadioList("PropertyId") .Odropdown() .Url(Url.Action("GetList", "ControllerName"))) Controller: var PropertyList = _dapperRepository.GetListBy(); PropertyList.AsList<KeyContent>().Insert(0, new KeyContent(String.Empty, "- Select -")); return Json(PropertyList, JsonRequestBehavior.AllowGet);
Save Changes
Cancel
Sam Mosaic
asked at 01 May 2023
Answers
B
I
{code}
?
try adding this css to your `site.css`: .o-itm { min-height: 3.1em; } .o-ddbtn .o-cptn { min-height: 1.5em; }
Save Changes
Cancel
Omu
answered at 01 May 2023
Thanks.. It solved my problem.
at 02 May 2023
Sam Mosaic
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK