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. Select One...

Select One...

Scheduled Pinned Locked Moved ASP.NET
questiondatabase
9 Posts 6 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.
  • S Offline
    S Offline
    Sarfaraj Ahmed
    wrote on last edited by
    #1

    Hellow Everybody ddlCategory (drop down list category) data is coming from database. I want to add Select One.. on the top of my ddlCategory then data will be come from database. How can I do it? Waiting For Your Reply

    Sarfarj Ahmed

    V J S 3 Replies Last reply
    0
    • S Sarfaraj Ahmed

      Hellow Everybody ddlCategory (drop down list category) data is coming from database. I want to add Select One.. on the top of my ddlCategory then data will be come from database. How can I do it? Waiting For Your Reply

      Sarfarj Ahmed

      V Offline
      V Offline
      varshavmane
      wrote on last edited by
      #2

      comboName.Items.Insert(0, New ListItem("Select", -1))

      M 1 Reply Last reply
      0
      • S Sarfaraj Ahmed

        Hellow Everybody ddlCategory (drop down list category) data is coming from database. I want to add Select One.. on the top of my ddlCategory then data will be come from database. How can I do it? Waiting For Your Reply

        Sarfarj Ahmed

        J Offline
        J Offline
        John ph
        wrote on last edited by
        #3

        Insert a new item to the list after doing a Databind of your Database Items. DropDownList1.Items.Insert(0, New ListItem("Text","Value")

        Regards
         - J O N -


        I S 2 Replies Last reply
        0
        • V varshavmane

          comboName.Items.Insert(0, New ListItem("Select", -1))

          M Offline
          M Offline
          M LN Rao
          wrote on last edited by
          #4

          SELECT LOCATION

          Intelligence is measured by common sense not by how many scholarly books you read.

          1 Reply Last reply
          0
          • S Sarfaraj Ahmed

            Hellow Everybody ddlCategory (drop down list category) data is coming from database. I want to add Select One.. on the top of my ddlCategory then data will be come from database. How can I do it? Waiting For Your Reply

            Sarfarj Ahmed

            S Offline
            S Offline
            squattyarun
            wrote on last edited by
            #5

            hi may be this will give you much clear Idea, try this.... DropDownList1.Items.Add(New ListItem("--Select-One--", "")) For iCount = 0 To dataTable.rows.Count - 1 DropDownList1.Items.Add(New ListItem(dt.row(i)(0).tostring(),"") Next It might contain some syntax errors as I am writing it without using IDE.:-D

            1 Reply Last reply
            0
            • J John ph

              Insert a new item to the list after doing a Databind of your Database Items. DropDownList1.Items.Insert(0, New ListItem("Text","Value")

              Regards
               - J O N -


              I Offline
              I Offline
              Imran Khan Pathan
              wrote on last edited by
              #6

              John Prabhu wrote:

              DropDownList1.Items.Insert(0, New ListItem("Text","Value")

              Missing closing tag ")".:)

              J 1 Reply Last reply
              0
              • I Imran Khan Pathan

                John Prabhu wrote:

                DropDownList1.Items.Insert(0, New ListItem("Text","Value")

                Missing closing tag ")".:)

                J Offline
                J Offline
                John ph
                wrote on last edited by
                #7

                oops... DropDownList1.Items.Insert(0, New ListItem("Text","Value"))

                Regards
                 - J O N -


                1 Reply Last reply
                0
                • J John ph

                  Insert a new item to the list after doing a Databind of your Database Items. DropDownList1.Items.Insert(0, New ListItem("Text","Value")

                  Regards
                   - J O N -


                  S Offline
                  S Offline
                  Sarfaraj Ahmed
                  wrote on last edited by
                  #8

                  Dear John Thanks Lot It does work and Im going to give you maximum point Thanks Again for Your Help

                  Sarfarj Ahmed

                  J 1 Reply Last reply
                  0
                  • S Sarfaraj Ahmed

                    Dear John Thanks Lot It does work and Im going to give you maximum point Thanks Again for Your Help

                    Sarfarj Ahmed

                    J Offline
                    J Offline
                    John ph
                    wrote on last edited by
                    #9

                    You're welcome

                    Regards
                     - J O N -


                    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