niros Posted June 30, 2004 Posted June 30, 2004 Hi, when I am using the asp:CheckBox control and I try to catch the CheckedChanged event it doesn't catch it. when I write something in it adding a break point and debuging it it never gets there. some one have an idea? thanks. Quote
Administrators PlausiblyDamp Posted June 30, 2004 Administrators Posted June 30, 2004 You will only get the event on a page postback, either put a button on the form as well or set the checkbox's AutoPostBack property to true. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
niros Posted June 30, 2004 Author Posted June 30, 2004 You will only get the event on a page postback' date=' either put a button on the form as well or set the checkbox's AutoPostBack property to true.[/quote'] Thanks it worked. what the autopost back is actually doing? Quote
Administrators PlausiblyDamp Posted June 30, 2004 Administrators Posted June 30, 2004 Using ASP the code behind the control events only runs on the server not the client browser (if you need to handle things at the client level then a client side script would need to be written - normally in javascript). For the server side code to run the page needs to be submitted to the server, the server code runs and then a new page is sent down to the browser - this is a post back. Post backs can be expensive in terms of bandwith and time (especially if the client has a slow connection) and should be kept to a minimum, so by default only buttons cause this client->server->client round trip to occur. Auto postback just causes this to happen for controls other than buttons. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.