Dynamically created page communicating with other pages

S

Stephen Adam

Hi there,

I want to write a function which will dynamicly create a page - this page
will be a popup page and will convey input back to the page which created
it. Is possible and how should I go about it? Below is the beginings of the
function to create the page, am I barking up the right tree?

private Page CreateDownloadPopupPage()

{

Page aspxDownloadPopupPage;

aspxDownloadPopupPage = new Page();



// Add Header

aspxDownloadPopupPage.Controls.AddAt( 0, new LiteralControl( @"

<html>

<head>

<title> Add Download </title>

</head>

<body>

") );


//Add Form And Contents

HtmlForm frmDownloadPopup = new HtmlForm();

Button btnCancel = new Button();

Button btnOk = new Button();

btnCancel.Text = "Cancel";

btnOk.Text = "Ok";

btnOk.Click += new EventHandler(btnOk_Click);

btnCancel.Click +=new EventHandler(btnCancel_Click);

HtmlInputFile flPopupDownload = new HtmlInputFile();


frmDownloadPopup.Controls.Add(flPopupDownload);

frmDownloadPopup.Controls.Add(btnCancel);

frmDownloadPopup.Controls.Add(btnOk);

aspxDownloadPopupPage.Controls.Add( frmDownloadPopup );

aspxDownloadPopupPage.Controls.Add( new LiteralControl( @"

</body>

</html>

"));



return aspxDownloadPopupPage;

}
 

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,013
Latest member
KatriceSwa

Latest Threads

Top