Tag Info

Hot answers tagged

18

As James mentioned, your main mistake is that you are using Page.Header.Controls. It is much simplier: this.Controls works like a charm. If it will not work, you should then check your delegate control declaration XML code. It should look like this: <Control Id="AdditionalPageHead" Sequence="1000" ...


6

Hm. What I would do is do the work in CreateChildControls. Have it just add the two LiteralControls to the this.Controls collection. Then, add your ASCX to the AdditionalPageHead delegate control via your Feature. (step 33 in that article you linked to). There is a reason (and at this time in the morning I can't remember what it is), but the Page.Header ...


5

I used this guide by Chris O'Brien and found it very clear and simple. The MSDN article is also a reasonable reference. If you're planning on adding your own delegate controls to a master page or page layout, there is some good advice here from Brendon Schwartz.


4

Check out this article from Randy Drisgill. It's exactly what you need. Add the s4-notdlg css class to each div you want to hide in dialogs. http://blog.drisgill.com/2009/11/sp2010-branding-tip-2-custom-master.html


2

Found the answer: The problem really was that the exception was being thrown within the delegate. Hence the FeatureActivated just ran smoothly and the feature seemed activated. Fortunately SPLongOperation can be instantiated with a Page: new SPLongOperation(Page page) - problem is that in a Feature Receiver i don't have this.Page. I found the beautiful ...


2

Take a look at this blog. In the section marked SharePoint Exception Handling: If you only catch and log the exception without throwing the SPException then the feature will complete the requested feature activation or de-activation (which ever the user is currently requesting) instead of aborting the feature activation or de-activation.


1

If you are not seeing any exception on site load then I think you control is working fine, remove the dll from GAC / BIN and see it shoulf throw an error. Sometimes this.Page.ClientScript.RegisterClientScriptBlock doesn't work in Server control, please try using this.Page.ClientScript.RegisterStartupScript instead. Also, see the source code of the page to ...


1

Please check your web.config to see if your SafeControl entry is really inserted and specifies the correct assembly and class. I didn't understand from your description what you did to add it. A missing or incorrect SafeControl entry will most likely be the cause of the control not being used. BTW, if this is the case, you can also see it in the ULS log. ...


1

I show you my custom search small input box. These is my Elements.xml: <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Control Id="SmallSearchInputBox" Sequence="25" ControlSrc ="~/_controltemplates/Piaggio.Dealer.Portal/SmallSearchInputBoxDelegateControl.ascx"> </Control> </Elements> and these is part of ...


1

i havent tested this, but as long as your delegate control is placed in partially trusted location (bin) and not global assembly cache (GAC) i cant see why it shouldnt work without an IISRESET. But i would have to test it to be sure. EDIT: ok chris piped in with his answer while i was writing this. He sounds kind of convincing, so he might have a point :-) ...


1

Working with delegate controls is just one of the main developer changes which requires an IISReset or recycling the app pool for the current site unfortunately. This is because SharePoint agressively caches a great deal of "infrequently changing" data for performance. Sorry, can't help on your other question.



Only top voted, non community-wiki answers of a minimum length are eligible