I have the following code in my page file:
<td style=" text-align:center">
<asp:HyperLink
ID="HyperLink1"
Text='<%# DataBinder.Eval(Container.DataItem,"Name") %>'
runat="server"
NavigateUrl='<%# string.Format(Link_EditResume, DataBinder.Eval(Container.DataItem,"Id")) %>'>
</asp:HyperLink>
</td>
The variable Link_EditResume is a string declared in the code-behind for the page and defined as
public partial class ProspectSummary : BasePage
{
protected string Link_EditResume = Links.EditResume;
...
where Links is a static class and EditResume is a property of that class. Why does this work and referencing Links.EditResume directly in the aspx file not work? Is there a way to reference this directly in the aspx?
Thanks.
I suspect the problem is that you did not import the namespace that
Linkslives in into your ASPX page.Your ASPX page should start with an Import directive as so: