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

  • SEARCH
  • Home
  • 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 7403351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:03:15+00:00 2026-05-29T05:03:15+00:00

i am using asp.net for my web application when i click on checkbox inside

  • 0

i am using asp.net for my web application when i click on checkbox inside gridview and after that i check its value on button click it does not show me the exact value
here is asp code

<asp:GridView ID="dgvMenu" runat="server" Width="100%" CssClass="grid" GridLines="None"
                                                AutoGenerateColumns="False">
                                                <Columns>

                                                    <asp:TemplateField>
                                                        <HeaderTemplate>
                                                            View
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="View" runat="server" Checked="<%#Bind('View') %>" />
                                                        </ItemTemplate>
                                                        <ItemStyle Width="50px" HorizontalAlign="Center" />
                                                    </asp:TemplateField>


                                                    <asp:BoundField DataField="Menu" HeaderText="Menu Name">
                                                        <HeaderStyle HorizontalAlign="Left" CssClass="firstcol" />
                                                        <ItemStyle CssClass="firstcol" />
                                                    </asp:BoundField>
                                                </Columns>
                                            </asp:GridView>

and here is its vb version to get its value on button click version

For Each item As GridViewRow In dgvMenu.Rows
            Dim MenuName As String = item.Cells.Item(1).Text
            Dim chkView As CheckBox = DirectCast(item.FindControl("View"), CheckBox)
        Next

i want to check its value whether its checked or unchecked so that i can process its value

  • 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-05-29T05:03:27+00:00Added an answer on May 29, 2026 at 5:03 am

    I assume that your binding your GridView even on postbacks. You should only bind it if not PageIsPostback.

    Put this into Page_Load:

    Private Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            ' following function loads data and binds it to the GridView '
            BindGrid()
        End If
    End Sub
    

    If you DataBind the Grid on every postback, ViewState cannot be reloaded, hence all changed values are lost and events will not be triggered correctly.

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

Sidebar

Related Questions

I am building a web application using ASP.NET MVC that has two very distinct
I am using ASP.NET MVC3 for my web application. To display a button in
We have created a web application, using ASP.NET, that allows users to upload documents
I have a asp.net(c#) web application in that i am using Tabbed interface to
I have a web application using ASP.NET 2.0 and I want to know if
I am building a Web Application using asp.net (C#). I come from windows forms
I'm developing a web application using ASP .NET MVC 1.0 and jQuery (including the
I'm am building my asp.net web application using MVC (Preview 5), and am also
I have an asp.net web application written in C# using a SQL Server 2008
I maintain a legacy ASP.Net Web application (using .Net 2.0 + SQL Server 2005

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.