Copied to clipboard

Flag this post as spam?

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


  • Caglar 23 posts 94 karma points
    Aug 16, 2021 @ 14:14
    Caglar
    0

    How can I get macro data from surface controller?

    Hi guys,

    I have a macro and the macro has a nested content. The nested content elements are description, date and image and I want to get data by year. Forexamle when you choose 2021, you will see images from just 2021. If you choose 2020, you will see images from just 2020...

    <script type="text/javascript">
        $(document).ready(function () {
    
            $("#year").on("change", function () {
    
                var form_data =
                    {
                        'Year': $("#year").val()
                    }
    
                $.ajax({
                    url: '@Url.Action("GetMediaItems", "CommonMethods")',
                    type: "POST",
                    data: form_data
                }).done(function (response) {
                    console.log(response);
                })
            });
        });
    

    I sent to data on controller but how can I get macro data from controller? Also is this way good way or is there a different way for solution?

    Thanks,

Please Sign in or register to post replies

Write your reply to:

Draft