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. checkbox problem

checkbox problem

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelptutorialquestion
8 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.
  • D Offline
    D Offline
    Dhyanga
    wrote on last edited by
    #1

    hi, i tried to use check box in asp.net. well when i run the program, i checked the checkbox but when it process, it is taking checkbox as unchecked. Why this happens ? How to avoid this ?

    suchita

    S R E R R 5 Replies Last reply
    0
    • D Dhyanga

      hi, i tried to use check box in asp.net. well when i run the program, i checked the checkbox but when it process, it is taking checkbox as unchecked. Why this happens ? How to avoid this ?

      suchita

      S Offline
      S Offline
      Sandeep Mewara
      wrote on last edited by
      #2

      You are surely doing something wrong. Have a look here with lots of sample examples: CheckBox Class[^]

      1 Reply Last reply
      0
      • D Dhyanga

        hi, i tried to use check box in asp.net. well when i run the program, i checked the checkbox but when it process, it is taking checkbox as unchecked. Why this happens ? How to avoid this ?

        suchita

        R Offline
        R Offline
        raju melveetilpurayil
        wrote on last edited by
        #3

        SayamiSuchi wrote:

        well when i run the program, i checked the checkbox but when it process, it is taking checkbox as unchecked.

        I can't understand what you post. Explain little more clearly.

        1 Reply Last reply
        0
        • D Dhyanga

          hi, i tried to use check box in asp.net. well when i run the program, i checked the checkbox but when it process, it is taking checkbox as unchecked. Why this happens ? How to avoid this ?

          suchita

          E Offline
          E Offline
          Ennis Ray Lynch Jr
          wrote on last edited by
          #4

          Are you assigning the value of the checkbox outside of an if(!IsPostBack) statement? If so your view state value is being wiped. If you are using DataBinding, make sure your DataBind call is wrapped inside of an if(!IsPostBack) as well.

          Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

          D 1 Reply Last reply
          0
          • E Ennis Ray Lynch Jr

            Are you assigning the value of the checkbox outside of an if(!IsPostBack) statement? If so your view state value is being wiped. If you are using DataBinding, make sure your DataBind call is wrapped inside of an if(!IsPostBack) as well.

            Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

            D Offline
            D Offline
            Dhyanga
            wrote on last edited by
            #5

            i am using that in the button click event.. will if(!IsPostback) be used in that event ?

            suchita

            1 Reply Last reply
            0
            • D Dhyanga

              hi, i tried to use check box in asp.net. well when i run the program, i checked the checkbox but when it process, it is taking checkbox as unchecked. Why this happens ? How to avoid this ?

              suchita

              R Offline
              R Offline
              richardqiaolixin
              wrote on last edited by
              #6

              is the checkbox's enableViewState false?

              1 Reply Last reply
              0
              • D Dhyanga

                hi, i tried to use check box in asp.net. well when i run the program, i checked the checkbox but when it process, it is taking checkbox as unchecked. Why this happens ? How to avoid this ?

                suchita

                R Offline
                R Offline
                Rajendra Prasad Panchati
                wrote on last edited by
                #7

                Hi Suchita, Please ensure that to put IsPostback condition in page load event.when u call button click event, it'll be postback to the same page and page load then button click events fires. so check it and keep the condition.

                Rajendra Prasad Panchati .Net/Sharepoint Software Engineer. Hyderabad.

                D 1 Reply Last reply
                0
                • R Rajendra Prasad Panchati

                  Hi Suchita, Please ensure that to put IsPostback condition in page load event.when u call button click event, it'll be postback to the same page and page load then button click events fires. so check it and keep the condition.

                  Rajendra Prasad Panchati .Net/Sharepoint Software Engineer. Hyderabad.

                  D Offline
                  D Offline
                  Dhyanga
                  wrote on last edited by
                  #8

                  thanks all so much..it worked now..

                  suchita

                  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