Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Table Question

Table Question

Scheduled Pinned Locked Moved ASP.NET
javascripthtmlquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nlindley7
    wrote on last edited by
    #1

    I was wondering if its possible to set the visibility element of an HTML table, using the aspx.vb file. I know you cant set the ID and call it like that. Just wondering if there is any good way to do this (preferably without JS). What i'm doing is setting certain tables to be visible based on who logs in. Thanks, Nate Lindley

    R T 2 Replies Last reply
    0
    • N nlindley7

      I was wondering if its possible to set the visibility element of an HTML table, using the aspx.vb file. I know you cant set the ID and call it like that. Just wondering if there is any good way to do this (preferably without JS). What i'm doing is setting certain tables to be visible based on who logs in. Thanks, Nate Lindley

      R Offline
      R Offline
      rashadaliarshad
      wrote on last edited by
      #2

      yes, it is easy to achieve but what you have to do is to built the table (add rows and colums) dynamically at runtime in the table... e.g in code-behind file (default.vb) use if condition=true then //add code to create table with 3 rows and 5 colums elseif condition2 =true then // add code to create table with 2 rows and 2 colums elseif condition3 = true then and so on......hope it helps Note: at Design time you should just place the Table control on the place where it needs to drawn at runtime... then handle, height, width, and etc attributes programtically in code behind file

      :- Rashid Ali -:

      N 1 Reply Last reply
      0
      • N nlindley7

        I was wondering if its possible to set the visibility element of an HTML table, using the aspx.vb file. I know you cant set the ID and call it like that. Just wondering if there is any good way to do this (preferably without JS). What i'm doing is setting certain tables to be visible based on who logs in. Thanks, Nate Lindley

        T Offline
        T Offline
        ToddHileHoffer
        wrote on last edited by
        #3

        Of course. objHTMLTbl.Visible = false

        I didn't get any requirements for the signature

        N 1 Reply Last reply
        0
        • T ToddHileHoffer

          Of course. objHTMLTbl.Visible = false

          I didn't get any requirements for the signature

          N Offline
          N Offline
          nlindley7
          wrote on last edited by
          #4

          Hey Todd, Thanks for the answer. But, it is an HTML table, thus not having a Visible attribute (has visibility) and as far as I know you cant set the attributes of an HTML table by using the ID (that would def be the easiest way tho). Thanks, Nate Lindley

          1 Reply Last reply
          0
          • R rashadaliarshad

            yes, it is easy to achieve but what you have to do is to built the table (add rows and colums) dynamically at runtime in the table... e.g in code-behind file (default.vb) use if condition=true then //add code to create table with 3 rows and 5 colums elseif condition2 =true then // add code to create table with 2 rows and 2 colums elseif condition3 = true then and so on......hope it helps Note: at Design time you should just place the Table control on the place where it needs to drawn at runtime... then handle, height, width, and etc attributes programtically in code behind file

            :- Rashid Ali -:

            N Offline
            N Offline
            nlindley7
            wrote on last edited by
            #5

            Hey Rashad, Yea I could do that to create a data table, but I just want an HTML table. Basically the situation is that I'm going to have a page with 5 tables on it (one on top of the other). Each table has multiple rows (one for each PDF for that state), and I want to set the Visibility attribute (style) of each one. Thanks, Nate

            R 1 Reply Last reply
            0
            • N nlindley7

              Hey Rashad, Yea I could do that to create a data table, but I just want an HTML table. Basically the situation is that I'm going to have a page with 5 tables on it (one on top of the other). Each table has multiple rows (one for each PDF for that state), and I want to set the Visibility attribute (style) of each one. Thanks, Nate

              R Offline
              R Offline
              rashadaliarshad
              wrote on last edited by
              #6

              i think u can achieve the same task using Server Table Control, why you want to use html table only?

              :- Rashid Ali -:

              N 1 Reply Last reply
              0
              • R rashadaliarshad

                i think u can achieve the same task using Server Table Control, why you want to use html table only?

                :- Rashid Ali -:

                N Offline
                N Offline
                nlindley7
                wrote on last edited by
                #7

                Thanks for the quick responses rashad! Basically these tables are just one column tables with multiple rows that contain links to PDF files. I know I could just use one table and set the links for that table, but I'd rather have 5 separate tables and have their Visibility properties changed based on the login. Thanks, Nate

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups