Author: schuminator | Posted on: 2/5/2008 9:44:42 PM | Views : 1023

Hi, for some reason the above method isn't quite working for me and I can't figure out why.
I'm doing:

(URL)domain.com/user.aspx?UserID=097-970237-zd9083-34
In Page_Load
string userID = Request.QueryString["UserID"];
lblUserName.Text = Membership.GetUser(userID).UserName;
When I load the page I receive the 'object reference not set to an instance of an object' but I know for a fact that the userID is correct.

I assume it doesn't work because the method argument calls for 'object providerUserKey' and all I'm supplying is a string userID variable, but, if that's the case, I can't work out how to convert the string userID into a System.Guid.
Have I missed something really simple?
Any help is greatly appreciated

...

Go to the complete details ...