Load a Page into a table cell ?

  • Thread starter Thread starter Craig Kenisston
  • Start date Start date
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,
 
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,
 
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.
 
Back
Top