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)
Showing posts with label dynamic. Show all posts
Showing posts with label dynamic. Show all posts
Wednesday, March 28, 2012
Saturday, March 24, 2012
Tabstrip dynamic functionality ?
Ive added a tabstrip to my code (see below code):
<iewc:TabStrip id="myTabStrip" runat="server" TabDefaultStyle="background-color:#d3d3d3; border:solid 1px black; font-family:verdana; font-weight:bold; font-size:8pt; color:#ffffff; width:79; height:21; text-align:center"
SepDefaultStyle="width:10px; border-bottom: solid 1px black;" TabHoverStyle="background-color:#d3d3d3"
TabSelectedStyle="background-color:#ffffff;color:#000000" Width="100%" Height="24px" AutoPostBack="True">
<iewc:Tab></iewc:Tab>
<iewc:TabSeparator></iewc:TabSeparator>
<iewc:Tab TabIndex="1"></iewc:Tab>
<iewc:TabSeparator></iewc:TabSeparator>
<iewc:Tab TabIndex="2"></iewc:Tab>
<iewc:TabSeparator></iewc:TabSeparator>
<iewc:Tab TabIndex="3"></iewc:Tab>
</iewc:TabStrip>
This works fine, but what I really want to do is dynamically add / remove tabs depending on records in a database. For example if a table in a database has 5 records, then the tabstrip displays 5 tabs, if it holds 3 records then the tabstrip displays 3 tabs.
Is this possible ?? If so, how do I go about doing this in codebehind ?
thanks
ferkh10.This post should shed some light:view post 437723
Also, there is a forum for the Internet Explorer Web Controls:view forum 91. That is a good place to ask questions related to the TabStrip and TreeView controls.
Terri
Labels:
asp,
background-colord3d3d3,
below,
code,
dynamic,
functionality,
ive,
ltiewctabstrip,
mytabstrip,
net,
runat,
server,
tabdefaultstyle,
tabstrip
Subscribe to:
Posts (Atom)