Need help with custom control....

P

peter

Hi,

I have a custom server control that I created. There is a button on
the control. When this button is clicked I need to popup a window
with a new page(newpage.aspx).

The new page needs to be a resource inside my custom control.

My question is:
Can I put an aspx page as a resource inside my custom control? If so,
then how do I extract the page and load it in a new browser window
dynamically at run time when a button is clicked on the custom server
control?
 
J

John Saunders

peter said:
Hi,

I have a custom server control that I created. There is a button on
the control. When this button is clicked I need to popup a window
with a new page(newpage.aspx).

The new page needs to be a resource inside my custom control.

My question is:
Can I put an aspx page as a resource inside my custom control? If so,
then how do I extract the page and load it in a new browser window
dynamically at run time when a button is clicked on the custom server
control?

During the installation of your control, you could copy the page out of the
control's assembly and copy it into the web application at an appropriate
URL. You would then pop up that URL.

I know of no way to get ASP.NET to treat arbitrary text strings as web
forms.
 
A

Andy Smith

Check out my free DialogWindow control set. If it does not directly fit your
needs, full source code is included, and I do what you describe below.

http://www.metabuilders.com/tools/DialogWindow.aspx

The solution for opening windows is javascript. The solution for embedding
pages in asemblies involves having your own IHttpHandler.
__
Andy Smith
Chief Code Monkey
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top