Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Posted
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?

  • Administrators
Posted

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.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...