I have declared a namespace in Feed.aspx.cs . This namespace contains a class and this class contains a method: Feed.aspx.cs
namespace GetUser { public class MyFeedClass { public string getUserID() { MembershipUser user = Membership.GetUser(HttpContext.Current.User.Identity.Name); HttpContext.Current.Session["x"] = user.ProviderUserKey.ToString(); string test = (string)HttpContext.Current.Session["x"]; return test; } } }
Now, from MyPage.aspx.cs, I'd like to call the getUserID() method. How can I do that?