D
Dave
Hi ,
I have the following where I need to append a string variable inside a
hyperlink
template, inside a datalist. The variable 'categoryList' is the culprit.
No matter where this variable is declared, the compiler says it is
'undeclared'.
It makes no sense that I can use literal strings but not variables
containing strings!
What am I missing here? I am a newbie to ASP.NET trying to rebuild my ASP
library using VS 2003.
<asp:datalist id="list" Height="8px" Width="250px" runat="server">
<ItemTemplate>
<asp:HyperLink id="HyperLink1" runat="server"
CssClass="CategoryUnselected" NavigateUrl='<%# "../index.aspx?catID=" &
categoryList & "|" & DataBinder.Eval(Container.DataItem, "CategoryID")%>'
Text='<%# DataBinder.Eval(Container.DataItem, "CategoryName") %>'>
</asp:HyperLink><br />
</ItemTemplate>
</asp:datalist>
When this is run, I get the undeclared variable error - even putting a DIM
categoryList
statement at the top of the actual HTML page will not work!
TIA,
Dave
I have the following where I need to append a string variable inside a
hyperlink
template, inside a datalist. The variable 'categoryList' is the culprit.
No matter where this variable is declared, the compiler says it is
'undeclared'.
It makes no sense that I can use literal strings but not variables
containing strings!
What am I missing here? I am a newbie to ASP.NET trying to rebuild my ASP
library using VS 2003.
<asp:datalist id="list" Height="8px" Width="250px" runat="server">
<ItemTemplate>
<asp:HyperLink id="HyperLink1" runat="server"
CssClass="CategoryUnselected" NavigateUrl='<%# "../index.aspx?catID=" &
categoryList & "|" & DataBinder.Eval(Container.DataItem, "CategoryID")%>'
Text='<%# DataBinder.Eval(Container.DataItem, "CategoryName") %>'>
</asp:HyperLink><br />
</ItemTemplate>
</asp:datalist>
When this is run, I get the undeclared variable error - even putting a DIM
categoryList
statement at the top of the actual HTML page will not work!
TIA,
Dave