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. Disable combo

Disable combo

Scheduled Pinned Locked Moved ASP.NET
question
4 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
    mehrdadc48
    wrote on last edited by
    #1

    Hi everybody, I need to disable a ComboBox after clicking a button. I set the Enabled property to false at Click Event of button, but it didn't work (because it needs a postBack) I want to do this after clicking the button and doing sth (if succeed), so I can't do it in Page_Load. What should I do?

    Best wishes

    M S 2 Replies Last reply
    0
    • M mehrdadc48

      Hi everybody, I need to disable a ComboBox after clicking a button. I set the Enabled property to false at Click Event of button, but it didn't work (because it needs a postBack) I want to do this after clicking the button and doing sth (if succeed), so I can't do it in Page_Load. What should I do?

      Best wishes

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #2

      mehrdadc48 wrote:

      What should I do?

      Do it at the client side using Java script.

      Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

      M 1 Reply Last reply
      0
      • M Manas Bhardwaj

        mehrdadc48 wrote:

        What should I do?

        Do it at the client side using Java script.

        Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

        M Offline
        M Offline
        mehrdadc48
        wrote on last edited by
        #3

        How can I deal with standard DropDownList in javascript (in client event of another control. not itself)?

        Best wishes

        1 Reply Last reply
        0
        • M mehrdadc48

          Hi everybody, I need to disable a ComboBox after clicking a button. I set the Enabled property to false at Click Event of button, but it didn't work (because it needs a postBack) I want to do this after clicking the button and doing sth (if succeed), so I can't do it in Page_Load. What should I do?

          Best wishes

          S Offline
          S Offline
          satigar123
          wrote on last edited by
          #4

          use javascript /// write this script function in Body or form tag function setcomboDisable() { document.getElementById('comboid').disabled="disabled" return false; } ///in page_load event buttonid1.Attributes.Add("onclick","if(setcomboDisable()==false){ return false;}else { return true;}"); okay i hope it will work :)

          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