If i have an HtmlControl for a table row such as:
<tr id="trMyRow" runat="server"> ...</tr>
is there any way to set this to be invisible by default through the HTML
code, without having to go through the codebehind?
<tr id="trMyRow" runat="server" visible="false" >...</tr> does not work.
its kind of a pain to have to put a whole bunch of lines like
trMyRow.Visible = false;
for each one i want to be invisible by default.
Any help is appreciated.
Thanks in advance,
-Tim 5 4837
One option is to use the CSS:
<tr id="trMyRow" runat="server" style="display: none;">...</tr>
"Tim Mulholland" <Ti***********@ nospamaddress.c om> wrote in message
news:Os******** ******@tk2msftn gp13.phx.gbl...
If i have an HtmlControl for a table row such as:
<tr id="trMyRow" runat="server"> ...</tr>
is there any way to set this to be invisible by default through the HTML
code, without having to go through the codebehind?
<tr id="trMyRow" runat="server" visible="false" >...</tr> does not work.
its kind of a pain to have to put a whole bunch of lines like
trMyRow.Visible = false;
for each one i want to be invisible by default.
Any help is appreciated.
Thanks in advance,
-Tim
Add a style class with display:none
"Tim Mulholland" <Ti***********@ nospamaddress.c om> wrote in message
news:Os******** ******@tk2msftn gp13.phx.gbl... If i have an HtmlControl for a table row such as:
<tr id="trMyRow" runat="server"> ...</tr>
is there any way to set this to be invisible by default through the HTML code, without having to go through the codebehind?
<tr id="trMyRow" runat="server" visible="false" >...</tr> does not work.
its kind of a pain to have to put a whole bunch of lines like
trMyRow.Visible = false;
for each one i want to be invisible by default.
Any help is appreciated. Thanks in advance,
-Tim
to undo that, i'll have to edit the style, right? i won't be able to use the
visible property?
hmm. iguess i can just test that myself...
"Shiva" <sh******@onlin e.excite.com> wrote in message
news:uO******** ******@TK2MSFTN GP09.phx.gbl... One option is to use the CSS: <tr id="trMyRow" runat="server" style="display: none;">...</tr>
"Tim Mulholland" <Ti***********@ nospamaddress.c om> wrote in message news:Os******** ******@tk2msftn gp13.phx.gbl... If i have an HtmlControl for a table row such as:
<tr id="trMyRow" runat="server"> ...</tr>
is there any way to set this to be invisible by default through the HTML code, without having to go through the codebehind?
<tr id="trMyRow" runat="server" visible="false" >...</tr> does not work.
its kind of a pain to have to put a whole bunch of lines like
trMyRow.Visible = false;
for each one i want to be invisible by default.
Any help is appreciated. Thanks in advance,
-Tim
Hi Tim,
As for the HtmlControl ,we can also set the "Visible" property inline
within the aspx page template, for example:
<table width="100%" border="1">
<tr id="trOne" runat="server" Visible="false" >
<td>Table Row One</td>
</tr>
............... ...
Also, if you use the CSS style such as ,
<table width="100%" border="1">
<tr id="trOne" runat="server" style="display: none">
<td>Table Row One</td>
</tr>
then, you can use the
trOne.Style["display"] = "inline";
to reset it.
Hope this help. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
I could swear i had tested that before and it didn't work.
But, alas, it does!
Thanks so much.
-Tim
"Steven Cheng[MSFT]" <v-******@online.m icrosoft.com> wrote in message
news:DX******** ******@cpmsftng xa06.phx.gbl... Hi Tim,
As for the HtmlControl ,we can also set the "Visible" property inline within the aspx page template, for example:
<table width="100%" border="1"> <tr id="trOne" runat="server" Visible="false" > <td>Table Row One</td> </tr>
............... ..
Also, if you use the CSS style such as , <table width="100%" border="1"> <tr id="trOne" runat="server" style="display: none"> <td>Table Row One</td> </tr>
then, you can use the
trOne.Style["display"] = "inline"; to reset it.
Hope this help. Thanks.
Regards,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Matt |
last post by:
Are there any settings to make a page invisible to the user until certain
time? For example, I want mypage.html is invisible to the user until
12:00am. But mypage.html is already in the IIS server.
any ideas? thanks!
|
by: Geoff Cox |
last post by:
Hello,
I have a button which I wish to be invisible at the end of an
application. How do delete it or simply make it invisible?
Cheers
Geoff
|
by: Susan Bricker |
last post by:
Greetings. I have three forms that are open at the same time. They are
related and cascading. The first form (frmEventAdd) is the anchor. Each
event can have many Trials. The second form is frmTrialInfo. Each Trial
can have three Classes. The third form is frmClassInfo. These forms are
used for update and adding new records.
The user displays an event for update (frmEventAdd). Then clicks on a
button to display the Trials for that event...
|
by: Hutch |
last post by:
I am looking for some thoughts on this.
I have successfully gotten the HTMLControl to work using C#, and it is
displaying HTML and receiving messages nicely. Unfortunately, I am
not able to receive notifications from the HTMLControl.
In an attempt to support this, I added a private MessageWindow derived
class to the control, instantiating it in the constructor (of the
control).
|
by: Richard |
last post by:
After printing a userlist to a Datagrid i want some names not to be shown. I
want to know how i can make a entire datagrid row invisible.
I suspect its something with the OnItemDatabound but i am kinda stuck there.
but this is basicly what i want.
if Username = "Deleted_User" then
'make entire table row invisible.
End if
| |
by: NH |
last post by:
Hi,
I just cannot get this to work. I want to make a cell editable in a datagrid
only if the value of another cell is something specific.
I am able to capture the value of the other cell via the ItemDataBound event
of the datagrid e.g.
If e.Item.Cells(8).Text = "2" Then
'Make the textbox defined in my edititemtemplate read only of invisible
End If
|
by: michael.schwarz |
last post by:
Hello,
is it possible to get a HtmlControl from a string including the HTML
code in .NET 2.0? I was using the TemplateControl.ParseControl method
in .NET 1.1, but this is not working in the new version.
CIAO
Michael
|
by: CharlesA |
last post by:
Hi folks
I want to add a <ul> list with some <li> items in .net code behind on the fly
I was under the impression that you could instantiate any HTML control by
using the HTMLControl class with constructor parameters like so
HTMLControl("ul")
the purpose being that I could then program some of the attributes of the ul
|
by: Nader |
last post by:
It's easy to make the last row in a datagrid (filled with a table)
invisible:
datagridObject.Rows.Visible = false
BUT if 'i' is not the last row then things go wrong.
I even tried:
for (int i = datagridObject.Rows.Count - 1; i >= 0; i-- )
{
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |