Reference: This is from http://aspnet.4guysfromrolla.com/articles/110106-1.aspx
[Browsable (true)]
public string Value
{
get
{
MembershipUser currentUser;
currentUser = Membership.GetUser();
if (currentUser == null)
return string.Empty;
return currentUser.ProviderUserKey.ToString();
}
}
Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.
Tuesday, December 23, 2008
Use a CustomControl to Set UserId and Use as a DataBindable Property
Use a CustomControl (named MembershipUser) to Set UserId and Use as a DataBindable Property. Create a MembershipUser CustomControl that has a property named Value that can be DataBound. For example MembershipUser1.Value would fetch the userId:
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2008
(54)
-
▼
December
(16)
- Add Google Charts with .NET
- Get the ApplicationName for Stored Procedure Param...
- Get the Current Time for Database Storage
- The Difference Between NVARCHAR and VARCHAR
- Accessing ConnectionString from CodeBehind
- Use ConnectionString Web.config
- Keeping a DropDownList's DataSource Updated
- Use a CustomControl to Set UserId and Use as a Dat...
- Be Careful About uniqueId Parameter in Stored Proc...
- Modifying DataBound Hyperlinks Text
- Remove HTML Tags
- Using AutoComplete Ajax Control With Separate ID F...
- Using LIKE in SQL
- Sorting a GridView
- Using static strings and objects to increase perfo...
- Use securitytrimming to limit role views of Menu a...
-
▼
December
(16)
No comments:
Post a Comment