Load a Page into a table cell ?

C

Craig Kenisston

Is this possible ?

I have a code that does this :

if ((Request.IsAuthenticated == false))
{
LeftPane.Controls.Add(Page.LoadControl("~/_AccessControl.ascx"));
LeftPane.Visible = true;
}

This loads the accesscontrol usercontrol into a cell named "LeftPane".


But now I want to use the same approach to load an "*.aspx" page into
another cell.
The code tells me the error "User control source files must have a .ascx
file extension", so, the same method doesn't work with an aspx file, just
with controls.

How can I do a similar thing but with a page ?

if that not possible, I'll thank any other usefull advise on achieve similar
results.



Regards,
 
C

Craig Kenisston

Thanks for your response. I'll investigate on that iFrame.

I've just looked in google groups and found some other similar questions.
Basically I read that developers are usually recluctant to fill the
application with UserControls, but I don't understand exactly what is the
negative effect on that ... Could you explain ?


Regards,
 
C

Chad Z. Hower aka Kudzu

Craig Kenisston said:
I've just looked in google groups and found some other similar questions.
Basically I read that developers are usually recluctant to fill the
application with UserControls, but I don't understand exactly what is the
negative effect on that ... Could you explain ?

I think its because of the design time limitations of user controls. Drove us
crazy when making ASP.net demos too.
 

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,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top