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. ListBox Default Value Help Required

ListBox Default Value Help Required

Scheduled Pinned Locked Moved ASP.NET
questionhelp
6 Posts 2 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.
  • B Offline
    B Offline
    Brendan Vogt
    wrote on last edited by
    #1

    I have the following listbox defintion, that bring back a list of my roles. Examples would be: Role1 Member Role 3 Role 4 Role 5 Here is my code: How do I have the Member been selected/highlighted as default? I hope someone can help. Regards, ma se

    M 1 Reply Last reply
    0
    • B Brendan Vogt

      I have the following listbox defintion, that bring back a list of my roles. Examples would be: Role1 Member Role 3 Role 4 Role 5 Here is my code: How do I have the Member been selected/highlighted as default? I hope someone can help. Regards, ma se

      M Offline
      M Offline
      Manoj Tillu
      wrote on last edited by
      #2

      There is one property in listbox "selected" set this property to true "selected=true" for the value which u want as default Happy Programming Manoj Tillu

      B 1 Reply Last reply
      0
      • M Manoj Tillu

        There is one property in listbox "selected" set this property to true "selected=true" for the value which u want as default Happy Programming Manoj Tillu

        B Offline
        B Offline
        Brendan Vogt
        wrote on last edited by
        #3

        Can this be done in the .aspx code? If it goes to the code behind, then I might just as well do the whole databind there as well.

        M 1 Reply Last reply
        0
        • B Brendan Vogt

          Can this be done in the .aspx code? If it goes to the code behind, then I might just as well do the whole databind there as well.

          M Offline
          M Offline
          Manoj Tillu
          wrote on last edited by
          #4

          yes Happy Programming Manoj Tillu

          B 1 Reply Last reply
          0
          • M Manoj Tillu

            yes Happy Programming Manoj Tillu

            B Offline
            B Offline
            Brendan Vogt
            wrote on last edited by
            #5

            Please go back to my original message, when I meant if this can be done in the .aspx code, I meant in this this code part: If so can you please help me to do so?

            M 1 Reply Last reply
            0
            • B Brendan Vogt

              Please go back to my original message, when I meant if this can be done in the .aspx code, I meant in this this code part: If so can you please help me to do so?

              M Offline
              M Offline
              Manoj Tillu
              wrote on last edited by
              #6

              If u r populating listbox from database then u cant not do it from aspx, but if ur listitems are fixed and its there in ur aspx page u can specify it in that listitems. Happy Programming Manoj Tillu

              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