How to Programmatically Set User And Group Permissions

Written By: Ivan Ivanov -- 10/5/2011 -- join -- contribute -- (0) comments -- printer friendly version

Rating: Rate --

Categories: Design, MOSS 2007, Permission Management, Programming and Customizations, Visual Studio, Web Parts, WSS3

< Prev - 1 | 2 | 3 | 4 | 5 | 6 | - Next > | Become a paid author

Now we are ready to start to create the web part for managers. In the Solutions explorer right-click on the project and select Add -> new item

Select Web part and name it WPHolidayEdit

Open WPHolidayEdit.cs.

Next we need to add controls to make a form. To achieve this we have to add labels, textboxes, dropdownlists and a button. For better visibility we will put these controls into a table. We have to declare controls and implement  the  method CreateChildControls, as shown below:

The next step is to write the GetItem method.

In this method we are going to get the request and populate data into the controls; In the OnPreRender method we populate dropdowns and call GetItem.

Next is to create the EditItem method and implement btnOK_click. The EditItem method saves the selected option in the ddAction dropdown.

< Prev - 1 | 2 | 3 | 4 | 5 | 6 | - Next >

Learn more about SharePoint

Sponsor Information

Copyright (c) 2010-2017 Edgewood Solutions, LLC All rights reserved
privacy | disclaimer | copyright | advertise | contribute | feedback | about
Some names and products listed are the registered trademarks of their respective owners. |