Questions tagged [event-handlers]

Event handlers is a program statement which is called from an event. The event can be a human striking a key on the keyboard or pushing a button on a web page

Event handlers is a program statement which is called from an event. The event can be a human striking a key on the keyboard or pushing a button on a web page. An event handler can also be fired from a service if a time stamp or other criterions has been met.

Questions with the event handler tag regards events and event handlers.

More to read: http://www.webopedia.com/TERM/E/event_handler.html

279 questions
10
votes
3 answers

Event handler vs. event receiver

http://msdn.microsoft.com/en-us/library/ms453149.aspx says To create the event handler 1. Start Microsoft Visual Studio 2010. 2. On the File menu, point to New, and then click Project. 3. In Project Types, under Visual Basic or C#, select Event…
amac44
  • 101
  • 1
  • 3
8
votes
2 answers

Preventing document Uploading to Document Library in SharePoint 2010

Here is my scenario. I would like to allow the only certain file types (doc,docx,pdf,ppt,pptx) into my document library. I wrote an ItemAdding event receiver for a document library as follows. But I am unable to prevent the uploading. Can someone…
Share
  • 483
  • 6
  • 17
7
votes
1 answer

How to disable event firing outside an event?

How do I disable event firing in code that is not part of an ItemReceiver? E.g.: I have an FeatureActivated event receiver which update a list (adds column) and updates all items to populate the new column. I want to do this without firing the…
Dribbel
  • 2,906
  • 3
  • 31
  • 45
6
votes
2 answers

SystemUpdate(false) using SPWeb.ProcessBatchData()

Is it possible to use SPWeb.ProcessBatchData() and not trigger all the event handlers attached to a list? I would like to process a large list in quick time, but I don't want all the event handlers attached to the list getting fired
ashwnacharya
  • 1,679
  • 3
  • 18
  • 27
4
votes
5 answers

How to get current logged user in event receivers?

I need to get the information about the user actually logged (as SPUser) inside an event receivers. The following line: Dim currentUser As SPUser = SPContext.Current.Web.CurrentUser does not work because Current is set to Nothing (null). I read…
Drake
  • 435
  • 2
  • 10
  • 19
3
votes
2 answers

How to display errors in Event Receivers?

I am trying to implement a custom logic during the checkout of an item of a list in SharePoint 2010. For this reason I added an Event Receiver that ovverides the method ItemCheckedOut. The idea is to block the possibility to checkout a file if its…
Drake
  • 435
  • 2
  • 10
  • 19
3
votes
2 answers

eventHandler only works for admin

It appears that my eventHandler only seems to receive the event when an Admin user updates a document on the list. Ive used the event manager made by brian wilson to register the event. Does anyone know if the non admin users need some kind of…
None
2
votes
1 answer

is the WebProvisioned event fired when using restore-spsite?

Can somebody confirm that the WebProvisioned event is not fired when using restore-spsite? I have made some tests and it looks like it's not the case but I would like to make sure. If it's not the case, does somebody have an alternative of firing…
BlackCloud
  • 21
  • 1
2
votes
1 answer

Sharepoint 2010 Item Opened Event Receiver

I need to detect when a user opens a document in a specified list, and log their view in another list, however I see no method in SPItemEventReceiver for detecting such an…
1
vote
1 answer

Event Receiver Item Updating Datasheet view Problem

I've got a list that is being displayed and edited in datasheet view and now I need to ensure that users cant edit a column if there already is a value, but if the column is empty they should be able to edit the column. I have never worked with…
Christoffer
  • 9,801
  • 2
  • 36
  • 53
1
vote
1 answer

Get containing folder/list for SPFile item

I have an ItemAdded event receiver that is exporting files as they are added to a list. In my event receiver I want to find the containing folder of the item. This folder may be a SPFolder object or could be the top level list. Is there a clean way…
pstrjds
  • 221
  • 4
  • 13
1
vote
0 answers

Event Receiver - How to set item value with the value from the existing item in the SAME list?

I have a business requirement to add a new version (revision) of the existing list item. New list item should have this setting: NewItem.ParentID=ParentItem.ID NewItem.ProjectID=ParentItem.ProjectID NewItem.RevisionNumber=ParentItem.…
1
vote
2 answers

How to deploy C# event receiver as a farm solution

I have a C# event receiver that utilizes the ItemUpdating event. The project was originally created as a Sandboxed solution and worked fine, however, due to limitations I've decided to switch over to a farm solution. When doing this, I found out…
Josh
  • 377
  • 6
  • 13
1
vote
1 answer

How do I create an event listener without using a feature?

I want to create an event listener for SharePoint. I need to do that without using a feature. Any ideas?
None
1
vote
1 answer

Manifest file for registration of event handler in SP 2007

I'm trying to create a feature to register my event handler to a specific list. I'm building it like I would a normal feature. However, I'm not sure how to define my Elements file. The file for my feature is as follows:
Music Magi
  • 487
  • 5
  • 17
1
2