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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:08:13+00:00 2026-05-13T09:08:13+00:00

I have an action that returns ViewResult (it’s a detail form, public ViewResult AddFoo(long

  • 0

I have an action that returns ViewResult (it’s a detail form, public ViewResult AddFoo(long id) and I need to display this result in a lightbox

  • My first idea was to generate a div with an iframe, but than I don’t know how am I going to close (hide the div) this lightbox on submit
  • Other thing that I could do is take somehow the generated html from the action (from <body> to </body>), and put it inside the div instead of the iframe

How do you do this kind of stuff, I think there should a better way

  • 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-05-13T09:08:13+00:00Added an answer on May 13, 2026 at 9:08 am

    Generally, when you want to display a view in the context of another page, you return a PartialViewResult instead of a ViewResult. Then you can write JavaScript like:

    $("#someDiv").load("/path/to/action");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an action that basically does this: public ViewResult Save(Foo postedFoo) { Foo
I have an asp.net mvc action that returns a file result. Behind the scenes,
I have an Action that returns URLs which need to call another Struts2 action.
I have an ExcelResult action result that returns Microsoft Excel documents, based off the
I have an Action that returns a FileResult via View(...) . This works well.
Suppose I have an action that returns an rendered asp.net mvc control and send
I'm have an action /json that returns json from the server. Unfortunately in IE,
If i have a controller action Create that returns a view with the following
I have a really simple action in a controller that simply returns a view
I have an HttpPost controller action that takes in a simple form DTO object.

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.