protected void lblContactName_PreRender(object sender, EventArgs e) { Label lblContactName = (Label)sender; lblContactName.Text = System.Threading.Thread.CurrentPrincipal.Identity.Name; string CurrentUserName = lblContactName.Text; SYNCDataContext dc = new SYNCDataContext(); string a = dc.Connection.ConnectionString; string tempRoleName = System.Web.Security.Roles.GetRolesForUser(CurrentUserName).FirstOrDefault(); SYNC.aspnet_Roles aRole = dc.aspnet_Roles.FirstOrDefault(p => p.RoleName.Equals(tempRoleName)); if (aRole != null) { lblContactName.ToolTip = aRole.Description; lblContactName.Text = lblContactName.Text + "(" + aRole.Description + ")"; } }
partial void Deleteaspnet_Roles(aspnet_Roles instance);
partial void Updateaspnet_Roles(aspnet_Roles instance);
partial void Insertaspnet_Roles(aspnet_Roles instance);