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 7965459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:09:44+00:00 2026-06-04T06:09:44+00:00

I am using a Checkbox outside of a datagrid. When i select the check

  • 0

I am using a Checkbox outside of a datagrid. When i select the check box autopostback is true, and this would then show the image, but i cant access the images within the datagrid with that script. If i use a seperate image outside of the datagrid the script works. How can i get this script to work finding when the checkbox out side of the datagrid is checked to then show the image within the datagrid?

The script i am using is

<script runat="server">

    Sub Check(sender As Object, e As EventArgs)
        If checkShowImages.Checked Then
                img.Visible = True

        Else
            img.Visible = False
        End If
    End Sub

</script>
  • 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-04T06:09:46+00:00Added an answer on June 4, 2026 at 6:09 am

    Try this(Assuming your checkbox‘s id is “CheckBox1” & DataGrid‘s Id is “Datagrid1”)…

    Sub Check(sender As Object, e As EventArgs)
        For Each r As DataGridItem In Datagrid1.Items
            Try
                r.FindControl("img").Visible = CheckBox1.Checked
            Catch ex As Exception
    
            End Try
        Next
    end sub  
    

    Hope this helps. Good luck.

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

Sidebar

Related Questions

can anybody show me how to build a string using checkbox. what would be
How to remove using jquery html table row after checking checkbox that in this
When I select the in the gridview using checkbox, I want it to insert
I have to copy the text from one text box to another using checkbox
I am using checkbox in the gridview header to select all records in the
I'm using checkbox to select the rows in the gridview. How do I insert
I am using Html.CheckBox() . The resulting HTML is: <input id=IsMultiGraph name=IsMultiGraph value=true type=checkbox>
Can i check if any checkbox using the same class is selected? If yes
So which should I use to select elements? I'm using checkbox as just an
How can I preserve the states of checkbox using session? I tried the following

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.