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. Disabling the Image Button

Disabling the Image Button

Scheduled Pinned Locked Moved ASP.NET
question
10 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.
  • R Offline
    R Offline
    Rajiya
    wrote on last edited by
    #1

    Hi, I want to disablethe image button in certain cases. But i am not able to find any enabled event corressponding toit. How can i do it? Please helpis needed. Riz

    B S H I V 5 Replies Last reply
    0
    • R Rajiya

      Hi, I want to disablethe image button in certain cases. But i am not able to find any enabled event corressponding toit. How can i do it? Please helpis needed. Riz

      B Offline
      B Offline
      badgrs
      wrote on last edited by
      #2

      Set its Enabled property to false?

      1 Reply Last reply
      0
      • R Rajiya

        Hi, I want to disablethe image button in certain cases. But i am not able to find any enabled event corressponding toit. How can i do it? Please helpis needed. Riz

        S Offline
        S Offline
        Sandeep Akhare
        wrote on last edited by
        #3

        After which event you want to disable the Image button Write this after that ImageButton1.Visible = false; or add a placeHolder put imagebutton in it and make Visible false of that placeholder

        Thanks and Regards Sandeep If you want something you never had, do something you have never done!

        R 1 Reply Last reply
        0
        • R Rajiya

          Hi, I want to disablethe image button in certain cases. But i am not able to find any enabled event corressponding toit. How can i do it? Please helpis needed. Riz

          H Offline
          H Offline
          Haissam
          wrote on last edited by
          #4

          You could try javascript document.getElementById('<%=ImageButton1.ClientID%>').disabled = true; Where imageButton1 is the id of your image button HC Best Regards, Haissam Abdul Malak My Blog

          1 Reply Last reply
          0
          • S Sandeep Akhare

            After which event you want to disable the Image button Write this after that ImageButton1.Visible = false; or add a placeHolder put imagebutton in it and make Visible false of that placeholder

            Thanks and Regards Sandeep If you want something you never had, do something you have never done!

            R Offline
            R Offline
            Rajiya
            wrote on last edited by
            #5

            Actually i wanted to disable the image and by mistake i said image button. dou knw how to do it? Riz

            S 1 Reply Last reply
            0
            • R Rajiya

              Actually i wanted to disable the image and by mistake i said image button. dou knw how to do it? Riz

              S Offline
              S Offline
              Sandeep Akhare
              wrote on last edited by
              #6

              But where are you Populating the Image On which control you are showing the image

              Thanks and Regards Sandeep If you want something you never had, do something you have never done!

              R 1 Reply Last reply
              0
              • S Sandeep Akhare

                But where are you Populating the Image On which control you are showing the image

                Thanks and Regards Sandeep If you want something you never had, do something you have never done!

                R Offline
                R Offline
                Rajiya
                wrote on last edited by
                #7

                On A href of the image i am opening a new popup calendar. In sum cases i dont want the image to disabled so that the popup window is not opened. Riz

                S 1 Reply Last reply
                0
                • R Rajiya

                  On A href of the image i am opening a new popup calendar. In sum cases i dont want the image to disabled so that the popup window is not opened. Riz

                  S Offline
                  S Offline
                  Sandeep Akhare
                  wrote on last edited by
                  #8

                  OK Use asp:PlaceHolder in the page OK put the link in between the placeholder Only what you have to do is disable that placeholder whenever you want ok

                  Thanks and Regards Sandeep If you want something you never had, do something you have never done!

                  1 Reply Last reply
                  0
                  • R Rajiya

                    Hi, I want to disablethe image button in certain cases. But i am not able to find any enabled event corressponding toit. How can i do it? Please helpis needed. Riz

                    I Offline
                    I Offline
                    Irshad Sulaimani
                    wrote on last edited by
                    #9

                    You can do it by first casting it into Webcontrol, then setting the enabled property as false. e.g. ((WebControl)(imgButton1)).enabled = false ; njoy...:)

                    1 Reply Last reply
                    0
                    • R Rajiya

                      Hi, I want to disablethe image button in certain cases. But i am not able to find any enabled event corressponding toit. How can i do it? Please helpis needed. Riz

                      V Offline
                      V Offline
                      Vasudevan Deepak Kumar
                      wrote on last edited by
                      #10

                      Apply a style display:none;

                      Vasudevan Deepak Kumar Personal Homepage Tech Gossips

                      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