Click here to Skip to main content
14,879,491 members
Please Sign up or sign in to vote.
2.23/5 (4 votes)
i have a checkbox list and a html table with runat=" server" in my aspx page,i want add rows dynamically when an item in checkbox list is clicked i want do this with javascript in .aspx.cs file help me thank u
_Amy 31-Jul-14 11:26am
So? What have you tried so far? Where do you stuck? Where is your code?
Google is your friend. Use it. If you stuck at any place then you can ask us.
Who voted 5 for this answer?
Member 10924493 1-Aug-14 0:16am
hi,im new to javascript,i dont have idea about javascript,till now im used C# only,i tried solution for my problem in C#,but CheckboxList is loading everytime after a selection,so i want to do it in JAVASCRIPT thank you

[no name] 31-Jul-14 8:28am
Member 10924493 1-Aug-14 0:18am
hi Venu thanks for reply,can i write this in .aspx.cs or where can i write and how?
[no name] 1-Aug-14 0:21am
Have you read that article? In that itself , author has described those are javascript functions, You need to do it in client side.
Member 10924493 1-Aug-14 2:24am
But i confused where can i call the javascript function in .aspx.cs file and how?
[no name] 1-Aug-14 2:34am
Try The following in your checkbox click event. you can call any javascript function like this

Page.ClientScript.RegisterStartupScript(this.GetType(), "msg","Javascriptfunctionnamehere();", true);
Member 10924493 1-Aug-14 2:52am
the cell text should be text of the checkbox,but im not able to access it in my javascript function before declaring the checkboxlist

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900