Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Hypelink moves when viewed in browser Grrr...!!!

Posted on 2006-06-06
10
Medium Priority
?
505 Views
Last Modified: 2007-12-19
Hi there,

This is BUGGING me like mad.

I have two hyperlinks in an aspx page. The layout is fine. I am using VS 2003. When I right-click and view in browser, the page loads correctly, and the hyperlink works as expected. BUT when I view in through a normal (intranet) browser, the hyperlinks appear at the top of the page in different fontname/color and it no longer navigates - basically looks like a label.

WHY OH WHY???? How do you fix this. Have I made an error or is this another fiddly jerking annoying bug within VS/ASP???

Lemme know ;) HTML below...

Cheers, LoveToSpod.

-------------------------------------
--------------HTML----------------
-------------------------------------


<%@ Page Language="vb" AutoEventWireup="false" Codebehind="SuperUserMenu.aspx.vb" Inherits="TechnicalCourier.SuperUserMen"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
      <HEAD>
            <meta name="vs_snapToGrid" content="False">
            <title>Super User Menu</title>
            <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
            <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
            <meta name="vs_defaultClientScript" content="JavaScript">
            <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
      </HEAD>
      <body MS_POSITIONING="GridLayout" bgColor="#ffd674">
            <form id="Form1" method="post" runat="server">
                  <DIV language="javascript" id="Div2" style="DISPLAY: inline; Z-INDEX: 101; LEFT: 32px; WIDTH: 248px; POSITION: absolute; TOP: 72px; HEIGHT: 32px"
                        onclick="return DIV1_onclick()" ms_positioning="FlowLayout"><FONT face="Arial" color="#ff6600" size="5">Super
                              User PortalS</FONT></DIV>
                  <DIV language="javascript" id="DIV1" style="DISPLAY: inline; Z-INDEX: 102; LEFT: 32px; WIDTH: 216px; POSITION: absolute; TOP: 32px; HEIGHT: 40px"
                        onclick="return DIV1_onclick()" ms_positioning="FlowLayout"><FONT face="Arial" color="#ff6600" size="6">SPSRS</FONT></DIV>
                  <DIV language="javascript" id="Div3" style="DISPLAY: inline; Z-INDEX: 103; LEFT: 72px; WIDTH: 160px; POSITION: absolute; TOP: 160px; HEIGHT: 24px"
                        onclick="return DIV1_onclick()" align="left" ms_positioning="FlowLayout"><FONT face="Arial" color="#ff6600"><STRONG><U>Navigation</U></STRONG></FONT></DIV>
                  <asp:Image id="Image1" style="Z-INDEX: 104; LEFT: 48px; POSITION: absolute; TOP: 520px" runat="server"
                        Width="264px" Height="72px" ImageUrl="../Images/Flexibility.JPG"></asp:Image><IMG style="Z-INDEX: 105; LEFT: 728px; POSITION: absolute; TOP: 32px" src="../Images/TNT%20Logo%20Cropped.gif">
                  <asp:HyperLink id="HyperLink3" style="Z-INDEX: 106; LEFT: 72px; POSITION: absolute; TOP: 208px"
                        runat="server" Width="208px" Height="24px" Font-Names="Arial" NavigateUrl="EditTechCourier.aspx">Edit Technical Courier Data</asp:HyperLink>
                  <asp:HyperLink id="HyperLink1" style="Z-INDEX: 107; LEFT: 72px; POSITION: absolute; TOP: 248px"
                        runat="server" Width="120px" Height="24px" Font-Names="Arial">Edit FSL Data</asp:HyperLink>
                  <asp:Label id="Label1" style="Z-INDEX: 108; LEFT: 192px; POSITION: absolute; TOP: 248px" runat="server"
                        Width="128px" Height="24px" Font-Names="Arial" ForeColor="Red" Font-Bold="True">- Coming Soon!</asp:Label>
            </form>
      </body>
</HTML>
0
Comment
Question by:LoveToSpod
  • 4
  • 3
  • 3
10 Comments
 
LVL 18

Expert Comment

by:Elvio Lujan
ID: 16842842
you both hyperlinks are outside of the div's... may be you can try make a general div for all form and put insisde it the hyperlinks
0
 

Author Comment

by:LoveToSpod
ID: 16842978
Elvio,

I understand now thank you, but I do not know how to change the HTML to do what you have suggested. Can you do for me please?

Thank you,

LTS
0
 
LVL 18

Expert Comment

by:Elvio Lujan
ID: 16843042
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="SuperUserMenu.aspx.vb" Inherits="TechnicalCourier.SuperUserMen"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
     <HEAD>
          <meta name="vs_snapToGrid" content="False">
          <title>Super User Menu</title>
          <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
          <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
          <meta name="vs_defaultClientScript" content="JavaScript">
          <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
     </HEAD>
     <body MS_POSITIONING="GridLayout" bgColor="#ffd674">
          <form id="Form1" method="post" runat="server">
               <DIV>
               <DIV language="javascript" id="Div2" style="DISPLAY: inline; Z-INDEX: 101; LEFT: 32px; WIDTH: 248px; POSITION: absolute; TOP: 72px; HEIGHT: 32px"
                    onclick="return DIV1_onclick()" ms_positioning="FlowLayout"><FONT face="Arial" color="#ff6600" size="5">Super
                         User PortalS</FONT></DIV>
               <DIV language="javascript" id="DIV1" style="DISPLAY: inline; Z-INDEX: 102; LEFT: 32px; WIDTH: 216px; POSITION: absolute; TOP: 32px; HEIGHT: 40px"
                    onclick="return DIV1_onclick()" ms_positioning="FlowLayout"><FONT face="Arial" color="#ff6600" size="6">SPSRS</FONT></DIV>
               <DIV language="javascript" id="Div3" style="DISPLAY: inline; Z-INDEX: 103; LEFT: 72px; WIDTH: 160px; POSITION: absolute; TOP: 160px; HEIGHT: 24px"
                    onclick="return DIV1_onclick()" align="left" ms_positioning="FlowLayout"><FONT face="Arial" color="#ff6600"><STRONG><U>Navigation</U></STRONG></FONT></DIV>
               <asp:Image id="Image1" style="Z-INDEX: 104; LEFT: 48px; POSITION: absolute; TOP: 520px" runat="server"
                    Width="264px" Height="72px" ImageUrl="../Images/Flexibility.JPG"></asp:Image><IMG style="Z-INDEX: 105; LEFT: 728px; POSITION: absolute; TOP: 32px" src="../Images/TNT%20Logo%20Cropped.gif">
               <asp:HyperLink id="HyperLink3" style="Z-INDEX: 106; LEFT: 72px; POSITION: absolute; TOP: 208px"
                    runat="server" Width="208px" Height="24px" Font-Names="Arial" NavigateUrl="EditTechCourier.aspx">Edit Technical Courier Data</asp:HyperLink>
               <asp:HyperLink id="HyperLink1" style="Z-INDEX: 107; LEFT: 72px; POSITION: absolute; TOP: 248px"
                    runat="server" Width="120px" Height="24px" Font-Names="Arial">Edit FSL Data</asp:HyperLink>
               <asp:Label id="Label1" style="Z-INDEX: 108; LEFT: 192px; POSITION: absolute; TOP: 248px" runat="server"
                    Width="128px" Height="24px" Font-Names="Arial" ForeColor="Red" Font-Bold="True">- Coming Soon!</asp:Label>
          </DIV>
          </form>
     </body>
</HTML>
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:svy
ID: 16843066
HyperLink1 is missing a NavigateUrl property, unless you set it in code behind...?
0
 
LVL 18

Accepted Solution

by:
Elvio Lujan earned 1000 total points
ID: 16843097
nop... you can add it in the html code:

<asp:HyperLink NavigateUrl="xxx.aspx" id="HyperLink1" style="Z-INDEX: 107; LEFT: 72px; POSITION: absolute; TOP: 248px"
                    runat="server" Width="120px" Height="24px" Font-Names="Arial">Edit FSL Data</asp:HyperLink>
0
 
LVL 4

Expert Comment

by:svy
ID: 16844751
You can add it anywhere, but it's not there, is it?
Also, I've noticed that all three divs are calling the same js function - onclick="return DIV1_onclick()", is it intended behavior?
0
 

Author Comment

by:LoveToSpod
ID: 16850164
Hi there,

I have now tried all of the above and it didn't fix it! So I tried creating a simple webform aspx with just one hyperlink on it. When I view it from within VS2003 there are no problems. When I view it through a proper web browser (locally or network) the hyperlink problem occurs again. No link, just text.

I reckon it's something to do with configuration of the web server and its abiltiy to host asp/aspx pages. It has been hosting an html website for over a year now with no problems. But for some reason this hyperlink problem occurrs. I also noticed it doesn't display other asp controls eg textboxes.

What checks do I need to do to ensure the webserver can support aspx etc, or what other suggestions do you have? Really need help!!

LTS.
0
 

Author Comment

by:LoveToSpod
ID: 16850239
I think I have found what I'm looking for in PAQ - Q_20787006 ANSWER:

This problem could possibly be caused if you haven't put the runat="server" tag in your asp control markup. The controls then wouldn't be rendered by the server before posting to the clients browser, and when it got there the browser would ignore it as it wouldn't recognise it. Make sure you use <asp:ControlName runat="server"></asp:ControlName>

Where do I place these tags in my HTML? Cheers,

LTS
0
 
LVL 4

Assisted Solution

by:svy
svy earned 1000 total points
ID: 16851997
<asp:HyperLink runat="server" ...
0
 

Author Comment

by:LoveToSpod
ID: 16960357
Got there in the end, but not entirely sure how!! But the above helped get me there.

Cheers.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question