tags:

views:

59

answers:

2

I have done this the other way many times as it makes sense (the page knows about the control as it has been added to the page and can handle the 'child' event)

Is it possible to do it the other way? I think not as the control doesn't know what page it is going to be on

The reason i ask this is that I have a modal popup on the page to ask users to login, and it is only when the user has logged in that I want my user control to go away and execute some code but I am not too sure how to tell the control this has happend?

A: 

I am not sure I understand.

As I see it, you are spinning up a modal page in Internet Explorer when a user has not logged in. On the back end, this is handled through a user control, but since you cannot spin up a user control in a browswer without having it on a page, the entire modal dialog is a page and a control.

If so, your real issue is handling shutting down a modal popup, which can be handled via JavaScript.

What I would do to figure out the exact mechanism is create a test project and write the basic "event handling" for JavaScript in this test project. Once you have the basic "click this button and the 'modal' shuts down", you will know what you have to emit in your .NET code.

Since the control has to communicate through something, you can kill the page even if the "control" is not aware.

Is this clicking, or am I missing something?

Gregory A Beamer
A: 

Total Friday afternoon 'my mind is fried' question, all i needed to do was have a public sub on the user control that the page could call once the login was complete!

I vote to close on account of my stupidity

Dean