Copied to clipboard

Flag this post as spam?

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


  • Carlos Mosqueda 244 posts 435 karma points
    Oct 29, 2014 @ 22:28
    Carlos Mosqueda
    0

    Reloading or loading a Partial View using jQuery AJAX

    So we want to reload only a partial view that we made through the Umbraco Backoffice.

    We only want to reload the partial view so we don't have to reload the whole page again causing a browser refresh.

    1. Is this possible?  We don't have a control or model, this Partial was build through the Backoffice interface.

    2. How would we get the path to the partial view?

    3. We are using an external Javascript file (located in Umbraco), but we want to just reload the Partialview.

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Oct 30, 2014 @ 17:12
    Ismail Mayat
    1

    Carlos,

    I have done ajax and partials but within the context of a form submit so 

                @using (Ajax.BeginForm("SaveReply", "AdminCommentSurface", new AjaxOptions { UpdateTargetId = "formContainer", InsertionMode = InsertionMode.Replace, LoadingElementId = "processing" }))
                {
                    <div id="formContainer">                    
                            @Html.Partial("Admin/VeetReplyForm", Model)                                        
                    </div>
                }    

    and in the controller if save is successful i return a different partial with success message.  Can you give a bit more information on what you are doing exactly.

    Regards

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft