Hi Sue,
This problem doesn't occur to the following code snippet. Does it work on
your side? If so, you may want to show me the code snippet on your side so
that I can test it. Thanks.
private void Page_Load(object sender, System.EventArgs e)
{
int numrows = 3;
int numcells = 2;
for (int j=0; j<numrows; j++)
{
TableRow r = new TableRow();
for (int i=0; i<numcells; i++)
{
TableCell c = new TableCell();
LinkButton lb=new LinkButton ();
lb.Text=i.ToString();
if(i==0)c.Controls.Add(lb);
else c.Controls.Add(new TextBox());
r.Cells.Add(c);
}
Table1.Rows.Add(r);
}
}
Best Regards,
Lewis Wang
Support Professional
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| MIME-Version: 1.0
| X-MIMETrack: Serialize by Notes Client on Susan L WILLIS/MUL/OJD(Release
6.0.1|February
| 07, 2003) at 07/23/2003 11:45:57 AM,
| Serialize complete at 07/23/2003 11:45:57 AM,
| Serialize by Notes Client on Susan L WILLIS/MUL/OJD(Release
6.0.1|February
| 07, 2003) at 07/23/2003 11:46:02 AM,
| Serialize complete at 07/23/2003 11:46:02 AM
| From:
Su*@ojd.state.or.us
| Subject: Adding webcontrols.table to aspx - not rendering
| X-Newsreader: Lotus Notes Release 6.0.1 February 07, 2003
| Content-Type: text/plain; charset="US-ASCII"
| Message-ID: <#T**************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.general
| Date: Wed, 23 Jul 2003 11:46:03 -0700
| NNTP-Posting-Host: 159.121.96.200
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:102197
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| On code-behind page:
| (attributes set programatically for each of these elements)
| linkbutton added to tablecell
| textbox added to tablecell
| tablecells added to tablerow
| tablerow added to table (table.ID is TestTable)
| On .aspx page:
| <HeaderTemplate>
| <asp:Table ID="TestTable" runat="Server" />
| </HeaderTemplate>
|
| Source code on .aspx page in browser shows the table and it's controls
are
| correctly created and placed. Controls for the Linkbutton and Textbox do
| not display in browser. I suspect it has something to do with the
| runat="server" attribute for the linkbutton or textbox for which I do not
| find an attribute I can set (e.g. linkbutton.runat = "server"). Any ideas
| on how I can get these elements to display?
|
| tia,
| Sue W.
|
|