Request a code behind property in aspx tag (runat server)

  • Thread starter =?ISO-8859-1?Q?Roland_M=FCller?=
  • Start date
?

=?ISO-8859-1?Q?Roland_M=FCller?=

Hello Ng,

i have a simple problem: there is a property in the code behind of a webpage

public string Hyperlink {
get {
return "test";
}
}


And I have a hpyerlink:

<asp:HyperLink ID="test1" runat="server" text="<% = Hyperlink%>"
NavigateUrl="http://www.google.de/"></asp:HyperLink>


I tried both, with # and = but the property is not requested; and the
link is not visible: This works with simple
<a href="http://www.test.de"><%Response.Write(HyperlinkName);%></a>

What am I doing wrong?


Thanks, Roland
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top