TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Cresen
NA
6
0
Object reference not set to an instance of an object.
Jun 20 2010 11:00 PM
I badly need help for this C# code:
MembershipUser CurrentUser = Membership.GetUser(User.Identity.Name);
String varUserName = (String)CurrentUser.ProviderUserKey;
When I hit the F5 key, I got this error: "Object reference not set to an instance of an object." which is pointing to the 2nd line of the above code.
My goal is to assign to a variable the current user logged-in in the ASP.Net page..
Thanks soo... much in advance.
Reply
Answers (
3
)
How to download file From My website
How to set the Expire Period of dot net dll/assembly