// code for .aspx page
<asp:Panel ID="panpage" runat="server">
</asp:Panel>
// code in aspx.cs page
Table tbl = new Table();
tbl.Attributes.Add("border", "0");
tbl.Attributes.Add("border-color", "Green");
tbl.Attributes.Add("width", "100%");
tbl.Attributes.Add("cellpadding", "0");
tbl.Attributes.Add("cellspacing", "0");
tbl.Attributes.Add("class", "lblbirthday1");
panpage.Controls.Add(tbl);
TableRow tr = new TableRow();
TableCell tc = new TableCell();
tc.Attributes.Add("width", "100%");
tc.Attributes.Add("align", "Left");
tc.Attributes.Add("valign", "top");
Label name = new Label();
name.Text = "<font color='block'> " + arrStr1.Replace("@", "<br />") + "</font><br/><font color='blue'>-----------------------------------</font>";
tc.Controls.Add(name);
tr.Cells.Add(tc);
tbl.Rows.Add(tr);
panpage.Controls.Add(tbl);
No comments:
Post a Comment