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 7753583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:05:25+00:00 2026-06-01T12:05:25+00:00

I am writing a MVC3 project. Right now I have a table which has

  • 0

I am writing a MVC3 project. Right now I have a table which has column with Data as actionLinks as:

<td style="color: Black; background-color: Bisque; text-align: center; width: 410px">
   @Html.ActionLink(@item.LookUp_NameString, "EditPartial", "Capitation", new { id = item.CAPITATION_RATE_ID }, new { @class = "actionLink" })
</td>

EditPartial as the name suggests is a partial view, which I need to be opened as a pop-up menu so that user can edit the details of the object, save it and we can come back to original page.

I have tried the render partial, but can’t get it to pass the id value dynamically.

This is for edit functionality of my grid. What will be the best way to implement this?

  • 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-01T12:05:26+00:00Added an answer on June 1, 2026 at 12:05 pm

    If you want to open the result of EditPartial Action method in a model popup, you need some model popup code for that.

    jQuery UI is one option. http://jqueryui.com/demos/dialog/

    1) Include jQuery UI reference in your page,

    2) Add the below script to your page which will convert your normal link to a model popup

    <script type="text/javascript">
        $(function(){
            $(".actionLink").click(function (e) {
                var url = this.href;
                var dialog = $("#dialog");
                if ($("#dialog").length == 0) {
                    dialog = $('<div id="dialog" style="display:hidden"></div>').appendTo('body');
                }
                dialog.load(
                    url,
                    {}, // omit this param object to issue a GET request instead a POST request, otherwise you may provide post parameters within the object
                    function (responseText, textStatus, XMLHttpRequest) {
                        dialog.dialog({                       
                            close: function (event, ui) {                            
                                dialog.remove();
                            },
                            modal: true,
                            width: 460, resizable: false
                        });
                    }
                );           
                return false;           
            });
        });
        </script>
    

    From your action result, you can return whatever markup you want to show in the Model popup. Mostly you will be returning a View. If you want to show a partial View,If it is an ajax request and show the normal view if it is a normal request, you can check the Request.IsAjaxRequest method to do that.

    public ActionResult EditPartial(int id)
    {
      CustomerViewModel objCustomer=GetCustomer(id);
      if(Request.IsAjaxRequest())
      {
         return View("Partial/Edit",objCustomer);
      }
      return View(objCustomer);
    
    }
    

    Assuming you have 2 views present to show your normal page and partial page (for model popup)

    I prefer to name my action method as Edit instead of EditPartial, because it is handling both requests (ajax and normal)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a MVC3 project. Right now I have a table which has
I'm writing a project in c# asp.net mvc3, and I have a helper-class that
I have ASP.NET MVC3 project and I am writing some extension methods that returns
I have been writing a project who acts as a server and have services
I have an MVC3 site and I am writing code to register a user.
I'm writing some custom Html Helpers for my MVC3 and soon MVC4 project. Examples
I have a fairly large MVC3 application, of which I have developed a small
I am writing an MVC3 site, which uses tinymce as a WYSIWYG text editor.
I've been working on writing my first MVC3 application for a little while and
I am using Mvc3 and my view engine is razor and also writing jquery

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.