Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
While I am using a dropdownlist in my view, I am getting the error
'System.Web.Mvc.HtmlHelper
Any help appreciated!
Thanks & Regards,
Suma
Can you show us a code example of what you are trying to do?
Hi Frans,
intellisense is not working as shown in the image eventhough functionalities are working perfectly.
Thanks,
Hi Suma,
I see that all your html attributes definitions contain an identifier "@class", could you try naming it "class" like this:
.... new {id = "ddlclass", class = "dropdown-bopx-full"}
Hope this helps.
Cheers,
Michael.
Hi Michael,
Thanks for responding.
Without identifier, it is throwing error. Since 'class' is a reserved word, '@' is necessary it seems.
Does it help if you place @using System.Web.Mvc in your view?
@using System.Web.Mvc
Does it work when using:
@Html.DropDownListFor(x => x.Session, listItems, new {id="ddlSession", @class="dropdown-box-full"})
And you are right. The @ before class needs to be there.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
'System.Web.Mvc.HtmlHelper<Umbraco.Web.Models.RenderModel>' does not contain a definition for 'DropDownList'
Hi,
While I am using a dropdownlist in my view, I am getting the error
'System.Web.Mvc.HtmlHelper
Any help appreciated!
Thanks & Regards,
Suma
Can you show us a code example of what you are trying to do?
Hi Frans,
intellisense is not working as shown in the image eventhough functionalities are working perfectly.
Thanks,
Suma
Hi Suma,
I see that all your html attributes definitions contain an identifier "@class", could you try naming it "class" like this:
Hope this helps.
Cheers,
Michael.
Hi Michael,
Thanks for responding.
Without identifier, it is throwing error. Since 'class' is a reserved word, '@' is necessary it seems.
Thanks,
Suma
Does it help if you place
@using System.Web.Mvc
in your view?Does it work when using:
And you are right. The @ before class needs to be there.
is working on a reply...