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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:06:35+00:00 2026-06-04T06:06:35+00:00

Hello I want to return an anchor from Mvc Controller Controller name= DefaultController; public

  • 0

Hello I want to return an anchor from Mvc Controller

Controller name= DefaultController;

public ActionResult MyAction(int id)
{
        return RedirectToAction("Index", "region")
}

So that the url when directed to index is

http://localhost/Default/#region

So that

<a href=#region>the content should be focus here</a>

I am not asking if you can do it like this: How can I add an anchor tag to my URL?

  • 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-04T06:06:37+00:00Added an answer on June 4, 2026 at 6:06 am

    I found this way:

    public ActionResult MyAction(int id)
    {
        return new RedirectResult(Url.Action("Index") + "#region");
    }
    

    You can also use this verbose way:

    var url = UrlHelper.GenerateUrl(
        null,
        "Index",
        "DefaultController",
        null,
        null,
        "region",
        null,
        null,
        Url.RequestContext,
        false
    );
    return Redirect(url);
    

    http://msdn.microsoft.com/en-us/library/ee703653.aspx

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

Sidebar

Related Questions

I want regExp to test for two 'Hello'-s and return true but it only
Hello I want print numbers from 30 to -30, this is my code #include
hello i have a table with <th> i want to do a carriage return
Hello i am trying to return a struct from a function but i cant
Hello i want to call a c Function from an objective c method how
see the example: from visual import * def hello(): newyear=2010 sphere() return newyear my
Hello I want to use async task and this is my sceleton code: public
I want to build a static hello world from C using arm-linux-gnueabi-gcc as opposed
I want getMinimumSize to return weight=0 to cheat GridBagLayout.ipadx I have tried: public class
Hello i want to return array using php code it doesnot gives any output

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.