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

The Archive Base Latest Questions

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

My Index action for a controller takes a page parameter like so: /Organizations/Index?page=5 Which

  • 0

My Index action for a controller takes a page parameter like so:

/Organizations/Index?page=5

Which is used to limit the number of objects displayed. If they choose to “edit” one of those objects after they are finished I would like to return with the same values as before they began editing (e.g. be on the same “page” of the list).

My edit url ends up looking like this:

/Organizations/Edit/487

How do I persist the original page value?

Thanks!

  • 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-22T17:12:20+00:00Added an answer on May 22, 2026 at 5:12 pm

    To persist data between calls you can use

    • Session state,
    • a hidden field,
    • render it into the links as a query string,
    • use a cookie or
    • TempData (which is Session state kept only for the next call).

    If you want to access the route data, you can use the controller context:

    ControllerContext.RouteData.Values["action"];
    

    “action” is the name of the route parameter.

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

Sidebar

Related Questions

I have a controller named Content, which has an Index action, which is associated
I have an odd issue. I have a controller action which takes a couple
I have one route defined in application.ini like router.routes.xx.route = y/:var/:controller/:action/* router.routes.xx.defaults.controller = page
Consider this MapRoute: MapRoute( ResultFormat, {controller}/{action}/{id}.{resultFormat}, new { controller = Home, action = Index,
map.root :controller => main, :action => index is not redirecting the main controller to
Having this route: map.foo 'foo/*path', :controller => 'foo', :action => 'index' I have the
I would like that the Index action doesn't appear in the url. For example,
I have a post html form, and the action is index.php, which is the
I have my default route defined like this routes.MapRoute( Default, // Route name {controller}/{action}/{id},
I have the following index action: class ExpensesController < ApplicationController def index() @expenses =

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.