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

  • Home
  • SEARCH
  • 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 8234987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:39:20+00:00 2026-06-07T18:39:20+00:00

I am having a webgrid which is having href link in mvc3. Now, when

  • 0

I am having a webgrid which is having href link in mvc3.

Now, when a link is clicked, then response is returned with some records from server that i want to display on a popup window (data will be comming from server after running a new query in controller after clicking that link and than shown in pop up window).

But i dont want to open a new window. i want to open it in a popup on same browser page.

i dont know weather they have used jQuery or AJAX.But i want to implement same functionality.

Please help me to acheive this

Thanks in advance

  • 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-07T18:39:21+00:00Added an answer on June 7, 2026 at 6:39 pm

    You can use any jQuery pluggin which provides the popup window to do this. Several options are available like fancybox,SimpleModel, Colorbox, jQuery UI dialog, thickbox etc..

    This is how you will do with jQuery UI dialog.

    Step 1)
    Include jQuery & jQuery UI Library to your page (or Layout page). You can refer your local copy of refer to a copy from a CDN.

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
    

    Step 2)
    In your grid, Give a css class name to the links so that we can use that for the jQuery selection. Here i gave a CSS class popupLink

    @Html.ActionLink("Scott", "Details", "Customers",
                    new { @Id = "someId" }, new { @class = "popupLink" })
    

    Step 3)
    Now enable the jQuery UI Dialog functionality to those links with this specific CSS class

    <script type="text/javascript">
    $(function(){
        $(".popupLink").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>
    

    So whenever the user clicks on those links it is going to make call to the HREF attribute value of that link (that action method) and get the result and will show in the Popup window.

    make sure you have the action method to handle this request

    public ActionResult Details(string Id)
    {
      //do some dB query or whatever and return the result
    
      return View();  // can return the Model here to the view.
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

having some trouble with hitTestObject and now Flash is telling me it can't convert
I'm having an issue with WebGrid paging; but first, here's some controller pseudo code:
Having some trouble getting a JSON feed to load from my site. I'm starting
I am having a similar as the user here: ASP.NET MVC 3.0 WebGrid -
Having used storyboards for a while now I have found them extremely useful however,
Having trouble with an .htaccess file on WAMP. Works on the live server, but
Having trouble accessing javascript code in a mixed html/js ajax response. jQuery ajax doc
Having some trouble w/ IE7. IE8, Chrome, Firefox all work fine, but IE7 won't
having read the docs, https://docs.djangoproject.com/en/dev/topics/signals/ i have created this in my signals.py file: from
Having this problem with my android app I struggled with this for some time

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.