Hi Team, i have aspx page with code behind in c#,the page has checkbox list which gets pulled dynamically(not static checkbox list), now my concern is once i do the check/uncheck of checkboxes and if i left mouse button then callback is happening which is not required i have verified the code base and there is no activation of callback event from code, check box unselect/selection is fine but if you click left mouse button on any part of the aspx page callback is happening which i dont want to happen.
i do not want to raise callback event if i do mouse click on the form, i tried different options to prevent but could not succeed, can some one guide on this
Thanks
msr
Loading
Sunny SharmaPosted Jul 1, 2013, 5:55 AM
Can you show me your code that is generating the checkboxes dynamically? It will be much of help to help you.
srPosted Jul 1, 2013, 5:29 AM
Posted Jul 1, 2013, 4:55 AM
It looks like, it will disable the click event on the document side.
Hi SR,
When you creating the new controls, it should be possible to disable the click event.
Please let me know, how you're adding the controls dynamically?
Sunny SharmaPosted Jul 1, 2013, 3:59 AM
srPosted Jul 1, 2013, 3:46 AM
Sunny SharmaPosted Jul 1, 2013, 3:23 AM
how about preventing click propagation on document. If you're using jquery in your aspx page, use this script:
$(document).ready(function(){
document.onclick=function(e){e.preventDefault();};
}
Hope it helps.
Cheers!
srPosted Jul 1, 2013, 3:06 AM
Posted Jul 1, 2013, 2:55 AM