0

I have written an server side hyperlink which will redirect to 'landing.aspx' page. Below is the code

<asp:HyperLink ID="HyperLinkLT1" runat="server" Text="Link Text" NavigateUrl="landing.aspx"></asp:HyperLink>

This is working fine in chrome. Now the problem is when I run the project in Firefox and click on the link, I am getting a popup which says error and them the page is redirected. Below is the screen shot.

enter image description here

Can someone help me to identify and clear the problem.

Balaji
  • 61
  • 6
  • 1) Open your browser's developer tools and check the URL; 2) in those same dev tools, inspect the console: any errors? 3) Do you ever get to that landing.aspx (as in: which page really shows the error)? – Hans Kesting Sep 02 '21 at 06:49
  • 2
    A HyperLink cannot cause FireFox to show a popup. It is nothing more than `Link Text`. – VDWWD Sep 02 '21 at 06:50
  • webforms is very easy and ready to use years tested and working fine - this issue have nothing to to with obsolete and this is a personal opinion that is obsolete – Aristos Sep 02 '21 at 09:28
  • @Aristos "webforms is very easy and ready to use years tested and working fine" - that's a very weak argument. WebForms is _not_ easy to use because it's entire architecture is contrary to how the web and HTTP _actually work_. It only "works fine" if you take steps to change how WebForms renders its invalid HTML, disable ViewState, and more besides. I'd say "it's a miracle it works at all" in many cases. – Dai Sep 02 '21 at 10:06
  • 1
    "this is a personal opinion that is obsolete" - it's not my opinion: it's demonstrable fact. WebForms is obsolete because [it was replaced in 2008 by ASP.NET MVC](https://stackoverflow.com/a/51391202/159145) and Microsoft put a freeze on all WebForms work at the same time; _and_ the WebForms infrastructure is removed in ASP.NET Core. Finally just because something _is **only** still supported for security patches_ does not mean it is not obsolete as far as technical decision-making is concerned, otherwise we'd use VB6 today because _that's_ still supported for the same reasons as WebForms is. – Dai Sep 02 '21 at 10:11
  • @Dai, yes it does. At least on my webforms test enviroment: `Link Text`. Maybe you are referring to LinkButton? That does render a javascript code. – VDWWD Sep 02 '21 at 10:39
  • 1
    @VDWWD I'm ashamed to admit it (especially after I just threw my _WebForms expertise_ weight around in the previous comment replies) but you're right: `System.Web.UI.WebControls.Hyperlink` _indeed_ does render to `` by default. Yes, I _was_ thinking of `LinkButton` (which indeed does render `javascript:` with shenanigans) – Dai Sep 02 '21 at 10:44

0 Answers0