Interview Questions administrator

Best SharePoint administrator Interview Questions and Answers with topic wise:

Recycle Bin | MMS | ManagedVsCrawledProperties |

Wednesday, August 29, 2012

Adding/Removing users to/from the group:

Note: We have to check before adding/removing users to/from the group and also check the users already exists or not in group. 
public void AddDeleteUsersInGroup(User user)
            string GroupName = string.Empty;
            if (user.IsAdmin.HasValue && user.IsAdmin.Value)
                GroupName = "Group Owners";
            else if (user.IsApprover.HasValue && user.IsApprover.Value)
                GroupName = " Group Members";
                GroupName = " Group Visitors";

                using (SPSite site = new SPSite(SPContext.Current.Web.Url))
                    using (SPWeb web = site.OpenWeb())
                            web.AllowUnsafeUpdates = true;
                            SPUser spUser = web.EnsureUser(user.UserName);
                            if (spUser != null)
                                SPGroup spGroup = spGatingGroup(web, GroupName);
                                if (spGroup != null && (IsUserInSPGroup(spUser, GroupName.Trim())))
                                   //For adding user to the group
                                   //For removing user to the group
                        catch (Exception ex)
                            throw ex;
                            web.AllowUnsafeUpdates = false;

Sunday, August 5, 2012

SharePoint Interview Questions and Answers: WebPart

  1. Webparts in SharePoint?
  2. Difference between .webparts and .dwp?
  3. Difference between webparts and SharePoint webparts?
  4. Webpart life cycle?
  5. Difference web parts visual web parts and traditional web part?
  6. Webpart maintenance page?
  7. Main webpart base classes?
  8. A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe.”
  9. How to ensure user controls (.ascx) in webpart. I mean in which method the user controls defines?
  10. Out of box web parts in SharePoint?
  11. Add Web Part inside a Master Page in SharePoint 2010?
  12. Migrate webparts that are developed in SharePoint 2007 into SharePoint 2010?
  13. Difference between user control and webpart?
  14. Connectable webparts in SharePoint?
  15. I have created one webpart and added that in a page. Because of that webpart I am not able to open my page. So I want to delete that webpart from the page. How can I delete it?
  16. Can visual webparts have more than one user controls?
  17.  Webpart deployment life cycle?
  18.  How to define custom properties  at the normal webpart and visual webpart?
  19. How to handle the visibility level of custom properties based on permission levels?
  20.  How can we do validation at the client side in wp, VWP? 
  21.  Is CQWP can fetech data across site collection means from another site collection level?
Web Parts are reusable components that display content on Web pages in SharePoint 2010.

A fantastic new feature in SharePoint 2010 is that you can insert a Web Part in the text of one of the Rich Text Editor zone available in the new Wiki Page. (To add, remove, or rearrange the text zones, use the "Text Layout" menu in edit mode)