Copied to clipboard

Flag this post as spam?

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

  • Ahmed Bin Shafaat 1 post 71 karma points
    Sep 24, 2019 @ 12:23
    Ahmed Bin Shafaat

    How to pass Selected value of @Html.dropdownlist to partial view in Umbraco

    There are two major questions.

    1. How can I render partial view on change event of Html. dropdownlist? And It should be noted that RenderPartial should be called in specified div having class="row mt-3". I want to do this on change event of Dropdown list by not disturbing the html position of partial view. Html.RenderPartial("GalleryListing")

    Current HTML Code

    <div class="col text-center">
                <div class="section_title new_arrivals_title">
                    <h2>Completed Projects</h2>
                        @Html.DropDownList("GalleryFilter", new List<SelectListItem>  
                            new SelectListItem{ Text="Exterior Signage", Value = "Exterior Signage" },  
                            new SelectListItem{ Text="Interior Signage", Value = "Interior Signage" }
                           },"Please Select Category",new { @onChange =""}) 
        <div class="row mt-3">
    1. I need to pass the selected value of an HTML.dropdownlist to a partial view file in Umbraco. Kindly note that there is no controller in Umbraco so I cannot send value through ajax request etc. I have to do it by remaining in Razor view. I don't know if it could be done in onChange event? The main issue is to pass this value into PartialView.cshtml which is being rendered by RenderPartial event. Current Dropdownlist

      @Html.DropDownList("GalleryFilter", new List

Please Sign in or register to post replies

Write your reply to: