Hello
How do I perform a variable replacement in ASP.NET when I am using the
runat=server clause to generate a table - it was simple in ASP
With ASP :
----------
<HTML>
....
<BODY>
....
<TABLE...>
<TR>
<TD colspan="<%=Num berOfCols%>">.. .<TD>
....
<TR>
....
<TABLE>
....
</BODY>
</HTML>
With ASP.NET :
--------------
<HTML>
....
<BODY>
....
<asp:Table... runat=server>
<asp:TableRow runat=server>
<asp:TableCel l ColumnSpan="<%= NumberOfCols%>"
runat=server>.. .</asp:TableCell>
....
</asp:TableRow>
....
</asp:Table>
....
</BODY>
</HTML>
Then the Code Behind contains
....
Protected NumberOfCols As Integer = 6
....
But executing the above <%=NumberOfCols %> is not a valid value for
Int32.
However if I print the variable by placing <%=NumberOfCols %> somewhere
within the body of the html it prints the value of it ("6") correctly.
Can anyone help ?
Cheers
Phil