Re: reference to system.web.ui.page



HttpContext.CurrentHandler is the page (must be cast)

-- bruce (sqlwork.com)

param@xxxxxxxxxxxxxxxx wrote:
Hi all,

I have a .cs code file in the App_Code directory. Now how do I get a reference to the System.Web.UI.Page object? I can get references to Request, Response and Server through HttpContext.Current, but dont know how to get Page.

TIA!


.



Relevant Pages

  • Re: Anders Hejlsberg comment on immutable objects
    ... >>explicit interface implementation exists is so an interface name can ... I wouldn't cast to an ... > variable as a sort of implicit reference, ... readonly const MyStruct myInstance. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Replies to Upcasting vs downcasting.
    ... I take this example to be a conversion cast, although I can see how it ... could be considered a downcast. ... and "widening conversion" to encompass both reference conversions and non-reference conversions. ... Java always requires a cast for a narrowing conversion. ...
    (comp.lang.java.programmer)
  • Re: Anders Hejlsberg comment on immutable objects
    ... >>explicit interface implementation exists is so an interface name can ... I wouldn't cast to an ... >>Improper conversion sounds like a good description, ... > variable as a sort of implicit reference, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: EventArgs and derived classes
    ... given the lack of support for overriding the base class behaviors. ... MyListViewSubItem mysubitem = e.SubItem as MyListViewSubItem; ... throw an exception if the original reference cannot be validly cast to the target type. ... the result will simply be a null reference if the cast is invalid. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Multiple Inheritance with Interfaces
    ... I cast one to the Interface it compiled, ... it compiles ok only because the java compiler does not ... It is very hard for a compiler to determine what to do in this case, because a carefully timed thread could plant a String into mumble between line 1 and line 2, allowing line 2 to execute without error. ... but with reference expression treated as being capable of referencing ...
    (comp.lang.java.programmer)

Loading