Showing posts with label tablecell. Show all posts
Showing posts with label tablecell. Show all posts

Saturday, March 31, 2012

table that i add at run time, is in the end of page

I"m using this code to add at run time:


Dim maintable As New Table()

Dim row As New TableRow()
Dim cell As New TableCell()
Dim heights As New Unit("200px")
Dim place As New PlaceHolder()
Dim mycontrol As UserControl = LoadControl("smallmenu.ascx")

maintable.Height = heights
maintable.Width = heights

cell.Height = heights
cell.Text = "yaniv"
cell.Controls.Add(mycontrol)

row.Height = heights

row.Cells.Add(cell)

maintable.Rows.Add(row)
maintable.CssClass = "maintable"

Page.Controls.Add(maintable)

place.Controls.Add(mycontrol)

the problem is that the new table sits in the end of the (after the </html> tag) so i get an error massege:
"Control '_ctl2_Button1' of type 'Button' must be placed inside a form tag with runat=server.
"

how can solve that problem?You can use

<asp:table id="maintable" runat="server" width=... height=.. ... > </asp:Table
in your aspx page rather than dynamically creating a maintable in the codebehind.

Use the codebehind to just populate the table rows and columns.

This way you can place the <asp:table... ></asp:Table> wherever you want on the aspx page.

Hope this helps.
i don't want to use the aspx page, because i want this table to inherit to all my other pages...
I dont understand...

If you want to embed the table in all your aspx pages, you can still add an empty asp Table tag like

<asp:Table id="mytable" runat="server"... ...></asp:Table> to every aspx page where you want the table to be displayed.

Now you can still dynamically populate this table from code behind...
sorry to bother, i tried thatone, but the code behind dosen't recognize this table in i add it in the aspx page. i can't run the "maintable.controls.add" in this case. even if i use the dim maintable, and don't you the page.controls.add(maintable) there is no connection between them!
I had the same problem. I asked about it yesterday (only about a DDL).

My kloogy solution was to create a wrapper class:

Public Class ItemPair
Inherits DropDownList
Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
output.RenderBeginTag("form")
MyBase.Render(output)
End Sub
Protected Overrides Sub AddAttributesToRender(ByVal writer As HtmlTextWriter)
writer.RenderEndTag()
End Sub
End Class

You could probably cut and paste and change a couple words and be set.
I posted another asnwer that hasn't shown up yet but here is the link to my question which was very similar to yours:

http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=516165

Wednesday, March 28, 2012

Tablecell backcolor?

// Add the new cell that will host the child grid

TableCell newCell = new TableCell();

newCell.ColumnSpan = cellsToSpanOver;

newCell.BackColor ="#fafad2"; ************ I know this is not right

--
DavidTry to use css classes... It should be better...

--

Thanks,
Yunus Emre ALPZEN
BSc, MCSD.NET

"Fetty" <davef@.helixpoint.com> wrote in message
news:%23DVhA1uYFHA.1404@.TK2MSFTNGP09.phx.gbl...
> // Add the new cell that will host the child grid
> TableCell newCell = new TableCell();
> newCell.ColumnSpan = cellsToSpanOver;
> newCell.BackColor ="#fafad2"; ************ I know this is not right
>
> --
> David
if you look at the datatype of BackColor, you'll see its of datatype Color,
so you know you need to pass a Color. Now we look in the doc's for the Color
class. Here we see a bunch of ways to create a color, from name, from RGB,
etc. so after 60 seconds of reading the doc's we get:

newCell.BackColor = Color.FromArgb(0xfafad2);

-- bruce (sqlwork.com)

"Fetty" <davef@.helixpoint.com> wrote in message
news:%23DVhA1uYFHA.1404@.TK2MSFTNGP09.phx.gbl...
> // Add the new cell that will host the child grid
> TableCell newCell = new TableCell();
> newCell.ColumnSpan = cellsToSpanOver;
> newCell.BackColor ="#fafad2"; ************ I know this is not right
>
> --
> David

Tablecell backcolor?

// Add the new cell that will host the child grid
TableCell newCell = new TableCell();
newCell.ColumnSpan = cellsToSpanOver;
newCell.BackColor ="#fafad2"; ************ I know this is not right
DavidTry to use css classes... It should be better...
Thanks,
Yunus Emre ALPZEN
BSc, MCSD.NET
"Fetty" <davef@.helixpoint.com> wrote in message
news:%23DVhA1uYFHA.1404@.TK2MSFTNGP09.phx.gbl...
> // Add the new cell that will host the child grid
> TableCell newCell = new TableCell();
> newCell.ColumnSpan = cellsToSpanOver;
> newCell.BackColor ="#fafad2"; ************ I know this is not right
>
> --
> David
>
if you look at the datatype of BackColor, you'll see its of datatype Color,
so you know you need to pass a Color. Now we look in the doc's for the Color
class. Here we see a bunch of ways to create a color, from name, from RGB,
etc. so after 60 seconds of reading the doc's we get:
newCell.BackColor = Color.FromArgb(0xfafad2);
-- bruce (sqlwork.com)
"Fetty" <davef@.helixpoint.com> wrote in message
news:%23DVhA1uYFHA.1404@.TK2MSFTNGP09.phx.gbl...
> // Add the new cell that will host the child grid
> TableCell newCell = new TableCell();
> newCell.ColumnSpan = cellsToSpanOver;
> newCell.BackColor ="#fafad2"; ************ I know this is not right
>
> --
> David
>

TableCell

I am using the TableCell object from the framework.
How can I mark a TableCell to correspond to a TH tag, when it gets converted
to a HTML table?
--
Arne Garvander
(I program VB.Net for fun and C# to get paid.)Use a TableHeaderCell object instead.

"Arne Garvander" wrote:

> I am using the TableCell object from the framework.
> How can I mark a TableCell to correspond to a TH tag, when it gets converted
> to a HTML table?
> --
> Arne Garvander
> (I program VB.Net for fun and C# to get paid.)

TableCell

I create a TableCell by

TableCell cell = new TableCell()

but I could not find how to add a TextBox inside this cell. Any ideas?

Thanks in advance
Serdar KALAYCI
--WebControls.TextBox txt = new WebControls.TextBox();
cell.Controls.Add(txt);

Karl

"Serdar Kalayc" <serdarkalayci@.unisec.com.tr> wrote in message
news:ewP%23cXwPDHA.4024@.tk2msftngp13.phx.gbl...
> I create a TableCell by
> TableCell cell = new TableCell()
> but I could not find how to add a TextBox inside this cell. Any ideas?
> Thanks in advance
> Serdar KALAYCI
> --
Got it, here's the code if anyone wonders...

TableCell cell = new TableCell();
TextBox text1 = new TextBox();
cell.Controls.Add (text1);

"Serdar Kalayc" <serdarkalayci@.unisec.com.tr> wrote in message
news:ewP#cXwPDHA.4024@.tk2msftngp13.phx.gbl...
> I create a TableCell by
> TableCell cell = new TableCell()
> but I could not find how to add a TextBox inside this cell. Any ideas?
> Thanks in advance
> Serdar KALAYCI
> --
I have one more question. I added a Button inside a Table at design time by
changing HTML codes, but I can't access it's events or even see it in the
components list on the Properties window.

Serdar KALAYCI

"Karl Seguin" <kseguin##crea.ca> wrote in message
news:uO53SbwPDHA.1608@.TK2MSFTNGP11.phx.gbl...
> WebControls.TextBox txt = new WebControls.TextBox();
> cell.Controls.Add(txt);
> Karl
>
> "Serdar Kalayc" <serdarkalayci@.unisec.com.tr> wrote in message
> news:ewP%23cXwPDHA.4024@.tk2msftngp13.phx.gbl...
> > I create a TableCell by
> > TableCell cell = new TableCell()
> > but I could not find how to add a TextBox inside this cell. Any ideas?
> > Thanks in advance
> > Serdar KALAYCI
> > --
if you are adding an object programatically, like your butotn, you'll also
have to attach the event programatically.

in vb.net, you can use:
addhandler yourButton.click, AddressOf yourFunctionHandler

in c#, you can use:
yourButton.Click += new EventHandler(yourFunctionHandler);

Make sure that your button is created, and you attach your handler on
postback also (ie, don't wrap it in an !page.IsPostback)

Karl

"Serdar Kalayc" <serdarkalayci@.unisec.com.tr> wrote in message
news:ulgu2oxPDHA.1748@.TK2MSFTNGP11.phx.gbl...
> I have one more question. I added a Button inside a Table at design time
by
> changing HTML codes, but I can't access it's events or even see it in the
> components list on the Properties window.
> Serdar KALAYCI
>
> "Karl Seguin" <kseguin##crea.ca> wrote in message
> news:uO53SbwPDHA.1608@.TK2MSFTNGP11.phx.gbl...
> > WebControls.TextBox txt = new WebControls.TextBox();
> > cell.Controls.Add(txt);
> > Karl
> > "Serdar Kalayc" <serdarkalayci@.unisec.com.tr> wrote in message
> > news:ewP%23cXwPDHA.4024@.tk2msftngp13.phx.gbl...
> > > I create a TableCell by
> > > > TableCell cell = new TableCell()
> > > > but I could not find how to add a TextBox inside this cell. Any ideas?
> > > > Thanks in advance
> > > Serdar KALAYCI
> > > --
> > >

TableCell

I am using the TableCell object from the framework.
How can I mark a TableCell to correspond to a TH tag, when it gets converted
to a HTML table?
--
Arne Garvander
(I program VB.Net for fun and C# to get paid.)Use a TableHeaderCell object instead.
"Arne Garvander" wrote:

> I am using the TableCell object from the framework.
> How can I mark a TableCell to correspond to a TH tag, when it gets convert
ed
> to a HTML table?
> --
> Arne Garvander
> (I program VB.Net for fun and C# to get paid.)

TableCell oTableCell = new TableCell(); noWrap?

Use Wrap property:
oTableCell.Wrap = false;

>--Original Message--
>Does anyone know how to set the noWrap on a TableCell?
>TableCell oTableCell = new TableCell();
>oTableCell. ' = noWrap;
>
>Thanks in advance.
>-Brian K. Williams
>
>.
>Don't know how I missed that one... thanks.
-Brian
"Sergey Poberezovskiy" <anonymous@.discussions.microsoft.com> wrote in
message news:622601c42e44$38b2eb00$a401280a@.phx.gbl...
> Use Wrap property:
> oTableCell.Wrap = false;
>

TableCell oTableCell = new TableCell(); noWrap?

Does anyone know how to set the noWrap on a TableCell?

TableCell oTableCell = new TableCell();
oTableCell. ?? = noWrap;

Thanks in advance.
-Brian K. WilliamsUse Wrap property:

oTableCell.Wrap = false;

>--Original Message--
>Does anyone know how to set the noWrap on a TableCell?
>TableCell oTableCell = new TableCell();
>oTableCell. ?? = noWrap;
>
>Thanks in advance.
>-Brian K. Williams
>
>.
Don't know how I missed that one... thanks.
-Brian

"Sergey Poberezovskiy" <anonymous@.discussions.microsoft.com> wrote in
message news:622601c42e44$38b2eb00$a401280a@.phx.gbl...
> Use Wrap property:
> oTableCell.Wrap = false;
> >--Original Message--
> >Does anyone know how to set the noWrap on a TableCell?
> >TableCell oTableCell = new TableCell();
> >oTableCell. ?? = noWrap;
> >Thanks in advance.
> >-Brian K. Williams
> >.

TableCell: BackColor Property But No BackGround Property?

I am using an ASP:Table Control to make a table. I know that the HTML TD tag
has a background attribute and a bgcolor attribute. The TableCell has a
BackColor property, which is the equivelant of the HTML bgcolor attribute,
but what can I use as an equivelant for the HTML background attribute?
Thanks.
--
Nathan Sokalski
njsokalski@dotnet.itags.org.hotmail.com
http://www.nathansokalski.com/I would have to look but my first thought is this. The control will render
whatever attribute you add. So you can add it declaratively with
attribute="value" syntax or on in the code you can add it through the
Attributes collection on the control.

C#
control.Attributes.Add("Name", "Value");

I think you can do this too, because I think it is a NameValueCollection
which means it handles the add automatically.
control.Attributes["Name"] = "Value";

"Nathan Sokalski" wrote:

> I am using an ASP:Table Control to make a table. I know that the HTML TD tag
> has a background attribute and a bgcolor attribute. The TableCell has a
> BackColor property, which is the equivelant of the HTML bgcolor attribute,
> but what can I use as an equivelant for the HTML background attribute?
> Thanks.
> --
> Nathan Sokalski
> njsokalski@.hotmail.com
> http://www.nathansokalski.com/
>

TableCell.Text property overwrites dynamic control

If I add a hidden input control to a tablecell and then set the cell's text
property, the hidden control is not output. If I set the text first, then
the hidden control is output but the text is not. No errors are generated.
I can make it work by adding a literal control instead of using the text
property, but why doesn't the "simple" method work?

Dim tCell As TableCell = New TableCell
Dim thidden As HtmlInputHidden = New HtmlInputHidden
thidden.ID = "h1"
thidden.Value = "hidden text"
tCell.Controls.Add(thidden)
tCell.Text = "visible text"
tRow.Cells.Add(tCell)Maybe add the text as a literal?

Joe

"Bob Voss" <bvoss@.Xspam.tsts.com> wrote in message
news:%23iH0xNNxDHA.2408@.tk2msftngp13.phx.gbl...
> If I add a hidden input control to a tablecell and then set the cell's
text
> property, the hidden control is not output. If I set the text first, then
> the hidden control is output but the text is not. No errors are
generated.
> I can make it work by adding a literal control instead of using the text
> property, but why doesn't the "simple" method work?
> Dim tCell As TableCell = New TableCell
> Dim thidden As HtmlInputHidden = New HtmlInputHidden
> thidden.ID = "h1"
> thidden.Value = "hidden text"
> tCell.Controls.Add(thidden)
> tCell.Text = "visible text"
> tRow.Cells.Add(tCell)

TableCell Width

Hi,

Did someone know why this code does'nt work (The TableCell Width).
The cell don't have 600 and 150 like writed in width="600" and
width="150".

<asp:datagrid id="DataGrid1" runat="server"
AutoGenerateColumns="false" ShowHeader="false" ShowFooter="false">
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Table>
<asp:TableRow>
<asp:TableCell Width="600">
<%# container.dataitem("Service")%>
</asp:TableCell>
<asp:TableCell Width="150">
Price :
<%# databinder.eval(container.dataitem,"price","{0:c}")%>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagridSalut Andre,

La datagrid fait dj une table, et ton code tente d'en ajouter une. Tu
ferais mieux de te servir d'une Label.

The datagrid already creates a table, and your code is attempting to add
another. You'd do better using a Label:

<asp:datagrid id="DataGrid1" runat="server" AutoGenerateColumns="False"
ShowHeader="False">
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Label id="Label2" runat="server" Width="600px"></asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Label id="Label3" runat="server" Width="150px"></asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid
Ken
Microsoft MVP [ASP.NET]
Toronto

"Andre" <lostman@.cablevision.qc.ca> wrote in message
news:uhcEiCq6DHA.3860@.tk2msftngp13.phx.gbl...
> Hi,
> Did someone know why this code does'nt work (The TableCell Width).
> The cell don't have 600 and 150 like writed in width="600" and
> width="150".
>
> <asp:datagrid id="DataGrid1" runat="server"
> AutoGenerateColumns="false" ShowHeader="false" ShowFooter="false">
> <Columns>
> <asp:TemplateColumn>
> <ItemTemplate>
> <asp:Table>
> <asp:TableRow>
> <asp:TableCell Width="600">
> <%# container.dataitem("Service")%>
> </asp:TableCell>
> <asp:TableCell Width="150">
> Price :
> <%# databinder.eval(container.dataitem,"price","{0:c}")%>
> </asp:TableCell>
> </asp:TableRow>
> </asp:Table>
> </ItemTemplate>
> </asp:TemplateColumn>
> </Columns>
> </asp:datagrid>
Une reponse en Francais, je n'en attendait pas autant ;o)))

L'ide des Label m'a sauver la vie.. de facon contourner :)
J'ai donc incorporer des Label dans ma table, donc mes Width fonctionne
parfaitement !!

Car avec seulement des Label la disposition est moin evidente, pour inscrire
les donnes sur des lignes diffrente par example..

Merci.

"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> wrote in message
news:uccNiys6DHA.2412@.TK2MSFTNGP09.phx.gbl...
> Salut Andre,
> La datagrid fait dj une table, et ton code tente d'en ajouter une. Tu
> ferais mieux de te servir d'une Label.
> The datagrid already creates a table, and your code is attempting to add
> another. You'd do better using a Label:
> <asp:datagrid id="DataGrid1" runat="server" AutoGenerateColumns="False"
> ShowHeader="False">
> <Columns>
> <asp:TemplateColumn>
> <ItemTemplate>
> <asp:Label id="Label2" runat="server" Width="600px"></asp:Label>
> </ItemTemplate>
> </asp:TemplateColumn>
> <asp:TemplateColumn>
> <ItemTemplate>
> <asp:Label id="Label3" runat="server" Width="150px"></asp:Label>
> </ItemTemplate>
> </asp:TemplateColumn>
> </Columns>
> </asp:datagrid>
> Ken
> Microsoft MVP [ASP.NET]
> Toronto
> "Andre" <lostman@.cablevision.qc.ca> wrote in message
> news:uhcEiCq6DHA.3860@.tk2msftngp13.phx.gbl...
> > Hi,
> > Did someone know why this code does'nt work (The TableCell Width).
> > The cell don't have 600 and 150 like writed in width="600" and
> > width="150".
> > <asp:datagrid id="DataGrid1" runat="server"
> > AutoGenerateColumns="false" ShowHeader="false" ShowFooter="false">
> > <Columns>
> > <asp:TemplateColumn>
> > <ItemTemplate>
> > <asp:Table>
> > <asp:TableRow>
> > <asp:TableCell Width="600">
> > <%# container.dataitem("Service")%>
> > </asp:TableCell>
> > <asp:TableCell Width="150">
> > Price :
> > <%# databinder.eval(container.dataitem,"price","{0:c}")%>
> > </asp:TableCell>
> > </asp:TableRow>
> > </asp:Table>
> > </ItemTemplate>
> > </asp:TemplateColumn>
> > </Columns>
> > </asp:datagrid
Salut Andr,

Je suis content que a fonctionne pour toi.

En passant, il y a un newsgroup francophone
(microsoft.public.fr.dotnet.aspnet) au cas ou tu en aurais besoin.

(Il est rare Toronto que je puisse sortir mon franais. Jai passe sept
ans Qubec [Ste-Foy].)

Ken
Toronto

I'm glad that works for you.

BTW, there's a francophone newsgroup (microsoft.public.fr.dotnet.aspnet) in
case you ever need it.

(I don't often get a chance in Toronto to use my French. I lived in Ste-Foy
for seven years.)

"Andre" <lostman@.cablevision.qc.ca> wrote in message
news:ereXSky6DHA.4012@.tk2msftngp13.phx.gbl...
> Une reponse en Francais, je n'en attendait pas autant ;o)))
> L'ide des Label m'a sauver la vie.. de facon contourner :)
> J'ai donc incorporer des Label dans ma table, donc mes Width fonctionne
> parfaitement !!
> Car avec seulement des Label la disposition est moin evidente, pour
> inscrire
> les donnes sur des lignes diffrente par example..
> Merci.
>
> "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> wrote in message
> news:uccNiys6DHA.2412@.TK2MSFTNGP09.phx.gbl...
>> Salut Andre,
>>
>> La datagrid fait dj une table, et ton code tente d'en ajouter une. Tu
>> ferais mieux de te servir d'une Label.
>>
>> The datagrid already creates a table, and your code is attempting to add
>> another. You'd do better using a Label:
>>
>> <asp:datagrid id="DataGrid1" runat="server"
>> AutoGenerateColumns="False"
>> ShowHeader="False">
>> <Columns>
>> <asp:TemplateColumn>
>> <ItemTemplate>
>> <asp:Label id="Label2" runat="server" Width="600px"></asp:Label>
>> </ItemTemplate>
>> </asp:TemplateColumn>
>> <asp:TemplateColumn>
>> <ItemTemplate>
>> <asp:Label id="Label3" runat="server" Width="150px"></asp:Label>
>> </ItemTemplate>
>> </asp:TemplateColumn>
>> </Columns>
>> </asp:datagrid>
>>
>> Ken
>> Microsoft MVP [ASP.NET]
>> Toronto
>>
>> "Andre" <lostman@.cablevision.qc.ca> wrote in message
>> news:uhcEiCq6DHA.3860@.tk2msftngp13.phx.gbl...
>> > Hi,
>>> > Did someone know why this code does'nt work (The TableCell Width).
>> > The cell don't have 600 and 150 like writed in width="600" and
>> > width="150".
>>>> > <asp:datagrid id="DataGrid1" runat="server"
>> > AutoGenerateColumns="false" ShowHeader="false" ShowFooter="false">
>> > <Columns>
>> > <asp:TemplateColumn>
>> > <ItemTemplate>
>> > <asp:Table>
>> > <asp:TableRow>
>> > <asp:TableCell Width="600">
>> > <%# container.dataitem("Service")%>
>> > </asp:TableCell>
>> > <asp:TableCell Width="150">
>> > Price :
>> > <%# databinder.eval(container.dataitem,"price","{0:c}")%>
>> > </asp:TableCell>
>> > </asp:TableRow>
>> > </asp:Table>
>> > </ItemTemplate>
>> > </asp:TemplateColumn>
>> > </Columns>
>> > </asp:datagrid>
>>>>

TableRow/TableCell Serverside Q

Consider this pseudo HTML from a web form

<asp:Table>
<asp:TableRow>
<asp:TableCell>
<asp:Table>
<asp:TableRow>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
</asp:TableRow>
</asp:Table>
</asp:TableCell>
</asp:TableRow>
</asp:Table
How can I construct this on the server side? Assume that I start with an
empty asp:table control on my webform, as follows:

<asp:Table ID="tblViewWall" Runat="server"></asp:Table
I've done the following:

TableRow trRow = new TableRow();
TableCell trCell = new TableCell();
trRow.Cells.Add(trCell);

// Now inside trCell, I want to add another table with 1 row, and two
cells
// I can't see how I would create another Table, and add it to a
TableCell

tblViewWall.Rows.Add(trRow);Figured it out.
tcCell.Controls.Add( ...)

"George Durzi" <gdurzi@.hotmail.com> wrote in message
news:#tWpeZ8oDHA.2456@.TK2MSFTNGP09.phx.gbl...
> Consider this pseudo HTML from a web form
> <asp:Table>
> <asp:TableRow>
> <asp:TableCell>
> <asp:Table>
> <asp:TableRow>
> <asp:TableCell></asp:TableCell>
> <asp:TableCell></asp:TableCell>
> </asp:TableRow>
> </asp:Table>
> </asp:TableCell>
> </asp:TableRow>
> </asp:Table>
> How can I construct this on the server side? Assume that I start with an
> empty asp:table control on my webform, as follows:
> <asp:Table ID="tblViewWall" Runat="server"></asp:Table>
> I've done the following:
> TableRow trRow = new TableRow();
> TableCell trCell = new TableCell();
> trRow.Cells.Add(trCell);
> // Now inside trCell, I want to add another table with 1 row, and two
> cells
> // I can't see how I would create another Table, and add it to a
> TableCell
> tblViewWall.Rows.Add(trRow);
George,

Try something like this:

TableCell newCell = new TableCell();
Table childTable = new Table();
newCell.Controls.Add(childTable);

//Populate the child table here.

TableRow newRow = new TableRow();
newRow.Cells.Add(newCell);

this.tblViewWall.Rows.Add(newRow);

HTH,
Nicole

"George Durzi" <gdurzi@.hotmail.com> wrote in message
news:%23tWpeZ8oDHA.2456@.TK2MSFTNGP09.phx.gbl...
> Consider this pseudo HTML from a web form
> <asp:Table>
> <asp:TableRow>
> <asp:TableCell>
> <asp:Table>
> <asp:TableRow>
> <asp:TableCell></asp:TableCell>
> <asp:TableCell></asp:TableCell>
> </asp:TableRow>
> </asp:Table>
> </asp:TableCell>
> </asp:TableRow>
> </asp:Table>
> How can I construct this on the server side? Assume that I start with an
> empty asp:table control on my webform, as follows:
> <asp:Table ID="tblViewWall" Runat="server"></asp:Table>
> I've done the following:
> TableRow trRow = new TableRow();
> TableCell trCell = new TableCell();
> trRow.Cells.Add(trCell);
> // Now inside trCell, I want to add another table with 1 row, and two
> cells
> // I can't see how I would create another Table, and add it to a
> TableCell
> tblViewWall.Rows.Add(trRow);