Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Sharepoint Event

  Asked By: Kami    Date: Jun 07    Category: Sharepoint    Views: 640

I had a requirement that ,

In a document library 4 folders are there

If I Upload a document it needs to ask among 4 folders in which it should

How to make,

My idea is to do via even receiver class, but I dono how to do this please help

Event recevier should affect only that single document library not all in the



3 Answers Found

Answer #1    Answered By: Rafael Willis     Answered On: Jun 07

In the event  receiver, get the list name and only perform the desired action
when the list name is the desired value. You can get the list name as an
attribute of the event.

Answer #2    Answered By: Richard Davis     Answered On: Jun 07

Please guide me how to do that since am a newbie

Answer #3    Answered By: Mason Davis     Answered On: Jun 07

Here's an example of the ItemAdding event:

public override void ItemAdding(SPItemEventProperties properties)

// Prevent the accidental triggering of events from logic executed in this

// Get the List Name in which this event  was triggered.
string strListName = properties.ListTitle;

switch (strListName)
case "Courses": this.ItemAddingCourses(properties); break;

Didn't find what you were looking for? Find more on Sharepoint Event Or get search suggestion and latest updates.