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
 
?

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

I did DataBind() and this works for simple attributes but not for mixed
ones:

<asp:HyperLink runat="server" text="<%# HyperlinkName%>"
NavigateUrl="test.aspx?cultureId=<%# WorkingCultureId%>"></asp:HyperLink>

The "HyperlinkName" was get but not the "WorkingCultureId"!!!
Any Chance?
 

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

Top