Creating a popup *custom* control

D

Don Huan

Hi

How can I create a popup custom control so it can be compiled as a dll?
I think of a "MessageViewer" Custom control that opens a new browser
window with some dynamic loaded text. I want to enable other developers
just to use code like
<ctrl:MessageViewer runat=server></ctrl:MessageViewer>

My idea is to register JS-code "window.open('')..." in the Render()
method of my MessageViewer Control. Now I need to create a dinamic
aspx-page inside of a custom control that shows some text, so I can
reference it inside of JS-code like "window.open('dinamicaly_created_aspx')"

Did somebody has similar problems? Is there any better/alternative
solutions (links)? What is your advice?

Don
 
D

Don Huan

Thank you, that's a very similar to my thoughts..

I think I've found a right way to my req.:
I needed to load a dinamically created page in a popup window, so I
open a new window with

window.open('', 'newWin', '.....'); //no URL!

and push HTML contents right from the parent window like

newWin.document.writeln('<b>Message</b>');

What do you think?

Don
 
S

Steve C. Orr [MVP, MCSD]

Yes, that technique works reasonably well unless the user wants to print the
message, which could be problematic.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top