Hi there, This is a known issue of the VS 2003 as it sometimes resets the generated code in code-behind, and as a result of that your sample code could be removed also. In VS 2005, this thing does not happen since VS 2005 uses the inline code as default model to register the event handler. So in your case, there are a couple of ways which you may consider using to register the event handler: + Place your code in the Page_Init event, not in the generated code area. + Use the in-line code model, it means you can declare the event handler in the control declaration in the web page .aspx