'Href' links don't work in local HTML file hosted in winform app. (in more detail)

So my last question got no answers and can be found here.

So I thought that after seeing that I ran some more tests, I would write a new, more detailed question regarding this issue.

So the problem is with some links written inside the html code that link to other local html files on my system. All files are in the compiler of the winforms application (C #) which uses the browser function to display html files.

file location both inside solution and files in explorer

As you can see above, the file is in the winform application and is considered the resource compiler (although it is not in the resource folder). The other HTML files in that particular folder interact nicely with each other, and the links to "index.html" and "signUp.html" work as expected.

Link to 'signUp.html' on 'pageTwoSU.html' does not work.

heres the code on 'pageTwoSU.html':

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pageTwoSU</title>
</head>

<body>
Hello world
</body>
</html>

      

and here's the code for the link:

<a href="pageTwoSU.html"><p id="nextbutton">NEXT</p></a>

      

(The "id" is just some style. I tried to remove it and there was no change.)

Heck, here's 2 working links from one page:

<a href="signUp.html"><p>SIGN UP</p></a>

<a href="index.html"><img id="logo" src="img/logo.png"/></a>

      

So the link to the page works fine and the link syntax is correct, but it just doesn't work i.e. the landing page doesn't even open, it just stays on the same page, clicking on it has no effect. I've tried everything in this step:

  • localizing files elsewhere on the system, away from the compiler ...
  • changing the filename associated with multiple points
  • adding working links in the same place as the broken one (they worked great)
  • writing a javascript function to try to bypass <a href>

  • removing all styles and placing the broken link in different areas of the page.
  • placing the link on the landing page back to 'signUp.html' (the process works fine in reverse)

Please, help! I've been banging my head on the table for days!

We wish to provide additional information / code if necessary.

UPDATE:

Still not working, managed to get the link by creating a new document test.html and replacing "signUp.html" with this, but now the link between "index.html" and "test.html" doesn't work.

+3


source to share





All Articles