Patrick
Patrick

Reputation: 2781

MVC return Controller Action to View + #id

I have publish a new website where the website.pt/contact page is now at the website.pt#contact-us - how can change my actual controller's action to reflect this change?

    public ActionResult Contact()
    {
        return View(); -> Index#contact-us
    }

Upvotes: 0

Views: 42

Answers (1)

Codingwiz
Codingwiz

Reputation: 313

#contact-us is a URL location hash and has nothing to do with a View. Instead, try to redirect to that specific URL hash with return Redirect("website.pt#contact-us").

Upvotes: 1

Related Questions