Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9055061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:51:05+00:00 2026-06-16T13:51:05+00:00

I am facing issue in Gridview Check box checked and server side checkbox is

  • 0

I am facing issue in Gridview Check box checked and server side checkbox is showing checked = false.

Its really strange and I haven’t seen yet before.

I have written following code.

<script type="text/javascript">
        function SelectAll() {
            if ($('.SelectAll input:checkbox').attr("checked"))
                $('.chkTechs input:checkbox').attr("checked", true);
            else
                $('.chkTechs input:checkbox').attr("checked", false);
        }
        function SetCheckBoxes(item) {
            //$(item).attr("target").checked    // this is to find which element clicked
            if ($('.chkTechs input:checkbox').filter(":not(:checked)").length > 0) {
                $('.SelectAll input:checkbox').attr("checked", false)
            }
            else {
                $('.SelectAll input:checkbox').attr("checked", true)
            }

        }
    </script>

Server side Button Click

foreach (GridViewRow row in gvList.Rows)
            {
                CheckBox Checked = (CheckBox)row.FindControl("chkSelect");
                bool isChecked = ((CheckBox)row.FindControl("chkSelect")).Checked;
            }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T13:51:07+00:00Added an answer on June 16, 2026 at 1:51 pm

    The state of server controls is maintained in viewstate and changing the state of control like you are changing the checked status of checkbox with client script (javascript) is not updated in viewstate. So when you access the control on server side you do not get the changes. You have to store the changes in some hidden field and use that hidden field on server side to update your controls. It is the way asp.net implements the viewstate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing issue in binding the gridview when one of the tag in
I am facing issue with showing AlertDialog when I switch from one activity to
I am facing issue of the WCF Services on staging server. The same service
I am facing strange issue with our WCF service. The same code was working
I'm facing a crazy issue with in localhost vs production server. Basically the issue
I am facing issue in updating a primefaces dialog box Currently I am displaying
I am facing a strange issue with my project ... when page is rendering
I am facing strange issue on Windows CE: Running 3 EXEs 1)First exe doing
we are facing a strange issue. we have a (custom)file upload control in our
I am facing issue while i load a form on ajax request. i followed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.