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
neteleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nauman_ahmedCommented:
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.
0
tusharashahCommented:
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
0
neteleAuthor Commented:
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...

0
tusharashahCommented:
Hello netele,

double click on your SignOut button on your WebUserControl and check out that it's pointing to the correct event.

Or paste your code of SignOut.

-tushar
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.