E
erin.sebastian
Hello All,
I am writing a webpage in c+ .net and i have a repeater that displays
information, i want to add a statement that says
IF ("title" value from databinder == "Careers") output BLAH (show the
stuff in the databind)
ELSE
output some other BLAH (redirect to a different ASPX but show the
"title" field from the databinder...
but i keep getting the above (in the subject line) error and i can't
figure out why.. can anyone help me out...
(go to the --RIGHT HERE-- tag to see what i've done)..
Thanks in advance!!
<asp:Repeater id="rptSectionDetS" Visible="False" runat="server"
onItemDataBound="ShowSubSections">
<ItemTemplate>
<li <%# validSec(DataBinder.Eval(Container.DataItem,
"sectionId").ToString()) ? "class='current'" : " class=''" %>><a
href="section<%# DataBinder.Eval(Container.DataItem, "layoutId")
%>.aspx?id=<%# DataBinder.Eval(Container.DataItem, "sectionId") %>"><%#
DataBinder.Eval(Container.DataItem, "title") %></a></li>
<asp:Repeater id="rptSubSections" Visible='<%#
validSec(DataBinder.Eval(Container.DataItem, "sectionId").ToString())
%>' runat="server" onItemDataBound="ShowSubPages">
<ItemTemplate>
<li <%# validSubSec(DataBinder.Eval(Container.DataItem,
"subsectionId").ToString()) ? "class='level1hl'" : " class='level1'"
%>>
--RIGHT HERE-- <% if(# DataBinder.Eval(Container.DataItem,
"title").ToString() != "Careers"}{%>
<a href="subsection<%# DataBinder.Eval(Container.DataItem,
"layoutId") %>.aspx?id=<%# DataBinder.Eval(Container.DataItem,
"subsectionId") %>"><%# DataBinder.Eval(Container.DataItem, "title")
%></a></li>
<%}%> -- ADD ELSE EVENTUALLY--
<asp:Repeater id="rptSubPages" Visible='<%#
(validSubSec(DataBinder.Eval(Container.DataItem,
"subsectionId").ToString())) %>' runat="server">
<ItemTemplate>
<li class="level2"><a href="subpage<%#
DataBinder.Eval(Container.DataItem, "layoutId") %>.aspx?id=<%#
DataBinder.Eval(Container.DataItem, "subpageid") %>"><%#
DataBinder.Eval(Container.DataItem, "title") %></a></li>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
I am writing a webpage in c+ .net and i have a repeater that displays
information, i want to add a statement that says
IF ("title" value from databinder == "Careers") output BLAH (show the
stuff in the databind)
ELSE
output some other BLAH (redirect to a different ASPX but show the
"title" field from the databinder...
but i keep getting the above (in the subject line) error and i can't
figure out why.. can anyone help me out...
(go to the --RIGHT HERE-- tag to see what i've done)..
Thanks in advance!!
<asp:Repeater id="rptSectionDetS" Visible="False" runat="server"
onItemDataBound="ShowSubSections">
<ItemTemplate>
<li <%# validSec(DataBinder.Eval(Container.DataItem,
"sectionId").ToString()) ? "class='current'" : " class=''" %>><a
href="section<%# DataBinder.Eval(Container.DataItem, "layoutId")
%>.aspx?id=<%# DataBinder.Eval(Container.DataItem, "sectionId") %>"><%#
DataBinder.Eval(Container.DataItem, "title") %></a></li>
<asp:Repeater id="rptSubSections" Visible='<%#
validSec(DataBinder.Eval(Container.DataItem, "sectionId").ToString())
%>' runat="server" onItemDataBound="ShowSubPages">
<ItemTemplate>
<li <%# validSubSec(DataBinder.Eval(Container.DataItem,
"subsectionId").ToString()) ? "class='level1hl'" : " class='level1'"
%>>
--RIGHT HERE-- <% if(# DataBinder.Eval(Container.DataItem,
"title").ToString() != "Careers"}{%>
<a href="subsection<%# DataBinder.Eval(Container.DataItem,
"layoutId") %>.aspx?id=<%# DataBinder.Eval(Container.DataItem,
"subsectionId") %>"><%# DataBinder.Eval(Container.DataItem, "title")
%></a></li>
<%}%> -- ADD ELSE EVENTUALLY--
<asp:Repeater id="rptSubPages" Visible='<%#
(validSubSec(DataBinder.Eval(Container.DataItem,
"subsectionId").ToString())) %>' runat="server">
<ItemTemplate>
<li class="level2"><a href="subpage<%#
DataBinder.Eval(Container.DataItem, "layoutId") %>.aspx?id=<%#
DataBinder.Eval(Container.DataItem, "subpageid") %>"><%#
DataBinder.Eval(Container.DataItem, "title") %></a></li>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>