Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • pranjal 75 posts 188 karma points
    Apr 09, 2018 @ 13:29
    pranjal
    0

    Content.setvalue Not binding Dropdown Value in Content Page

    I am trying to set dropdown value of categoryID to content page list view but it is not binding user's selected dropdown value in that

    Please give solution ASAP

    Here is my controller code

    UmbracoHelper help = new UmbracoHelper(UmbracoContext); if (model.ParentContentId > 0) { var contents = help.TypedContent(model.ParentContentId); var cs = Services.ContentService; var content = cs.CreateContent(model.BlogTitle, model.ParentContentId, contents.DocumentTypeAlias); content.CreatorId = Umbraco.MembershipHelper.GetCurrentMemberId(); content.CreateDate = DateTime.Now; content.UpdateDate = DateTime.Now; content.WriterId = content.CreatorId; content.CreatorId = Umbraco.MembershipHelper.GetCurrentMemberId(); content.SetValue("blogName", model.BlogTitle); content.SetValue("blogDescription", model.BlogDescription); content.SetValue("blogCategoryId", model.BlogCategoryId); content.SetValue("blogStatus", "Open"); content.SetValue("createdOn", DateTime.Now); content.SetValue("createdBy", content.CreatorId); content.SetValue("updatedOn", DateTime.Now); cs.Save(content); }

  • Mihir Ajmera 32 posts 145 karma points
    Aug 09, 2019 @ 09:53
    Mihir Ajmera
    0

    Hello All,

    I have the same problem create to bind dropdown using MVC controller as mention below. registrationContent.SetValue("jobTitle", model.JobTitle);

    Here Job Title has master content in the back office using the list in front-end dropdown selection.

    Can anyone have an idea how to assign selected value to the dropdown list in Umbraco 8.1.0 version so I can see selected value in the back office content list page?

Please Sign in or register to post replies

Write your reply to:

Draft