htmltable-control

Why does setting display to none in the code-behind not add it to the HTML?

时光怂恿深爱的人放手 提交于 2019-12-24 14:17:50
问题 I'm trying to set the display style of a couple of HtmlTableRows to "display:none" in code-behind like so: foapalrow3 = new HtmlTableRow(); foapalrow3.ID = "foapalrow3"; foapalrow3.Attributes["display"] = "none"; ...but it's not working - the "View Source" contains no "display:none" for either foapalrow3 or -4. Why not, and how can I force this to work as intended? Either my nogging or the wall is going to eventually crumble with this; I've been slamming like a fullback into a brick wall with

How can I show a formerly hidden HtmlTableRow via jQuery?

流过昼夜 提交于 2019-12-11 04:04:18
问题 I have an HtmlTable with four rows. The first two (a "column header" row and a regular data row) display always. If the user selects a "+" button, another one should be added, and then another (four rows max). The two "dormant" rows are created in C# but are initially "hidden" by setting their heigh to 0 (that's the intent, anyway): boxIndex2 = new TextBox() { CssClass = "finaff-webform-field-input", Width = TEXTBOX_WIDTH, Height = 0, ID = "boxIndex2foapalrow3" }; cellColIndex2.Controls.Add