Add User Control to table cell in another UserCont
Hi..
Right now im using one user control in an aspx page as..
<%@ Register TagPrefix="cc1" Namespace="cssc.Web.Controls" Assembly="Clock" %>
<div id="lCurrTime_container" style="BORDER-RIGHT: black 1px solid; BORDER-TOP: gray 1px; DISPLAY: block; FONT-WEIGHT: bold;
FONT-SIZE: 7pt; Z-INDEX: 102; LEFT: 0px; BORDER-LEFT: gray 1px; WIDTH: 120px; COLOR: black; BORDER-BOTTOM: black 1px solid;
POSITION: absolute; TOP: 0px; HEIGHT: 16px; BACKGROUND-COLOR: white; TEXT-ALIGN: center">
Current time: <cc1:clock id="Clock2" runat="server" UseExternalJS="true" DateTimeFormat="HH:mm"
Interval="30000"></cc1:clock>
</div>
Now i need to use this one in to another webUserControl and dynamically add to Table Column.
Table tbl_menu = new Table();
TableCell tc = null;
tbl_menu.Width = Unit.Percentage(100.00);
tbl_menu.CellPadding = 0;
tbl_menu.CellSpacing = 0;
TableRow tr = new TableRow();
tr.Height = Unit.Pixel(25);
tc = new TableCell();
tc.HorizontalAlign = HorizontalAlign.Right;
LinkButton lb = new LinkButton();
lb.ForeColor = System.Drawing.Color.FromKnownColor(KnownColor.Whi te);
lb.Text = "Logout";
tc.Controls.Add(lb);
tr.Controls.Add(tc);
I need to add the User control to above mentioned table cell ..........
Pls help me how to do this..............
Thanks & Regards,
Veeruu...
|