locked
Can I get the page instance in a non-inherited class ? RRS feed

  • Question

  • User1694595804 posted
    Example: //reference any needed namespace using System; using System.Web; using System.Web.UI; namespace testspace { public class a { Public a () { \\ here I want to get the page (System.Web.UI.Page) instance. } } } Problem: Can I get the page instance in a non-inherited class ?
    Monday, March 22, 2004 5:51 AM

All replies

  • User1694595804 posted
    I've got it with a Microsoft MVP named saucer Page p = (Page)System.Web.HttpContext.Current.Handler;
    Tuesday, March 23, 2004 12:37 AM