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


3

I think the error message states that your UserControl (CustomNavUserControl.ascx) does not implement IHierarchicalDataSource. So your code behind file (CustomNavUserControl.ascx.cs) of your UserControl must implement this interface.


2

Try registering OWSSVR.DLL file located under ISAPI folder under 12-hive (MOSS 2007) or SharePoint root (Sharepoint 2010) folder. It is a COM library, you need to register using "REGSVR32 'FULL PATH TO DLL' command.


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.


2

FeatureActivated is an asynchronous event that happens after the feature was activated. I know of no way to change the activation status except deactivating (SPFeature.Remove(id)) the feature programmatically, but not sure thats what you want...


2

Have you added a SafeControl for your WebControl? (If you check the ULS it should say that in plain English :-)


1

You've almost got it... you have to write an expression in that condition that evaluates to TRUE/FALSE. So something like testProp == 'something'


1

Are you sure the feature isnt still activated on Site scope? That would explain why you see it twice. Another thing to try is to force all sites to flush object cache under _LAYOUTS/objectcachesettings.aspx


1

I've been away from this for a while, but my solution was this - I was running a console app with SharePoint client dlls in MOSS. It's just not supported.


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

Make your ShowRibbonControl class a public class. That will make the difference and it will start working and will hit to the OnLoad method.


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 used properties in delegates in a long time, but dont you need to set the value in your control? <Property Name="Theme">MyValue</Property>


1

Nevermind. I found a custom HTTP Module that was forcing a redirect. Have to watch out for these!


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