Link to home
Start Free TrialLog in
Avatar of netele
netele

asked on

Handle event from Web Custom Control on the Web Form

Hi,

I have a Web Custom Control that has a Logout button. I would like to include this Web Custom Control on every page of my app. Now,

1) If I include all the code that's in the control on a web form everything works fine
2) If I move all the code from the web form to the Web Custom Control and include this control on the web form when I click on Logout nothing happens.

What am I missing?

Thanks
Avatar of nauman_ahmed
nauman_ahmed
Flag of United States of America image

Please look at the following topic:

Title: Handling User Control Events
URL: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconhandlingpageletevents.asp

Best, Nauman.
Avatar of tusharashah
tusharashah

There shouldn't be any problem in 2. Check out that the events are attached and getting fired properly.

Also, why are you using Web Custom Control? you should try to use Web User Control instead.

-tushar
Avatar of netele

ASKER

Thanks for the replies. I am using a Web User Control... sorry, got the names confused.

I just can't understand why it isn't working...

ASKER CERTIFIED SOLUTION
Avatar of tusharashah
tusharashah

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial