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. Panel Enabled on checking checkbox

Panel Enabled on checking checkbox

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-net
7 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.
  • H Offline
    H Offline
    haleemasher
    wrote on last edited by
    #1

    want to create a Panel in ASP.NET ) with a check box as a header that disables all contained controls when unchecked. How do i so???

    A 1 Reply Last reply
    0
    • H haleemasher

      want to create a Panel in ASP.NET ) with a check box as a header that disables all contained controls when unchecked. How do i so???

      A Offline
      A Offline
      Arun Jacob
      wrote on last edited by
      #2

      You can do it either by server side code or client side code.If you want to do it in server side use OnCheckedChanged event of checkbox. :)

      Arun Jacob http://codepronet.blogspot.com/

      H 1 Reply Last reply
      0
      • A Arun Jacob

        You can do it either by server side code or client side code.If you want to do it in server side use OnCheckedChanged event of checkbox. :)

        Arun Jacob http://codepronet.blogspot.com/

        H Offline
        H Offline
        haleemasher
        wrote on last edited by
        #3

        I want to work on client side.

        A 1 Reply Last reply
        0
        • H haleemasher

          I want to work on client side.

          A Offline
          A Offline
          Arun Jacob
          wrote on last edited by
          #4

          Add onclick attribute to checkbox and disable controls in the onclick event. something like,

          chkName.Attributes.Add("onclick", "return DisableControls();");

          :)

          Arun Jacob http://codepronet.blogspot.com/

          H 1 Reply Last reply
          0
          • A Arun Jacob

            Add onclick attribute to checkbox and disable controls in the onclick event. something like,

            chkName.Attributes.Add("onclick", "return DisableControls();");

            :)

            Arun Jacob http://codepronet.blogspot.com/

            H Offline
            H Offline
            haleemasher
            wrote on last edited by
            #5

            i can't find click event for a check box plz send me the code for onchange event

            A 1 Reply Last reply
            0
            • H haleemasher

              i can't find click event for a check box plz send me the code for onchange event

              A Offline
              A Offline
              Arun Jacob
              wrote on last edited by
              #6

              In the page load event do like this,

                  if (!IsPostBack)
                  {
                      chkSelect.Attributes.Add("onclick", "Check();");           
                  }
              

              and in html do like this,

                 <script type="text/javascript">
                   function Check() 
                   {
                      //write your code for Disabling controls	
                   }		
              </script>
              

              haleemasher wrote:

              plz send me the code

              Another thing is if somebody is giving you an idea then plz just try it out first by using online resources or MSDN help and if you feel any difficulties then we'll help if we know that. Anyway happy to help you. :-D

              Arun Jacob http://codepronet.blogspot.com/

              A 1 Reply Last reply
              0
              • A Arun Jacob

                In the page load event do like this,

                    if (!IsPostBack)
                    {
                        chkSelect.Attributes.Add("onclick", "Check();");           
                    }
                

                and in html do like this,

                   <script type="text/javascript">
                     function Check() 
                     {
                        //write your code for Disabling controls	
                     }		
                </script>
                

                haleemasher wrote:

                plz send me the code

                Another thing is if somebody is giving you an idea then plz just try it out first by using online resources or MSDN help and if you feel any difficulties then we'll help if we know that. Anyway happy to help you. :-D

                Arun Jacob http://codepronet.blogspot.com/

                A Offline
                A Offline
                Abhijit Jana
                wrote on last edited by
                #7

                :thumbsup:

                Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

                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