vik1987:Is there any way when I select the check Box, it update the total value but Page should not be post Back.
That means i want to select the corresponding value at the time of Check Box Click.
Hi vik1987,
Please refer the following code snippet:
<script
type="text/javascript">
<!--
///////////////////////////////////////////////////////////////////
//
var containerId = '<%= CheckBoxList1.ClientID %>';
//
iterateListControl(containerId);
///////////////////////////////////////////////////////////////////
function
iterateListControl(containerId)
{
var containerRef =
document.getElementById(containerId);
var inputRefArray =
containerRef.getElementsByTagName('input');
for (var i=0; i<inputRefArray.length; i++)
{
var inputRef =
inputRefArray[i];
if ( inputRef.type.substr(0, 8) == 'checkbox' )
{
if (
inputRef.checked == true )
alert('#' + i + ' (' + inputRef.id + ') is
checked');
}
}
}
// -->
</script>
And see the original link: http://forums.asp.net/p/985229/1268269.aspx
Let me know if I have misunderstood what you mean. Thanks.
Hope it helps,
Hong Gang
Sincerely,
Hong-Gang Chen
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
Answer” if a marked post does not actually answer your question.