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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:40:37+00:00 2026-06-19T00:40:37+00:00

my site is on MVC3 razor and on .Net 4 framework. I have a

  • 0

my site is on MVC3 razor and on .Net 4 framework.

I have a href link in my view

<a href="http://localhost:17238/News?NewsID=20&NewsUrl=xxx">mylink</a>

this links go to News action and news action is :

   [ValidateInput(false)]
    public ActionResult Index(int NewsID, string NewsUrl)
    {

        //do some process on NewsID and NewsUrl

         mymodel mm=new mymodel();
        return View(mm);

    }

it works fine but return url include NewsId and NewsUrl as parameter ,i know
it is normal but how can i remove all parameter when response returned from my action?

  • 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-19T00:40:38+00:00Added an answer on June 19, 2026 at 12:40 am

    The only way to do this would be to perform an HTTP 302 or 301 redirect.

    return Redirect(); //302
    return RedirectPermanent(); //301
    return RedirectToAction(); //302
    return RedirectToActionPermanent(); //301
    return RedirectToRoute(); //302
    return RedirectToRoutePermanent(); //301
    

    By performing an HTTP 301 redirect you are telling the client that this is a permanent redirection (i.e. that the resource has officially been relocated). The browser may cache this redirect.

    You probably don’t want to do a 301 redirect; I only mention it to give a complete answer.

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

Sidebar

Related Questions

I have an MVC3 Razor web site. I am following the tutorial here: http://www.thecodingguys.net/tutorials/asp/webpages-membership-forgot-password-and-reset-password
I'm currently developing a site using ASP.Net MVC3 with Razor. Inside the View/Shared folder,
I have something like this in Site.Master in an asp.net mvc3 (not razor) project:
I have an ASP.NET MVC 3 site that makes use of a ClientDependency framework
I have a site which was and works: ASP.NET 4 MVC 3 Entity Framework
I'm experimenting with an ASP.NET MVC 3 site, using razor as the view-engine. I
I have a web site in asp.net mvc 3 razor and have some range
'm using ASP.NET MVC 3 with Razor views. I have a partial view which
MVC 3 VB.NET applicaiton... Using express checkout with html razor view. I have tried
i have made an application in asp.net mvc3/c#/Razor , now i want to implement

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.