Tyzak
Tyzak

Reputation: 2436

Link isn't shown

hello i have a silly issue, my link isn't shown. i use the same code like in an other programm (despite i forget something)

 <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!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">


<script  runat="server">


    Sub Page_Load()

        If IsPostBack Then
            meinnewLink.InnerHtml = "Beispiele und weitere Erklärungen"
            meinnewLink.HRef = "http://lucene.apache.org/java/2_9_1/queryparsersyntax.html"
            meinnewLink.Title = "Lucene"
            meinnewLink.Name = ("Arial")
            meinnewLink.Target = "_top"
        Else
            meinnewLink.InnerHtml = "Beispiele und weitere Erklärungen"
            meinnewLink.HRef = "http://lucene.apache.org/java/2_9_1/queryparsersyntax.html"
            meinnewLink.Title = "Lucene"
            meinnewLink.Name = ("Arial")
            meinnewLink.Target = "_top"

        End If

    End Sub

</script>


<head runat="server">
    <title>Hilfe</title>
</head>
<body>
    <form id="form1" runat="server">

    <asp:Image ID="Image1"
runat="server"
AlternateText="logo"
ImageUrl="logo.bmp"/>


    <p><u> Grundfunktionalitäten:</u></p> 
    Volltextsuche: Suche im Text<br />
    Dateinamensuche: Suche im Titel<br />
    Eine Kombination ist möglich<br /><br />

    OR: Oder Verknüpfung der Suchbegriffe (Defaulteinstellung)<br />
    AND: Und Verknüpfung der Suchbegriffe<br />
    NOT: schließt einen Suchbegriff aus<br />
    *: Wildcard für mehrere Buchstaben<br />
    ?: Wildcard für einen Buchstaben<br />
    Hinweis: Wildcard darf nicht der erste Buchstabe sein <br />

    <p><font size="2"><a runat="server" id="meinnewLink"  style ="font-family :Arial " ></a></font></p>


    </form>
</body>
</html>

well i searched the mistake but i can't find it :>

Upvotes: 0

Views: 71

Answers (3)

Pharabus
Pharabus

Reputation: 6062

I think the InnerHtml is wrong, it should be InnerText

edit

When I tried to recreate this I had the page load event overriden in the code behind file and the script code did not run, when I removed it from the code behind it ran. Can you check that you do not have the page load event in the code behind?

Upvotes: 1

jinsungy
jinsungy

Reputation: 10835

missing meinnewLink.Text?

Try using a server-side control like LinkButton or HyperLink.

Upvotes: 1

Brian Mains
Brian Mains

Reputation: 50728

Right click the page on the client and view source... do you see text between the tags?

Upvotes: 0

Related Questions