You must Sign In to post a response.
  • Category: .NET

    <a> tag in ASP.NET

    The forum thread has not been reviewed by Editors yet. Readers are advised to use their best judgement before accessing this thread.
    This thread will be reviewed shortly.
    If you think this thread contain inappropriate content, please report to webmaster.
    In gereanl, I can use the <a> to create anchor to allow user to goto a specific loaction within a web page, e.g. if we have a page called bryan.html

    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=big5">
    <title>Testing</title>
    </head>
    <body>

    <a name="loc1">

    <p>
    Testing<br>
    Testing<br>
    </p>

    <a name="loc2">

    <p>
    testing<br>
    testing</p>

    </body>
    </html>


    if I "input www.xxx.com/bryan.html#loc1" it will display the location which related to the <a name="loc1".

    if I "input www.xxx.com/bryan.html#loc2" it will display the location which related to the <a name="loc2".

    However, if I apply this anchor tag to the .aspx (presentation layer), the ASP.NET is not workable. Could you help me?
  • #55730
    It should work as its pure html and there is nothing for asp.net in the same ... still if u can write me what you are writing then on aspx page may be i can look into the matter.
    - Sikunj

  • #55737
    Thanks for reply, here is my testing page. It is no effect at all. Please help

    <%@ Page language="c#" Codebehind="Btesting.aspx.cs" AutoEventWireup="false" Inherits="campusJob.Btesting" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>
    <title>Btesting</title>
    <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" Content="C#">
    <meta name="vs_defaultClientScript" content="JavaScript">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    </HEAD>
    <body MS_POSITIONING="GridLayout">
    <form id="Form1" method="post" runat="server">
    <asp:Label id="Label1" style="Z-INDEX: 100; LEFT: 41px; POSITION: absolute; TOP: 60px" runat="server"
    Width="81px">Field 1</asp:Label>
    <asp:TextBox id="TextBox3" style="Z-INDEX: 105; LEFT: 145px; POSITION: absolute; TOP: 530px"
    runat="server"></asp:TextBox>
    <asp:Label id="Label2" style="Z-INDEX: 104; LEFT: 39px; POSITION: absolute; TOP: 532px" runat="server"
    Width="81px">Field 2</asp:Label>
    <asp:TextBox id="TextBox2" style="Z-INDEX: 101; LEFT: 146px; POSITION: absolute; TOP: 56px" runat="server"></asp:TextBox>

    <a name="test">

    <asp:TextBox id="TextBox1" style="Z-INDEX: 103; LEFT: 146px; POSITION: absolute; TOP: 56px" runat="server"></asp:TextBox>
    </form>
    </A>
    </body>
    </HTML>

  • #55766
    I want the <a name="test"> can bring me to the position which near the TextBox1

    <asp:TextBox id="TextBox1" style="Z-INDEX: 103; LEFT: 146px; POSITION: absolute; TOP: 56px" runat="server"></asp:TextBox>


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.