R
Richard Lionheart
Hi All,
[See below for history of posting this question]
In effort to write a loop in ASPX to generate a set of labels, I tried this:
<form id="Form2" method="post" runat="server">
<script language="C#" runat="server">
int nCols = 8;
int nRows = 20;
int iHeight = 25;
int iWidth = 50;
int iVertGap = 5;
int iHorGap = 5;
for (int iRow=0; iRow<nRows; iRow++) // "for"
flagged as an error by the compiler
{
<asp:Label ID="Lbl" RunAt="server" />
[snip]
intending to assign values to the properties of the Lbl object. But the
compiler announced:
CS1519: Invalid token 'for' in class, struct, or interface member
declaration
What can I do to generate a bunch of object programmatically in ASPX?
Thanks in advance,
Richard
I posted this first in microsoft.public.dotnet.framework.
Then thought it would be more appropriate in
microsoft.public.dotnet.framework.windowsforms
Then I received advice that it would be more appropriate in the newsgroups
listed abovel.
[See below for history of posting this question]
In effort to write a loop in ASPX to generate a set of labels, I tried this:
<form id="Form2" method="post" runat="server">
<script language="C#" runat="server">
int nCols = 8;
int nRows = 20;
int iHeight = 25;
int iWidth = 50;
int iVertGap = 5;
int iHorGap = 5;
for (int iRow=0; iRow<nRows; iRow++) // "for"
flagged as an error by the compiler
{
<asp:Label ID="Lbl" RunAt="server" />
[snip]
intending to assign values to the properties of the Lbl object. But the
compiler announced:
CS1519: Invalid token 'for' in class, struct, or interface member
declaration
What can I do to generate a bunch of object programmatically in ASPX?
Thanks in advance,
Richard
I posted this first in microsoft.public.dotnet.framework.
Then thought it would be more appropriate in
microsoft.public.dotnet.framework.windowsforms
Then I received advice that it would be more appropriate in the newsgroups
listed abovel.