Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Can I load an stand alone aspx page in another stand alone aspx page using System.Reflection?

I am using the ASP.NET 2.0 Web site project model.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
94 views
Welcome To Ask or Share your Answers For Others

1 Answer

Try using BuildManager.CreateInstanceFromVirtualPath. Sample usage:

Page p = BuildManager.CreateInstanceFromVirtualPath("~/Default.aspx", typeof(Page))

This answers this specific question, although, based on your comments, I'm not sure that this is what you really want.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...