Hi All,
My Source Code is the following
<ItemTemplate>
<tr>
<td width="100"><font size="2" face="Verdana, Arial,
Helvetica, sans-serif"> </font></td>
<%IF #Container.DataItem("LINE53")<>2 THEN%>
<td width="300" colspan="3"><font size="2" face="Verdana, Arial,
Helvetica,
sans-serif"><b>Line <%#Container.DataItem("LINE53")%></b></font></td>
<%END IF%>
</tr>
</ItemTemplate>
I got the error:
Compiler Error Message: BC30201: Expression expected.
Not uses '#'
Compiler Error Message: BC30451: Name 'Container' is not declared.
Please Help.No, you don't do it in this way. You should handle ItemDataBound event to
check the values in the data items and set the visual properties of your
template elements.
Eliyahu
<kelvinweb@.gmail.com> wrote in message
news:1142416932.080160.143950@.j52g2000cwj.googlegroups.com...
> Hi All,
> My Source Code is the following
> <ItemTemplate>
> <tr>
> <td width="100"><font size="2" face="Verdana, Arial,
> Helvetica, sans-serif"> </td>
> <%IF #Container.DataItem("LINE53")<>2 THEN%>
> <td width="300" colspan="3"><font size="2" face="Verdana, Arial,
> Helvetica,
> sans-serif"><b>Line <%#Container.DataItem("LINE53")%></b></td>
> <%END IF%>
> </tr>
> </ItemTemplate>
> I got the error:
> Compiler Error Message: BC30201: Expression expected.
> Not uses '#'
> Compiler Error Message: BC30451: Name 'Container' is not declared.
> Please Help.
>
Or you can try IIf function.
HTH
Elton Wang
"kelvinweb@.gmail.com" wrote:
> Hi All,
> My Source Code is the following
> <ItemTemplate>
> <tr>
> <td width="100"><font size="2" face="Verdana, Arial,
> Helvetica, sans-serif"> </td>
> <%IF #Container.DataItem("LINE53")<>2 THEN%>
> <td width="300" colspan="3"><font size="2" face="Verdana, Arial,
> Helvetica,
> sans-serif"><b>Line <%#Container.DataItem("LINE53")%></b></td>
> <%END IF%>
> </tr>
> </ItemTemplate>
> I got the error:
> Compiler Error Message: BC30201: Expression expected.
> Not uses '#'
> Compiler Error Message: BC30451: Name 'Container' is not declared.
> Please Help.
>
0 comments:
Post a Comment