Event Receiver for all Page Libraries in a Site Collection

We have a single site collection with many different page libraries.  I'd like to create a single event receiver for ALL page libraries in the site collection (850- Page Library).  Can you do this?
The event receiver will essentially remove/expire something we have stored in the System.Web.HttpRuntime.Cache.  We are caching the content in the Page Library and would only like to expire the cache when a new page or change is performed on some
content in the page library.

Hi,
We can create a new feature and add an event receiver to the feature for all Page Libraries.
For more information, you can see the link below:
http://msdn.microsoft.com/en-us/library/ee231604.aspx
Here are two similar threads for you to take a look at:
http://sharepoint.stackexchange.com/questions/37555/how-to-add-event-receivers-to-all-the-lists-in-a-site-collection
http://social.technet.microsoft.com/Forums/en-US/f1297543-9035-49d6-9299-d82f546eeddd/event-receiver-for-specific-list-fires-for-all-lists-on-site-collection?forum=sharepointcustomizationprevious
Thanks,
Dennis Guo
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Dennis Guo
TechNet Community Support

Similar Messages

  • Open with [Pages4.3] for ALL Pages docs not working

    Hi there,
    I am unable to set the default application for all PAGES document to open in a lesser version (Pages version 4.3) to that of Pages version 5.1 which came pre-installed on my machine.
    The reason why I want Pages 4.3 opening on default instead of Pages 5 is because Pages 4.3 contains the features version 5 no longer has. I also wish to retain Pages 5 to open historical documents.
    I am running OS10.9.5 with Pages version 5.1 (1769) as standard with the machine when I bought it. I copied to my machine the application Pages 4.3. It runs, I have no problem opening both copies of Pages.
    I now want all my Pages documents to open in v4.3 as default (not v5). This is where I fall over.
    1. I "Get info" on a Pages document,
    2. In the "Open with" panel I select Pages 4.3 from the dropdown menu. Upon changing the application the "Change All" button is becomes active.
    3. I click on "Change All" button and confirmation message appears (see image). I click "Continue" and the confirmation message disappears.
    4. ISSUE - The default application reverts back to "Pages" (see image) which is the same selection as when I started (step 1)
    (Note: I also selected "Other" from the dropdown menu and selected Pages 4.3 from the applications folder through the dialogue window, but without joy)
    5. When I double-click the selected document (the document I selected in step 1) it opens in Pages 4.3. However, when I double-click any other Pages document it opens in Pages5, not Pages4.3.
    I might add, others in my office, with varying OS (10.10, and 10.7) and Pages 5.5.2 have not had the same issue as I have. They followed the same process as above and in Step4, their selection of Pages4.3 remained as the dropdown value, not "Pages".
    I would be grateful to hear from those who have had similar issue and overcome it. Many thanks

    Hi stutteringfish,
    was hoping for something more definitive... something more like what the feature "open with [for all]" is designed to do.
    I am afraid not. That setting does not stick with Pages 5 (or Numbers 3).
    My solution is to keep icons for the old and new versions on my Dock. Then I can launch whichever and Menu > File > Open (or Open Recent) from within the appropriate version..
    Wayne Contello has written a User Tip for working with the old and new versions of iWork.
    Need newer version of Numbers to open file
    Regards,
    Ian.

  • Global Event Listeners for all Views in a ViewNavigatorApplication

    Hello,
    As the subject states, I have a ViewNavigatorApplication and I am trying to set up a "global" event listener for all views. Which I am able to do, however I am having problems...
    In my first view, I assign this listener:
    NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, handleKeys);
    And I also have this function:
    public function handleKeys(event:KeyboardEvent):void {
         if (event.keyCode == Keyboard.MENU) {
                        trace("menu pressed");
                        navigator.pushView(MainMenuView);
    This works fine from the first view. But when I switch views, I get an exception on pushView (navigator is null). I think I understand why, so what is the best practice for something like this? How can I get access to the spark component navigator from that function when called from a different view? Or is there a better way to go about this?
    Thank you!

    Try putting the code in the main mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        firstView="home"
        applicationComplete="init()" >
        <fx:Script>
            <![CDATA[
                private function init():void {
                    this.addEventListener(KeyboardEvent.KEY_DOWN, handleKeys);
                private function handleKeys(event:KeyboardEvent):void {

  • SAP HR-- In form 16 , i am not able take print out for all pages..

    Hi,
           In SAP HR module , i have totally 5 pages, i need to take the printout for all pages.. but i am getting only 1 pages.pls could u solve this problem
    Regards
    senthil

    There is no relation with module to printer settings
    check the printer settings for declared printer in output devices
    otherwise contract basis guy
    regards
    sateesh

  • Please tell me how can I put Bookmarks for all pages opened in Firefox.There was an option ("bookmark all pages") which vanished.

    Please tell me how can I put Bookmarks for all pages opened in Firefox.There was an option ("bookmark all pages") which vanished.

    It moved to tab contextual menu :
    Right-click on any tab -> Mark all tabs (or something close, my FF is not in english).

  • Print the logo for all pages

    Hi
    How to print the logo for all pages in xml report
    please provide the tags also

    Hi,
    create a Header and footer section and paste your logo inside and use the tag <?template:header?> before header and <?end template ?> after header section.
    Thanks & Regards
    Srikkanth

  • Identical Related Link for all pages

    We're trying to put a set of identical Related Link pages for all pages.
    I tried the following.
    Modify the DefaultFramework Page.
    Drill into Desktop Innerpage
    It consists of :
    Detailed Navigation
    Dynamic Navigation
    Drag&Relate
    Related links
    Portal Favorites
    Content Area
    Made of a Copy of the Content Area iview, and added 2 Relate Links into this iview (save it as Content_Area_2)
    Removed the Original Content Area under Desktop Innerpage and added Content_Area_2)
    What I essentially did was assigned related links to the content area of the Desktop Innerpage. That should bring up the Related Links for all iViews.
    Is that how it can be done ?
    Does not seem to work.
    Is there another way of doing it.

    boerli wrote:
    > In GoLive there was a wonderful feature which allowed
    you to click any image in
    > the bin and it would display instantly all the links to
    pages on which that
    > picture was used. It allowed you to find content and
    other pics on other pages
    > related to that image instantly. It prevented
    duplication. Wonderful feature I
    > used constantly on running our huge websites.
    >
    > I can't find anything like that in DW. Now I have to try
    to remember on which
    > other pages I used that image. It's a nightmare...
    >
    > Can anyone help?
    >
    > boerli
    >
    > Am I missing something? Can anyone help me find this
    feature?
    You want to find all pages that have a particular image on
    it?
    From the Edit menu select Find and Replace.
    In the Find In drop down select Entire Current Local Site
    In the Search drop down select Source Code
    Then in the Find field type in the filename
    Now click Find All
    The search results will show you all pages, you can double
    click on each
    file and the page will open with the filename highlighted in
    the code.
    Its not perfect, but Dreamweaver isn't GoLive. If its a
    feature you
    would like to see ask Adobe:
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    Dooza

  • Help me stop Safari showing souce code for all pages

    Safari has been doing this for all pages including apple.com
    The only change to the system was the new combo update. Now I'm using Firefox. Can someone give me a reason to go back to Safari?

    I better add that this also affects any of the help windows for other products. Many times I just get a long line of the different help topics without formatting. It is very annoying that i cannot read the Hlep menus properly. Can anyone help me please?

  • Need to checks if ASN has been received for all the materials in the

    Hi Experts,
    Can you please give me an idea
    I need checks if ASN has been received for all the materials in the Invoice.
    what filed do i need to check.
    Regd's
    Vardesh,

    Hi Jagadeeswari,
              If you need to check Workflow Trace check Transaction SWU9. This displays all the WOrkflow started on a particular time period we specify. Check Program RSWTTR01 and also table SWT_LOGCAT which could help you. The transaction i have specified displays all the Workflow that has been executed and whether it is been a success or a failure.
              Hope this would help you.
    Thanks,
    Prashanth

  • Set page title for all pages

    Hi
    Can I set page title for all pages in project, by using filter or something else? Or the only way is to specify the name in each page?
    Michal

    Might be possible with filters, but that would be a rather expensive task. Just create an include file which you include in all pages. This way you also have a single point of maintenance.

  • Sharepoint 2013 ItemAdded event receiver for renaming files is not working

    In SP 2013 I coded an event receiver that intercepts the ItemAdded event and it just renames the file.
    It is a synchronous event (I added <Synchronization>Synchronous</Synchronization> in the Elements.xml).
    This is the code:
            public override void ItemAdded(SPItemEventProperties properties)
                SPSecurity.RunWithElevatedPrivileges(delegate()
                    try
                        OutputDebugStringA("Inside ItemAdded");
                        string szHttpUrl = properties.WebUrl + "/" + properties.AfterUrl;
                        SPWeb openedWeb = properties.Web.Site.OpenWeb(properties.Web.ID);
                        SPFile spf = openedWeb.GetFile(szHttpUrl);
                        EventFiringEnabled = false;
                        string szUrl = properties.AfterUrl;
                        szUrl = szUrl + ".renamed";
                        string szNewFileName;
                        if (szUrl.LastIndexOf('\\') != -1) szNewFileName = szUrl.Substring(szUrl.LastIndexOf('\\') + 1);
                        else if (szUrl.LastIndexOf('/') != -1) szNewFileName = szUrl.Substring(szUrl.LastIndexOf('/') + 1);
                        else szNewFileName = szUrl;
                        if (properties.ListItem != null)
                            properties.ListItem["Title"] = szNewFileName;
                            properties.ListItem.Update();
                        spf.MoveTo(szUrl);
                        EventFiringEnabled = true;
                        base.ItemAdded(properties);
                        OutputDebugStringA("Renaming to " + szUrl);
                    catch (System.Exception exception)
                        OutputDebugStringA("ItemAdded ERROR: " + exception.ToString());
    The problem is that when I upload a .txt file using Internet Explorer, just after the renaming is done, IE says that something went wrong and when I inspect the log files I see:
    SPRequest.GetFileAndFolderProperties: UserPrincipalName=i:0).w|s-1-5-21-4050800873-4278272723-3073177257-500, AppPrincipalName= ,bstrUrl=http://sp2013/sites/demo/subsite1 ,bstrStartUrl=Shared Documents/test2.txt ,ListDocsFlags=16400 ,bThrowException=True 0fa7689c-674b-5045-c3a2-b214a5d4cbed
    01/09/2014 15:29:26.75  w3wp.exe (0x1544)                        0x16F4 SharePoint Foundation        
     General                        ai1wu Medium   System.IO.FileNotFoundException: <nativehr>0x80070002</nativehr><nativestack></nativestack>,
    StackTrace:    at Microsoft.SharePoint.SPWeb.GetFileOrFolderProperties(String strUrl, ListDocsFlags listDocsFlags, Boolean throwException, SPBasePermissions& permMask)     at Microsoft.SharePoint.SPFile.PropertiesCore(Boolean
    throwException)     at Microsoft.SharePoint.SPFile.get_Length()     at Microsoft.Office.RecordsManagement.PolicyFeatures.ApplicationPages.UploadPage.OnSubmit(Object o, EventArgs e)     at Microsoft.Office.RecordsManagement.PolicyFeatures.ApplicationPages.UploadExPage.OnSubmit(Object
    o, EventArgs e)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeSta... 0fa7689c-674b-5045-c3a2-b214a5d4cbed
    ...gesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext
    context, AsyncCallback cb)     at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr
    rootedObjectsPointer, IntPtr nativeRequestContex... 0fa7689c-674b-5045-c3a2-b214a5d4cbed
    ...t, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr
    pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr
    rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) 
     0fa7689c-674b-5045-c3a2-b214a5d4cbed
    So it is clear that the fact that I renamed the file is causing an issue in the SharePoint upload logic.
    As a solution what I did was to not declare it as Synchronous, but if I do it then there is another error when Sharepoint shows the Edit Properties dialog... in this case the upload is OK but when it is time to show that Edit Property dialog IE fails and
    says that the file has been already modified, or that "something went wrong".
    If I use a synchronous event I get one problem. If I use the asynchronous event I get another problem... It's very frustating and I am pretty sure that a so important API like Event Receivers should have support renaming files so I hope someone can tell
    me what I am doing wrong.
    Thanks in advance

    May be you want to consider using the following code and see if it works for you.
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/40c78e03-2dca-4083-89d2-a7430099da68/how-do-i-change-the-name-property-of-a-file-in-a-document-library?forum=sharepointdevelopment
    Amit

  • How to make the common control button for all pages in TABCONTROL​?

    Dear all,
               I'm using TABCONTROL for my application. I'm having STOP and SAVE control. I have to show this button to all pages  in TABCONTROL.. How do i make it?
    Kindly help me?..
    Regards,
    Srinivasan.P
    Solved!
    Go to Solution.

    Hi srinivasan,
    If you want to keep "Save" and "Stop" common, Why do you want to keep them on Tab control? Is your tab control taking entire space on Front panel? If so, you can have SAVE and STOP on other vi, and you can call this vi (MODAL).
    Gaurav k
    CLD Certified !!!!!
    Do not forget to Mark solution and to give Kudo if problem is solved.

  • How to set the zoom out or in for all pages permanently?

    I wish to set my page size one size smaller than the default.
    The result of ctr - (zoom out) is exactly what I want (it decreases the size of text AND images). However this effect only lasts for the page I am currently on, as soon as I navigate to a different page (or just refresh the page I am at), it reverts back to the default size.
    I looked at Tools->Options->Content, however that deals only with text size (besides it looks only certain pages are affected by this setting anyway).
    In other words, how (or where) do I set my browser to automatically decrease size or 'Zoom Out' for all the pages I visit in order not to set it manually for every page every time.
    Regards
    PS.
    If this setting can be applied for individual users (I have a multi user PC) that would be even better, although I would be very grateful if I could just set it.
    PPS.
    Additional information. I just discovered it seems to be working now in normal browsing but not in private browsing, my apologies for the omission.

    Default FullZoom Level extension:
    https://addons.mozilla.org/en-US/firefox/addon/6965

  • Header for all pages

    I am new to CSS, how do I use the same header and navigation
    bar menu for all my web pages. Here is the CSS code:
    /* global */
    html{height: 100%;}
    body
    { font-family: arial, sans-serif;
    padding: 0px;
    margin: 0px;
    font-size: .78em;
    p
    { margin: 0px;
    padding: 0px 0px 16px 0px;
    line-height: 1.7em;
    h1
    { font-family: serif;
    font-size: 108%;
    letter-spacing: .1em;
    h2
    { margin: 0px;
    padding: 0px 0px 4px 0px;
    font-size: 100%;
    letter-spacing: .1em;
    font-weight: normal;
    text-decoration: underline;
    img{border: 0px;}
    a{outline: none;}
    /* image positioning - left, right and center */
    .left
    { float: left;
    padding: 0px 8px 0px 0px;
    .right
    { float: right;
    padding: 0px 0px 0px 8px;
    .center
    { display: block;
    text-align: center;
    margin: 0 auto;
    /* block quote */
    blockquote
    { margin: 20px 0px 20px 0px;
    padding: 10px 20px 0px 20px;
    border-left: 8px solid;
    /* unordered list */
    ul
    { margin: 8px 0px 0px 16px;
    padding: 0px;
    ul li
    { list-style-type: square;
    margin: 0px 0px 11px 0px;
    padding: 0px;
    /* ordered list */
    ol
    { margin: 8px 0px 0px 24px;
    padding: 0px;
    ol li
    { margin: 0px 0px 11px 0px;
    padding: 0px;
    /* margin lefts / margin rights - to centre content */
    #main, #links, #footer, #logo, #menu, #content
    { margin-left: auto;
    margin-right: auto;
    /* main container */
    #main{width: 850px}
    /* header */
    #header
    { width: 100%;
    height: 87px;
    /* logo */
    #logo
    padding: 1;
    float: left;
    margin: -25px 15px 0px 15px;
    #address
    { padding: 11px 17px 0px 14px;
    float: right;
    text-align: right;
    #address p
    { padding: 0px;
    margin: 0px;
    #logo h1
    { font-family: verdana, arial, sans-serif;
    margin: 0px;
    padding: 18px 0px 0px 0px;
    font-size: 160%;
    letter-spacing: .3em;
    #logo h2
    { font-family: verdana, arial, sans-serif;
    margin: 0px;
    padding: 5px 0px 0px 0px;
    font-size: 100%;
    letter-spacing: .2em;
    /* navigation menu */
    #menu{margin: 0px 15px 0px 15px;}
    #menu ul
    { height: 38px;
    margin: 0px auto;
    #menu li
    float: right;
    margin: 0px 0px 0px 0px;
    padding: 0px;
    list-style: none;
    #menu li a, #menu li a#selected, #menu li a:hover
    { font-family: verdana, arial, sans-serif;
    display: block;
    float: left;
    height: 7px;
    text-decoration: none;
    margin: 5px 12px 0px 4px;
    padding: 7px;
    text-transform: uppercase;
    font-size: 80%;
    #links
    { float: right;
    width: 100px;
    text-align: right;
    padding: 0px 18px 0px 0px;
    /* sidebars */
    .sidebar
    { float: left;
    width: 194px;
    padding: 16px 15px 15px 15px;
    /* sidebar items / links */
    .sidebaritem
    { text-align: left;
    width: 194px;
    float: left;
    margin: 0px 0px 11px 0px;
    padding: 0px 0px 0px 0px;
    .sidebaritem h1, .sidebaritem h2, .sidebaritem p{margin: 0px
    10px 0px 10px}
    .sidebaritem h1
    { font-weight: normal; padding: 8px 0px 16px 0px;
    text-transform: uppercase;
    .sidebaritem p
    { line-height: 16px;
    padding: 0px 0px 8px 0px;
    .sidebaritem a, .sidebaritem a:hover
    { padding: 0px 0px 2px 14px;
    text-decoration: none;
    .sbilinks ul{margin: 0px 0px 18px 10px;}
    .sbilinks li
    { list-style: none;
    padding: 0px 0px 0px 0px;
    margin: 0px 0px 5px 0px;
    .sbilinks li a, .sbilinks li a:hover
    { height: 16px;
    text-decoration: none;
    width: 149px;
    /* page content (centre) */
    #content
    { text-align: justify;
    width: 384px;
    padding: 11px 9px 15px 9px;
    margin-top: 16px;
    float: left;
    #content h1
    { font-family: arial, sans-serif;
    margin: 5px 0px 12px 0px;
    font-size: 128%;
    font-weight: normal;
    text-transform: uppercase;
    #content a, #content a:hover
    { padding: 0px 0px 2px 0px;
    text-decoration: none;
    /* footer */
    #footer
    { height: 44px;
    padding: 18px 0px 4px 0px;
    font-size: 80%;
    text-transform: uppercase;
    font-family: verdana, arial, sans-serif;
    clear: both;
    text-align: center;
    border-top: 2px solid;
    margin: 4px 15px 4px 15px;
    #footer a
    { text-decoration: none;
    padding: 0px 0px 2px 0px;
    border-bottom: 1px dashed;
    #footer a:hover
    { text-decoration: none;
    padding: 0px 0px 2px 0px;
    border-bottom: 1px solid;
    /* Based on Nifty Corners: rounded corners without images */
    /* By Alessandro Fulciniti */
    http://www.html.it/articoli/nifty/index.html
    .rtop, .rbottom, .mtop, .mbottom{display: block;}
    .rtop .r1, .rtop .r2, .rtop .r3, .rtop .r4,
    .rbottom .r1, .rbottom .r2, .rbottom .r3, .rbottom .r4,
    .mtop .m1, .mtop .m2, .mtop .m3, .mtop .m4,
    .mbottom .m1, .mbottom .m2, .mbottom .m3, .mbottom .m4
    { display: block;
    height: 1px;
    overflow: hidden;
    .r1, .m1{margin: 0 5px}
    .r2, .m2{margin: 0 3px}
    .r3, .m3{margin: 0 2px}
    .rtop .r4, .rbottom .r4, .mtop .m4, .mbottom .m4
    { margin: 0 1px;
    height: 2px

    On Fri, 26 Oct 2007 12:44:42 +0000 (UTC), "beau123"
    <[email protected]> wrote:
    >I am new to CSS, how do I use the same header and
    navigation bar menu for all
    >my web pages. Here is the CSS code:
    >
    Not really anything to do with css.
    If it's a small site - you could use templates - have all the
    common
    code in the template.
    But rather better to use service side includes ( SSI ) to
    contain the
    common items such as top banners, navigation, footers etc
    use Dw's help facility - search for Templates and server side
    include
    ~Malcolm N....
    ~

  • How to atomate caching options for all pages?

    Hi,
    Customer request:
    Does there exist a means of automating caching option for all the pages of a page group or a portal?
    Thanks a lot for your kind help.
    Best regards.
    Jean-Francois

    Depends on the view technology you´re using for JSF.
    If you're using JSP, use jsp:include.
    If you're using Facelets, use ui:include.
    Consult the documentation of the view technology used for details.

Maybe you are looking for