Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Yes, I know, another User Control Post

Status
Not open for further replies.

nhoellei

Programmer
Feb 1, 2002
13
US
I am encountering an issue where I have 1 aspx page, page_A and two user controls, control1 and control2. When control1 is loaded and the user clicks on a button, this fires an event that is delegated to page_A to load control2 and pass the data selected in control1 to conrol2 to use. I have this model working OK.

The issue I am running into is once in control2, and only in the initial load, if the user clicks on a check box, the OnClickChanged event is not captured and the page/control2 is reloaded. Once that happens, when I click on the checkbox, the OnClickChanged event is handled appropriatly.

I'm not sure where the eventhandler for the onclickchanged event is getting lost. When I turn on tracing I see the __EVENTTARGET as the Checkbox control for both the initial load and subsequent control2 loads.

Any insight on this would be appreciated.
 
How are you creating the eventhandler? And by that I mean is it a dynamic control that you are creating and using AddHandler to add the click handle or is it just a standard checkbox that you have dropped onto the page?

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
It's a standard checkbox, with the the eventhandler created via the IDE. The handler resides within the usercontrol.
 
In that case the only other potential issues I can think of is to do with what actions happen/dont happen based on whether the page is a postback or not.

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top