Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8703243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:50:08+00:00 2026-06-13T02:50:08+00:00

I have a view that is bound to a view model. On that view

  • 0

I have a view that is bound to a view model. On that view I have a link that will popup a modal jquery dialog (using a partial view).

What I need is to be able to pass the model to the model popup, update it, then pass it back to the view page.

I have the modal popups loading with an action method in my controller (partial view). But struggling with passing the model to it.

Any suggestions?

Thanks so much in advance.

Script (on view page):

// ZipLocator modal popup
$(function () {
    $('#ZipLocatorDialog').dialog({
        autoOpen: false,
        width: 400,
        resizable: false,
        draggable: false,
        title: 'hi there',
        modal: true,
        show: { effect: 'blind' },
        open: function (event, ui) {
            // Load the ZipLocator action which will return the partial view _ZipLocator
            $(this).load('@Url.Action("ZipLocator", "Shop", New With { .area = "Shop"})');
        },
        buttons: {
            "Close": function () {
                $(this).dialog('close');
            }
        }
    });

    $('#ZipLocatorOpener').click(function () {
        $('#ZipLocatorDialog').dialog('open');
    });
});

Controller Action for partial view:

<HttpGet()>
    <Compress()>
    Public Function ZipLocator(model As ShopModel) As ActionResult

        Return PartialView("~/Areas/Shop/Views/Shared/Partials/Popups/_ZipLocator.vbhtml", model)

    End Function

As I said, the jQuery modal popup is working, I am just having a hard time passing my model to it.

Step One is to pass the model TO the partial view (jQuery modal popup).
Step Two is to pass the updated model back to the view after the dialog is dismissed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T02:50:09+00:00Added an answer on June 13, 2026 at 2:50 am

    After some documentation reading and further research, there is a data parameter for the jQuery UI dialog.

    // ZipLocator modal popup
    $(function () {
        $('#ZipLocatorDialog').dialog({
            autoOpen: false,
            width: 400,
            resizable: false,
            draggable: false,
            title: 'hi there',
            modal: true,
            **data: $("#ShopPane").serialize(),**
            show: { effect: 'blind' },
            open: function (event, ui) {
                // Load the ZipLocator action which will return the partial view _ZipLocator
                $(this).load('@Url.Action("ZipLocator", "Shop", New With { .area = "Shop"})');
            },
            buttons: {
                "Close": function () {
                    $(this).dialog('close');
                }
            }
        });
    
        $('#ZipLocatorOpener').click(function () {
            $('#ZipLocatorDialog').dialog('open');
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Html.Telerik().Grid() that is bound to a model in my MVC view.
I have a ASP.Net MVC form that is bound to the following view model.
I have a view that renders a list elements using the following template :
I have a class that I am binding to my view model. It is
using ASP.NET MVC, I have a Model, to which I'm attaching attributes so that
I currently have a view that contains a ListBox bound to a a collection
I have a datagrid bound to a CollectionViewSource view in my view model. The
I have one property on my view model that is used in a select
I have a HTML element bound to one of observables in my view model
Let's say you have a view-model that controls a media player. It has to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.