How do I make a pop up page call in asp.net C#?

  • Thread starter Thread starter Charles
  • Start date Start date
C

Charles

Hello,
I have a very full .aspx page in c# that I need to use
another aspx page as a pop ups to help me populate?
Response.redirect doesn't work what does?
Also, I need to get the answer from the pop up page back
to the first page.

Charles
 
My favorite way to do what you're trying to accomplish is to create web
controls (ascx pages in C#) and then plug them in where I need them. since
they are loaded into the main page, the postback is done to that page as
well, so with a little work you can make 1 page serve many functions. It
doesn't require Iframes or pop-ups or anything. you want a window over
another display, place everything into panels, and disable the panels that
should not have focus, and enable the one that should. This may not be
exactly what you're looking for, but I like doing it this way personally
since 1. I have come to loath pop-ups, 2. pup-up filters don't filter this
out because its sent to the client as DHTML, and 3. with a bit of effort the
results are very clean.

all it takes to create an instance of your object pretty much is
//
protected MyNameSpace.MyControl rdh;

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
rdh = (MyNameSpace.MyControl ) Page.LoadControl("MyControl.ascx");

then you can call any methods you have exposed though it, and insert it into
a panel or a placeholder, and you're done. this is the exact copy of my home
page setup (minus the real names and the fact that I have 6 controls that I
create to do various things) Another benefit is that you can reuse the code
in other pages or if you want to give your customers a chance to customize
appearance/location of certain panels its easy.

I hope my "totally different than what you asked for" answer helped you
some???

Ray
 
Hi Charles,

To open a new page, you may use some client script like "window.open(...)".
This will open a new IE window. To submit result to parent page, you may
set the form's action to your parent webform in the child form.

Hope this help,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top