.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Why so many PageContexts ?

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :ASP.Net
 

What's the difference between these (except that it makes more mess):

    HttpContext.Current
    WebPages.WebPageContext.Current
    Me.Context
    Me.PageContext
    Me.PageContext.Current
    Me.PageContext.Current.Current

'Me == this in C#

They are initialized at different stages of page processing, but I feel, that all point to the same Context object.

For example in "_StartPage" WebPages.WebPageContext.Current does not exist, but I can use Request method from HttpContext.Current.

Which PageContext is better to use?




View Complete Post


More Related Resource Links

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend