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


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> SharePoint >> Post New Question Subscribe to Interview Questions


If I wanted to not allow people to delete documents from a document library, how would I go about it?

Posted By :Sasi Prabhu     Posted Date :October 31, 2011    Points :40   Category :SharePoint 


You would on the ItemDeleting event set: properties.Cancel= true.


You can also find related Interview Question to If I wanted to not allow people to delete documents from a document library, how would I go about it?  below: 

If I wanted to restrict the deletion of the documents from a document library, how would I go about it?

  

Ans. You would create a event receiver for that list/library and implement the ItemDeleting method. Simply, set: properties.Cancel= true and display a friendly message using Properties.Message("How can u delete this... Its not your stuff!"); (More...)

What is a document library in SharePoint?

  
A document library in SharePoint is where you upload your main or core documents. Document Library is consist of a row and column view with links to the documents, When the document is updated and so is the link is created on your site. You can also track metadata of your documents. Meta data in SharePoint is consisting of document properties. (More...)

What is the difference between a document library and a form library in SharePoint?

  
Document libraries in SharePoint consist of your main/core documents. For example a word document, excel, PowerPoint, Visio, pdf, csv, notepad etc. Form libraries consist of XML forms. (More...)

What is the difference between a document library and a form library?

  
Document libraries consist of your core documents. An example would be a word document,excel, Powerpoint, visio, pdf, etc. Form libraries consist of XML forms. (More...)

What is a document library?

  
A document library is where you upload your core documents. They consist of a row and columnview with links to the documents. When the document is updated so is the link on your site. Youcan also track metadata on your documents. Metadata would consist of document properties. (More...)

What is template id for customList,Document/Picture library ,Task, survey and Contacts?

  
CustomList 100
Document library 101
Picture library 109
Task List 107
Survey 102
Contacts 105
(More...)

Difference Between Delete and Truncate

  
.Delete table is a logged operation, so the deletion of each row gets logged in the transaction log, which makes it slow.

. Truncate table also deletes all the rows in a table, but it won't log the deletion of each row, instead it logs the de-allocation of the data pages of the table, which makes it faster. Of course, truncate table cannot be rolled back.

. Truncate table is functionally identical to delete statement with no "where clause" both remove all rows in the table. But truncate table is faster and uses fewer system and transaction log resources than delete.

. Truncate table removes all rows from a table, but the table structure and its columns, constraints, indexes etc., remains as it is.

. In truncate table the counter used by an identity column for new rows is reset to the seed for the column.

. If you want to retain the identity counter, use delete statement instead.

. If you want to remove table definition and its data, use the drop table statement.

. You cannot use truncate table on a table referenced by a foreign key constraint; instead, use delete statement without a where clause. Because truncate table is not logged, it cannot activate a trigger.

. Truncate table may not be used on tables participating in an indexed view. (More...)

Does the .NET Framework only apply to people building Web sites?

  
The .NET Framework enables you to create great Web applications. However, it can also help you build the same applications you build today. If you write any Windows software (using ATL/COM, MFC, Microsoft® Visual Basic®, or even standard Microsoft® Win32®), .NET offers many advantages to the way you currently build applications. Of course, if you do develop Web sites, then the .NET Framework has a lot to interest you-starting with ASP.NET. (More...)

What is the difference between TRUNCATE and DELETE commands?

  
TRUNCATE is a DDL command whereas DELETE is a DML command. Hence DELETE operation can be rolled back, but TRUNCATE operation cannot be rolled back. WHERE clause can be used with DELETE and not with TRUNCATE. (More...)

Difference between Delete and Truncate?

  
Delete table is a logged operation, so the deletion of each row gets logged in the transaction log, which makes it slow.

Truncate table also deletes all the rows in a table, but it won't log the deletion of each row, instead it logs the de-allocation of the data pages of the table, which makes it faster. Of course, truncate table cannot be rolled back.

Truncate table is functionally identical to delete statement with no where clause both remove all rows in the table. But truncate table is faster and uses fewer system and transaction log resources than delete.

Truncate table removes all rows from a table, but the table structure and its columns, constraints, indexes etc. remains as it is.

In truncate table the counter used by an identity column for new rows is reset to the seed for the column.

If you want to retain the identity counter, use delete statement instead.

If you want to remove table definition and its data, use the drop table statement.

You cannot use truncate table on a table referenced by a foreign key constraint; instead, use delete statement without a where clause. Because truncate table is not logged, it cannot activate a trigger.

Shashi Ray (More...)

If any .NET language has access to everything in the Base Class Library, why is there so much talk about C#?

  
Although in theory all .NET languages have equal access to the BCL, in reality it was left up to the language teams to determine what level of support they wanted to offer, at least beyond the minimums needed for basic compliance. In our opinion, C#, because it was developed as a new language specifically for the .NET platform, has the best support for .NET applications. (More...)

What is a document workspace in SharePoint?

  
Document workspaces in SharePoint consist of information surrounding a single or multiple documents. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


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