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. Dropdown SelectedIndex

Dropdown SelectedIndex

Scheduled Pinned Locked Moved ASP.NET
comquestion
5 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.
  • M Offline
    M Offline
    Muhammad Waqas Butt
    wrote on last edited by
    #1

    Hi, I have a dropdown which shows products name(DataText) and product code(Datavalue). Now i wanted to select first value and its value in textbox on page load?

    |Muhamad Waqas Butt| waqasb4all@yahoo.com www.sktech.freewebspace.com

    N 1 Reply Last reply
    0
    • M Muhammad Waqas Butt

      Hi, I have a dropdown which shows products name(DataText) and product code(Datavalue). Now i wanted to select first value and its value in textbox on page load?

      |Muhamad Waqas Butt| waqasb4all@yahoo.com www.sktech.freewebspace.com

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      | Muhammad Waqas Butt | wrote:

      Now i wanted to select first value and its value in textbox on page load?

      :confused: Do you want to select the value in dropdownlist that is entered in textbox ?


      My Website | Ask smart questions

      M 1 Reply Last reply
      0
      • N N a v a n e e t h

        | Muhammad Waqas Butt | wrote:

        Now i wanted to select first value and its value in textbox on page load?

        :confused: Do you want to select the value in dropdownlist that is entered in textbox ?


        My Website | Ask smart questions

        M Offline
        M Offline
        Muhammad Waqas Butt
        wrote on last edited by
        #3

        Hi, first of all, sorry for confusion. I have find the solution. Thx. Now can you tell me how i hide/show Submit(asp control not html control) button through javascript. I have tried this code but it gave me a error: document.Form1.btnsubmit.style.visibility = 'hidden'; Error: document.Form1.btnsubmit.style. is null or not a object. But i have tried the same code of textbox(asp control) it working. Any help?

        |Muhamad Waqas Butt| waqasb4all@yahoo.com www.sktech.freewebspace.com

        N N 2 Replies Last reply
        0
        • M Muhammad Waqas Butt

          Hi, first of all, sorry for confusion. I have find the solution. Thx. Now can you tell me how i hide/show Submit(asp control not html control) button through javascript. I have tried this code but it gave me a error: document.Form1.btnsubmit.style.visibility = 'hidden'; Error: document.Form1.btnsubmit.style. is null or not a object. But i have tried the same code of textbox(asp control) it working. Any help?

          |Muhamad Waqas Butt| waqasb4all@yahoo.com www.sktech.freewebspace.com

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          | Muhammad Waqas Butt | wrote:

          document.Form1.btnsubmit.style.visibility = 'hidden';

          Try

          document.getElementById("btnsubmit").style.visibility = "hidden";


          My Website | Ask smart questions

          1 Reply Last reply
          0
          • M Muhammad Waqas Butt

            Hi, first of all, sorry for confusion. I have find the solution. Thx. Now can you tell me how i hide/show Submit(asp control not html control) button through javascript. I have tried this code but it gave me a error: document.Form1.btnsubmit.style.visibility = 'hidden'; Error: document.Form1.btnsubmit.style. is null or not a object. But i have tried the same code of textbox(asp control) it working. Any help?

            |Muhamad Waqas Butt| waqasb4all@yahoo.com www.sktech.freewebspace.com

            N Offline
            N Offline
            Nick cheng liu
            wrote on last edited by
            #5

            you can do it like: //hide document.getElementById("TextBox1").style.display = "none"; //show document.getElementById("TextBox1").style.display = "block";

            /**--------------------**/ I am learning english.I am still having a few problem, but I getting better. I am very glad if you point my mistake in english. TIA.

            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