0

I have an asp MVC. net project.

In the view (.cshtml) I want to open an url, but I want to force to open that url with ONLY FIREFOX browse. That mean: if the user is using Edge/Chrome to navigate in our WEB app, but want to see that view, that link must be opened ONLY with firefox.

That's the first thing we need. But at the same time, that URL opened with firefox, we need to "embed" inside the main view (.cshtml) in Edge/Chrome using the "object" tag (or "iframe"). This is the code:

@{
    string cadena = "https://URL?rs:embed=true";
}

<div class="container">
     <!--Open this url with FIREFOX and embed it inside the web app opened with Edge/Chrome--->
    <object class="iframe" data=@cadena></object>
</div>

And the controller is just:

public ActionResult SeeReport()
{
    return View();
}
Keras-JOB
  • 109
  • 10
  • You could add a custom protocol handling on every device that is going to access your web sevice. But if you don't manage every one of those devices it is not possible to force opening with a certain program. – Apodemus May 12 '23 at 07:37
  • I don't know how to do what you're saying. Everything must be done by code. – Keras-JOB May 12 '23 at 07:39
  • 1
    in that case it is not possible – Apodemus May 12 '23 at 07:40
  • What is possible is to detect Firefox via JS and only display a message that the user should use Firefox if the user agent is not Firefox. https://stackoverflow.com/questions/7000190/detect-all-firefox-versions-in-js – Apodemus May 12 '23 at 07:46
  • Thanks. But we can't do that. The user should be able to use our web fully regadless the browse he is using. But opening that url only with firefox "inside/emded" in chrome/edge – Keras-JOB May 12 '23 at 07:59

0 Answers0