Y
Yiu
Here is my code:
private static ArrayList info=new ArrayList();
private Label[] label;
private void Page_Load(object sender, System.EventArgs e)
{
label=new Label[info.Count];
Response.Write("<table width=75%border=1>");
for(int cnt=info.Count;cnt>0;cnt--)
{
Response.Write("<tr>");
Response.Write("<td>");
label[cnt-1]=new Label();
label[cnt-1].Text=(String)info[cnt-1];
Page.Controls.Add(label[cnt-1]);
Response.Write("</td>");
Response.Write("</tr>");
}
Response.Write("</table>");
}
public static void setInfo(String s)
{
info.Add(s);
}
I want to create a new line between each label in run time, but i
cannot do this to create new line between label when use the code
above, have any good suggestion for me to solve this problem?
private static ArrayList info=new ArrayList();
private Label[] label;
private void Page_Load(object sender, System.EventArgs e)
{
label=new Label[info.Count];
Response.Write("<table width=75%border=1>");
for(int cnt=info.Count;cnt>0;cnt--)
{
Response.Write("<tr>");
Response.Write("<td>");
label[cnt-1]=new Label();
label[cnt-1].Text=(String)info[cnt-1];
Page.Controls.Add(label[cnt-1]);
Response.Write("</td>");
Response.Write("</tr>");
}
Response.Write("</table>");
}
public static void setInfo(String s)
{
info.Add(s);
}
I want to create a new line between each label in run time, but i
cannot do this to create new line between label when use the code
above, have any good suggestion for me to solve this problem?