Click here to Skip to main content
15,665,276 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have created one page having textbox,button and many more controls.
User can write text in textbox,I am calling javascript function on keyup of textbox.Javascript function count letter entered into textbox.If it is greater than 80,it check the checkbox.User is able to see checked checkbox.

Every thing is working fine.On button click event I am getting checkbox.checked = false if user has already seen checkbox is checked.So I have created javascript function which I call on button click event,in that function I am checking, checkbox is checked or not. if it is checked assigning 1 to hidden field if not zero.I know hidden field is client side management and it is at page level.

Now my question is if there 3 user,everybody is writing at same time,everybody will get value he/she set or diff?

What I have tried:

JavaScript
<script language="Javascript" type="text/javascript"> 

function CheckStatus()
{

if (document.getElementById('ChkMsg').checked == true)
{
document.getElementById('hiddenfieldIschk').value = '1';
}
else
{
document.getElementById('hiddenfieldIschk').value = '0';
}
}
</script>

<asp:Button ID="btn" runat="server" Onclientclilck="return CheckStatus();" onclick="btn_Click1" />
<input type="hidden" id ="hiddenfieldIschk"  runat="server" />
Posted
Updated 9-Jun-16 21:22pm
v2

1 solution

"everybody is writing at same time,everybody will get value he/she set or diff?"
Yes.
Each client is separate - you'd even get different results for three different tabs in the same browser window - and each client page has it's own Session. The results will be specific to each user.
 
Share this answer
 

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