Using context and server.transfer on a destination page by 2 source pages

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am wondering if I have a single destination page, and 2 or more source
pages, is there a way to tell which type of class is currently in the
context.Handler?

So if i am on the destination page, I can check the context to see whethere
it is page1Source or page2Source, and process differently accordingly. In
order to convert the context.handler, I need to know which source page it
references.

I didn't see any intellisense for a getType for the context.handler. I don't
know if its possible either.

thanks
 
Since ASP.NET pages are classes that extend System.Web.UI.Page, which
implements IHttpHandler, it's available via the Handler property of the
current HttpContext:


Dim myWebPage As Page = HttpContext.Current.Handler

Response.Write(myWebPage.GetType.ToString)

Luke

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/security_bulletins/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026."
 
Back
Top