Chase Florell
Chase Florell

Reputation: 47377

Access Page Header from within a Class

Does anyone know how to access a Page Header (Me.Page.Header) from within a class?

I'm working in ASP.NET

Upvotes: 1

Views: 236

Answers (1)

Shawn Steward
Shawn Steward

Reputation: 6825

Just off the top of my head, try HttpContext.Current.Page.Header.

EDIT:
This should do the trick:

Dim p As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page)
'p.Header.Whatever

Upvotes: 2

Related Questions