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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:22:25+00:00 2026-05-12T05:22:25+00:00

I have a shared page in my ASP.NET MVC app that can be accessed

  • 0

I have a shared page in my ASP.NET MVC app that can be accessed from several different pages in my app. If I want the user to return to their original page after they have done their business on the shared page, what’s the best way to figure out where the user was, and tell the app to go there?

Note that I’m currently doing this for the Cancel button on the shared page by telling onclick to use the page history:

<input type="button" value="Cancel" onclick="if (history.length == 0) { window.location='<%=Url.Action("Index", "Home") %>' } else {  history.back() }" />

but this won’t work for Save if the shared page updates data displayed on the original page.

  • 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-12T05:22:26+00:00Added an answer on May 12, 2026 at 5:22 am

    Two ways I can think of are to store the url of the calling page in a hidden input element or as a argument in the current page’s address. Both of these will survive refreshes or several steps of navigation, you just have to make sure that the variables are passed on to the next page.

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

Sidebar

Related Questions

I have one asp.net page. I want to add this page to asp.net mvc
I have an asp.net mvc 3 site running locally and everything works fine. I
I am using ASP.NET MVC 3 and have some parts written using aspx. So
Related questions: ASP.NET MVC 3: Generate unobtrusive validation when BeginForm is on the layout
I'm trying to learn ASP.NET MVC 3 with razor and so far getting the
I am faced with a problem with ASP.NET MVC 3 with the Razor rendering
I use ASP.NET MVC 3 Razor, with jquery validation plugin to build a Registration
I have found out by creating 2 new websites under IIS 7 that single
I have a class called LocalizedString that is defined in an external library that
I have been wrestling with what should be a very simple thing for weeks

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.