471,354 Members | 2,215 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

HttpContext.Current.User.Identity.Name AND Context.User.Identity.Name;

what's the difference between

HttpContext.Current.User.Identity.Name;
and
Context.User.Identity.Name;

thanks!

Nov 19 '05 #1
2 3807
None.

One is used when coding inline; the other when coding in code-behind.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"nalbayo" <so**********@gmail.com> wrote in message
news:OE**************@tk2msftngp13.phx.gbl...
what's the difference between

HttpContext.Current.User.Identity.Name;
and
Context.User.Identity.Name;

thanks!

Nov 19 '05 #2
HttpContext.Current is a static method that return the current http context

Context is an instance method defined in the page class that returns the
current http context (it really just calls the above function).

-- bruce (sqlwork.com)

"nalbayo" <so**********@gmail.com> wrote in message
news:OE**************@tk2msftngp13.phx.gbl...
what's the difference between

HttpContext.Current.User.Identity.Name;
and
Context.User.Identity.Name;

thanks!

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Victor Jones | last post: by
2 posts views Thread by Abraham Andres Luna | last post: by
reply views Thread by Aaron Morton | last post: by
reply views Thread by =?Utf-8?B?QW50b25pbyBPJydOZWFs?= | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.