Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Sections visible and not visible

Reply
Thread Tools

Sections visible and not visible

 
 
tshad
Guest
Posts: n/a
 
      01-31-2005
I have a page with many input variables and some are blank. I want to make
the row "not visible" if the field is blank.

For example:

<tr>
<td width="120" align="right" nowrap>
<asp:Label id="contactAddressHead" Text="Address:" runat="server"/>
</td>
<td>
<asp:Label id="contactAddress" TextMode="MultiLine" Columns="50"
rows="2" runat="server" />
</td>
</tr>

I tried to check contactAddress to see if it was blank and then make
contactAddressHead and contactAddress not visible, which it does. But the
line between the rows above and below are now larger.

What I need to do is make the row (tr) not visible. I thought about using
<div>, but how do I handle that in my server script?

Is there a better way?

Thanks,

Tom


 
Reply With Quote
 
 
 
 
Marina
Guest
Posts: n/a
 
      01-31-2005
you would have to put a runat="server" on it, give it an ID. It should
become an HtmlGenericControl in the .vb. Then you should be able to make it
not visible.

"tshad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a page with many input variables and some are blank. I want to make
>the row "not visible" if the field is blank.
>
> For example:
>
> <tr>
> <td width="120" align="right" nowrap>
> <asp:Label id="contactAddressHead" Text="Address:" runat="server"/>
> </td>
> <td>
> <asp:Label id="contactAddress" TextMode="MultiLine" Columns="50"
> rows="2" runat="server" />
> </td>
> </tr>
>
> I tried to check contactAddress to see if it was blank and then make
> contactAddressHead and contactAddress not visible, which it does. But the
> line between the rows above and below are now larger.
>
> What I need to do is make the row (tr) not visible. I thought about using
> <div>, but how do I handle that in my server script?
>
> Is there a better way?
>
> Thanks,
>
> Tom
>



 
Reply With Quote
 
 
 
 
tshad
Guest
Posts: n/a
 
      01-31-2005
"Marina" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> you would have to put a runat="server" on it, give it an ID. It should
> become an HtmlGenericControl in the .vb. Then you should be able to make
> it not visible.


That was what I was looking for.

Thanks,

Tom
>
> "tshad" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>I have a page with many input variables and some are blank. I want to
>>make the row "not visible" if the field is blank.
>>
>> For example:
>>
>> <tr>
>> <td width="120" align="right" nowrap>
>> <asp:Label id="contactAddressHead" Text="Address:" runat="server"/>
>> </td>
>> <td>
>> <asp:Label id="contactAddress" TextMode="MultiLine" Columns="50"
>> rows="2" runat="server" />
>> </td>
>> </tr>
>>
>> I tried to check contactAddress to see if it was blank and then make
>> contactAddressHead and contactAddress not visible, which it does. But
>> the line between the rows above and below are now larger.
>>
>> What I need to do is make the row (tr) not visible. I thought about
>> using <div>, but how do I handle that in my server script?
>>
>> Is there a better way?
>>
>> Thanks,
>>
>> Tom
>>

>
>



 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      01-31-2005
More specifically you could add an ID and the runat attribute to your TR
tag. This way you'll be able to hanlde this tr (HtmlTableRow) and to set its
visible property to false...

Patrice

--

"tshad" <(E-Mail Removed)> a écrit dans le message de
news:O0i$(E-Mail Removed)...
> "Marina" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > you would have to put a runat="server" on it, give it an ID. It should
> > become an HtmlGenericControl in the .vb. Then you should be able to make
> > it not visible.

>
> That was what I was looking for.
>
> Thanks,
>
> Tom
> >
> > "tshad" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >>I have a page with many input variables and some are blank. I want to
> >>make the row "not visible" if the field is blank.
> >>
> >> For example:
> >>
> >> <tr>
> >> <td width="120" align="right" nowrap>
> >> <asp:Label id="contactAddressHead" Text="Address:"

runat="server"/>
> >> </td>
> >> <td>
> >> <asp:Label id="contactAddress" TextMode="MultiLine" Columns="50"
> >> rows="2" runat="server" />
> >> </td>
> >> </tr>
> >>
> >> I tried to check contactAddress to see if it was blank and then make
> >> contactAddressHead and contactAddress not visible, which it does. But
> >> the line between the rows above and below are now larger.
> >>
> >> What I need to do is make the row (tr) not visible. I thought about
> >> using <div>, but how do I handle that in my server script?
> >>
> >> Is there a better way?
> >>
> >> Thanks,
> >>
> >> Tom
> >>

> >
> >

>
>



 
Reply With Quote
 
tshad
Guest
Posts: n/a
 
      01-31-2005
"Patrice" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> More specifically you could add an ID and the runat attribute to your TR
> tag. This way you'll be able to hanlde this tr (HtmlTableRow) and to set
> its
> visible property to false...


I didn't know you could do that? There is a visibility attribute to TR?

Tom
>
> Patrice
>
> --
>
> "tshad" <(E-Mail Removed)> a écrit dans le message de
> news:O0i$(E-Mail Removed)...
>> "Marina" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > you would have to put a runat="server" on it, give it an ID. It should
>> > become an HtmlGenericControl in the .vb. Then you should be able to
>> > make
>> > it not visible.

>>
>> That was what I was looking for.
>>
>> Thanks,
>>
>> Tom
>> >
>> > "tshad" <(E-Mail Removed)> wrote in message
>> > news:(E-Mail Removed)...
>> >>I have a page with many input variables and some are blank. I want to
>> >>make the row "not visible" if the field is blank.
>> >>
>> >> For example:
>> >>
>> >> <tr>
>> >> <td width="120" align="right" nowrap>
>> >> <asp:Label id="contactAddressHead" Text="Address:"

> runat="server"/>
>> >> </td>
>> >> <td>
>> >> <asp:Label id="contactAddress" TextMode="MultiLine" Columns="50"
>> >> rows="2" runat="server" />
>> >> </td>
>> >> </tr>
>> >>
>> >> I tried to check contactAddress to see if it was blank and then make
>> >> contactAddressHead and contactAddress not visible, which it does. But
>> >> the line between the rows above and below are now larger.
>> >>
>> >> What I need to do is make the row (tr) not visible. I thought about
>> >> using <div>, but how do I handle that in my server script?
>> >>
>> >> Is there a better way?
>> >>
>> >> Thanks,
>> >>
>> >> Tom
>> >>
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide textbox / Make textbox not visible (NOT USING visible property) Jurjen de Groot ASP .Net Web Controls 0 05-19-2008 09:50 AM
Making HTML sections not visible nrivera.eng@gmail.com HTML 8 02-19-2008 09:22 PM
function-sections and data-sections option in gcc Raman C Programming 6 08-03-2007 10:40 AM
How to make a hyperlink Visible or not visible in DataList Patrick Olurotimi Ige ASP .Net 7 06-15-2005 12:01 PM
button visible/not visible tshad ASP .Net 6 10-28-2004 10:02 PM



Advertisments