1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Firing in containers of User.aspx

Firing in containers of User.aspx

4 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    05 Mar 2009
    Link to this post

    Hi,

    I'm extending the user profile adding some items like Adress, phone and others. I searching to expose based on role. If use is in Role, the item profile are exposed in this page to add changes or modify (Administation/Users/. To make this i need to firing in the containers of manageUser like this sample and make some postback to refrech my items when the user is added to one new role. Could you help me to firing in the manageUser container and generate the event to refresh. 

      THIS       Control container = manageUsers.GetCurrentContainer();  
      OR THAT    Telerik.Security.WebControls.ManageUsers.ListContainer container = manageUsers.GetCurrentContainer();  
              
            if (!Telerik.Security.UserManager.IsCurrentUserInRole("Administrators", "Sitefinity"))  
            {  
                  
                HtmlGenericControl lblabonPromotor = container.FindControl("lblabonPromotor") as HtmlGenericControl;  
                OR
                FieldLabel lblabonPromotor = container.GetControl<FieldLabel>("lblabonPromotor", true, Telerik.Framework.Web.TraverseMethod.BreadthFirst); 
    or like make in Profil page
      Telerik.Security.WebControls.ManageProfile.BasicContainer container = manageProfile.GetCurrentContainer();  
             
            if (!Telerik.Security.UserManager.IsCurrentUserInRole("MyRole", "Sitefinity") )  
            {  
                //Promotor  
                FieldLabel lblabonPromotor = container.GetControl<FieldLabel>("lblabonPromotor", true, Telerik.Framework.Web.TraverseMethod.BreadthFirst);   
                if (lblabonPromotor != null)  
                    lblabonPromotor.Visible = false;  
     
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    09 Mar 2009
    Link to this post
    Hi Pierre,

    Could you please check if you have:
    • AutoEventWireup="true"
    in the page directives?

    All the best,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    09 Mar 2009
    Link to this post
    Hi,

    The pages have this directive. The problem seems to be firing container of User.aspx.

    This is not firing :
    Control container = manageUsers.GetCurrentContainer(); 
     HtmlGenericControl lblabonPromotor = container.FindControl("lblabonPromotor") as HtmlGenericControl;

    That Not existing is this page User.aspx
     FieldLabel lblabonPromotor = container.GetControl<FieldLabel>("lblabonPromotor", true, Telerik.Framework.Web.TraverseMethod.BreadthFirst); 
     
    How to call the contianers and fire in this User.aspx page?.
    Thanks.
  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    12 Mar 2009
    Link to this post
    Hi Pierre,

    We will move the discussion in the support thread which you have about the same issue.

    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
4 posts, 0 answered