Sections visible and not visible

Discussion in 'ASP .Net' started by tshad, Jan 31, 2005.

  1. tshad

    tshad Guest

    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
    tshad, Jan 31, 2005
    #1
    1. Advertising

  2. tshad

    Marina Guest

    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" <> wrote in message
    news:...
    >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
    >
    Marina, Jan 31, 2005
    #2
    1. Advertising

  3. tshad

    tshad Guest

    "Marina" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    >>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
    >>

    >
    >
    tshad, Jan 31, 2005
    #3
  4. tshad

    Patrice Guest

    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" <> a écrit dans le message de
    news:O0i$...
    > "Marina" <> wrote in message
    > news:...
    > > 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" <> wrote in message
    > > news:...
    > >>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
    > >>

    > >
    > >

    >
    >
    Patrice, Jan 31, 2005
    #4
  5. tshad

    tshad Guest

    "Patrice" <> wrote in message
    news:%...
    > 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" <> a écrit dans le message de
    > news:O0i$...
    >> "Marina" <> wrote in message
    >> news:...
    >> > 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" <> wrote in message
    >> > news:...
    >> >>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
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
    tshad, Jan 31, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad

    button visible/not visible

    tshad, Oct 26, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    4,444
    Brian Hoops
    Oct 28, 2004
  2. Patrick Olurotimi Ige
    Replies:
    7
    Views:
    5,962
    Patrick Olurotimi Ige
    Jun 15, 2005
  3. Raman
    Replies:
    6
    Views:
    4,716
    santosh
    Aug 3, 2007
  4. Replies:
    8
    Views:
    1,658
    Neredbojias
    Feb 19, 2008
  5. Jurjen de Groot
    Replies:
    0
    Views:
    300
    Jurjen de Groot
    May 19, 2008
Loading...

Share This Page