.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Prevent contributor from adding or deleting web part

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :SharePoint
In SPD, there is a Site Contributor Settings, you can set permissions on web part in the 'Sharepoint' category. On the web site, how to prevent contributor from editing web part? Thanks

View Complete Post

More Related Resource Links

Adding Client-Side Confirmation When Deleting

The JavaScript confirm(string) function displays its string input parameter as the text inside a modal dialog box that comes equipped with two buttons - OK and Cancel (see Figure 1). The confirm(string) function returns a Boolean value depending on what button is clicked (true, if the user clicks OK, and false if they click Cancel).

Foundations: Adding Code Access Security to WCF, Part 2


This month's column continues the discussion around code access security in WCF and partially trusted services.

Juval Lowy

MSDN Magazine July 2008

How do I prevent displaying membership of an AD group in Colleague Tracker web part?


I'm a big fan of the Colleague Tracker web part in MOSS 2007 My Sites, especially the option to show 'Membership Changes'. This is often useful in highlighting that a colleague has been added to a certain AD group.

We now want to hide the membership of certain AD groups from the colleague tracker. For example, if an AD group called 'Project X' is created, we don't want membership of the group broadcast throughout the My Sites where colleagues are tracking colleagues.

My first thought was that we could use AD to 'deny read' on the 'Project X' AD group to all SharePoint related service accounts. This does not appear to have worked, although perhaps the configuration is more complex? The best approach would seem to be to prevent the group membership data ever being imported from AD to the SSP, hence my 'deny read' approach.

Has anyone successfully implemented this, or does anyone have any better ideas?


Adding a list item that populates a particular part of a page

I am trying to create a list view in sharepoint designer that when you enter a list value it populates the right part of the page. Background - I am creating a list for a marketing newsletter that when you fill out the list form it will populate the marketing newsletter on page. its to save recreating it every month. the list has drop downs for addition and department and the data is inserted on the page. thanksSharepoint Customiser

Adding a web part to "My Content" page causes error

Under a "My Content" personal page, a user (me) chose to add the "SQL Server Reporting Services Report Viewer" web part to a page. This was repeated with a test account and the same thing happened. Is there a way to fix this? Prior to this, adding a Content Editor Web Part seemed to work just fine.

Programmatically adding Calendar web part with summary view or custom view?

Within my feature I am adding a calendar web part to page.  I would like to specify the summary view (not the full graphic calendar view).  Is this possible? Is it possible to create a custom view and set the listviewwebpart to this custom view through code?   thx -davedave

Adding logic to the Search Core Results web part - Manipulation in code or XSL?

Hi,I need to manipulate the search core results web part, so that:- It will display a check box for each result- It Will have an additional button. When clicking on this button the checked results should be copied to a grid view.Do you have any idea how it can be done?I am not sure what is the correct way to do it – in the client side via the XSL Editor or in the server side with the C# code.Thank you so much for your help,Regards,SP beginner.

Prevent mousedown raise in disabled part of control which is outside control boundary



I have a control that is located onto a window in my example. that control contains something that is shown, but the user may not be able to click onto the area (here red colored) to select it. Only by clicking on the black part should select the control.
I disabled the red part, but still the mousedown is fired in the control. I would expect that the mousedown would be raised in the background of the window and not in the control.
Event when the Red part is made transparent, the event is fired inside the control (BUG???)

Is there a way to prevent that when the red part is clicked, the control raises the mousedown.
I simplified the example.

<Window x:Class="MainWindow"
    Title="MainWindow" Height="350" Width="525" MouseDown="Background_MouseDown">
  <Grid  HorizontalAlignment="Left" VerticalAlignment="Top" >
    <Canvas MouseDown="Control_mouseDown" Width="100" Height="100" HorizontalAlignment="Left" VerticalAlignment="Top"  Background="Black" >

Problem seeing all Web Part Categories When Adding a Web Part

I have a development page that a one of my users is currently working on.  When he tries to add a web part to the page, the only web part category that he can see is the "Lists and Libraries" category.  When I go in, I see every category.  I have set him as an owner of the site, but that still has not given him access to see the other web parts.  I am convinced that this is a permissions issue, but I don't know what permission set he seems to be missing.  Anyone have any ideas?

Data View Web Part, update to Data Source / adding new list to existing data source


Hi all,

I have four Lists with identical columns :

List 1
List 2
List 3
List 4

I had to merge them, hence i created a data source ( Linked Source ) and merged these lists in SPD. I have used a data view webpart to display some columns from the merged lists data source and everything was working fine.

But now i have a new List : List 5 which also has the same columns like the other four lists and i need to update the data soure such that it is merged list of 5 lists not 4.

i updated the datasource property of the linked source to merge this new list as well. However the contents of List 5 dont appear in the data view webpart. 

Am i missing something here ? 

I dont want recreate the data view web part from scratch eachtime , because in future there might be List 6 , List 7 as well ... 

Performing two events(saving and deleting item) on button click in javascript in a dataview web part


Hello guys,

I have a requirement like...I have a dvwp, in that I have comments field as text box. So that when ever user tries to delete the item, he enters comments and deletes it.It will send an notification with information and gets deleted.

So I have to do this by javascript. Do you guys have any idea?

Adding a second (unique) Note Board web part to a single Web Page?



I was asked by a user if she could add a second Note Board web part to a single web page. It seems - and I just want to confirm - that the answer is no.

Adding a second note board web part results in a second note board being added, but pulling the same content as the 1st part - replicating the 1st, rather than creating a unique second.

In that way, the Note Board web part seems tied very closely to the page (since I can't find its related list or other information elsewhere through GUI).

But, perhaps there's a way, on a single page, to tell the page to distinguish between two different note board web parts and their respective content/lists?



Getting error while adding field to data viewer web part


I have custom EditItemForm for a custom list having over 100 columns. That EditItemForm contains a DataFormWebPart in edit mode having over 100 <SharePoint:FormField controls.


If I browse for the above page in internet explorer, I got got the generic error:


"Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.

Can we specify ChromeType Property of a web part when adding in SharePoint Designer 2010

Is it possible that with all other properties, we can specify ChromeType Property of a web part while adding it on the page using SharePoint Designer 2010? If yes, any example / syntax?

Adding a DWP web part file as feature in VS2010


Hi All,

I have added a dwp file as feature in MOSS 2007 using WSP Builder plenty of times, however, in VS2010, I have tried doing this but cannot achieve it. How would I add a DWP web part file as a feature in VS2010. I tried creating a TEMPLATE->FEATURES folder in VS2010 and added elements.xml, feature.xml and dwp file but cant add it. I am using the SharePoint 2010 template that comes with VS2010.



How To Prevent Someone From Adding SQL Injection To ASP.Net form


I have an ASP.Net form where people can add a customer testimonial. I found out that it's not secure because people can add sql injection in some of the form fields. I would like help with making it secure. I would like to convert any ' to ". Can someone please help me with this? You can find my code for inserting data to database below. The bolded fields are the ones that I need to add the code preventing ' from being added. For example, I don't want something like 'Update table' to be added.  I would like to add code to convert any ' to " that people may submit.


strInsert = "Insert CustomerTestimonials (Name, Location, EmailAddress, Testimonial, DateSigned, AdvertiserID ) Values ( @Name, @Location, @EmailAddress, @Testimonial, @DateSigned, @AdvertiserID )"
             cmdInsert = New System.Data.SqlClient.SQLCommand( strInsert, objConnect)
             cmdInsert.Parameters.Add( "@Name", iif(txtName.Text="",dbNull.value,txtName.text))
             cmdInsert.Parameters.Add( "@Location", iif(txtLocation.Text="",dbNull.value,txtLocation.text))

How to prevent Sharepoint 2007 from adding Custom XML to Office 2007 documents


When I upload an Office 2007 document to Sharepoint, its metadata is modified. Here is what I found:

Original file:


filename - docProps/app.xml

filename - docProps/core.xml

filename - xl/worksheets/sheet1.xml

filename - xl/styles.xml

filename - xl/sharedStrings.xml

filename - xl/worksheets/sheet3.xml

filename - xl/worksheets/sheet2.xml

filename - xl/theme/theme1.xml

filename - xl/workbook.xml

filename - xl/_rels/workbook.xml.rels

filename - _rels/.rels

filename - [Content_Types].xml

mimetype - application/zip


File in Sharepoint:



filename - customXml/_rels/item3.xml.rels

filename - docProps/custom.xml

filename - customXml/itemProps3.xml

filename - customXml/item3.xml

filename - customXml/_rels/item2.xml.rels

filename - customXml/itemProps1.xml

filename - customXml/item2.xml

filename - customXml/itemProps2.xml

filename - customXml/_rels/item1.xml.rels

filename - customXml/item1.xml

filename - docProps/app.xml

filename - docProps/core.xml

filename - xl/worksheets/sheet1.xml

filename - xl/styles.xml

filename - xl/sharedStrings.xml

filename - xl/worksheets/sheet3.xml

filename - xl/worksheets/sheet2.xml

filename - xl/theme/theme1.xml

filename - xl/workbook.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend