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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:13:49+00:00 2026-06-09T22:13:49+00:00

I had created a checkbox at the server during runtime, and populated it in

  • 0

I had created a checkbox at the server during runtime, and populated it in a table on the webpage, and I would like to make use of it to trigger some JavaScript to handle some functions in the client.

However, I’m not sure of how to trigger the function using a checkbox created in this manner.

I understand that I can trigger the function when I declare a checkbox in this syntax.

asp:CheckBox ID="Checkbox1" runat="server" Onclick="javascript:myfunction()"

However, this checkbox may or may not be required to be created on the webpage, and hence I’m unable to insert this hardcoded on the webpage

Is there any way which I can use to detect the status of this checkbox and trigger my JavaScript in the client? or if I can handle what I need to do at code_behind?

  • 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-09T22:13:51+00:00Added an answer on June 9, 2026 at 10:13 pm

    suppose that we are adding CheckBox to td of an table

    <table>
            <tr>
                <td id="td1" runat="server">
                </td>
            </tr>
    </table>
    

    and in the code behind,

    CheckBox chkbox = new CheckBox();
    chkbox.ID = "CheckBox1";
    chkbox.Attributes.Add("onclick", "click_Func(this);");
    td1.Controls.Add(chkbox);
    

    and javascript will be look like this ,

    <script type="text/javascript">
    function click_Func(chkbox) {
     alert(chkbox.id);
    }
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had created a Proxy Server (Fwd and Reverse) using Java sockets. which would
I had created one HTML page for my experiance. In this i had use
I was iterating through a table I had created and getting the first cell
I had created a webpage using asp.net mvc3 razor. I have two master pages
I had some nice eclipse run configurations I had created while working on a
I had created a select tag in html(SelectTest.html) with some values.What i'm trying to
I had created some sample webpages in php and i need to know how
i had created a custom checkbox cell and column just to display a text
I had created a new console application in VS 2010. I had written some
I had created one div window which is draggable,and created one child div (with

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.