Tag Info

New answers tagged

0

The reason why your redirect code isn't working and it raises Null Exception may be because your WebPart is a Sandboxed solution. For redirect in SandBoxed solutions you can try the following: Create a Literal control. In your code-behind, add similar code as this one: literalRedirect.Text = "<script ...


1

There is no declarative way to make the page deployed through File element to show up in the Quick Launch. Check the attributes of File Element here: https://msdn.microsoft.com/en-us/library/office/ms459213.aspx So, using the event receiver may be a right approach.


1

Add this code to your FeatureActivated method of the Event Receiver: public override void FeatureActivated(SPFeatureReceiverProperties properties) { using (SPWeb web = (properties.Feature.Parent as SPWeb)) { web.AllowUnsafeUpdates = true; string headingTitle = "myNavigation"; // Navigation Title ...


0

Creating a subsite in sandbox code is just too much for the sandbox code service to handle. You don't have enough control over the resource and timeout limits. You might get it to a point where it seems to work, but it will intermittently crash and cause you major headaches. I recommend you find a different way to implement the functionality you need - a ...


1

If you just want to change the toolbar type.Here is simple code for you Code Block lMgr =OpenWebPartManager("Default.Aspx"); // Get web Part wp = lMgr.WebParts[wp.ID] as WebPart; ListViewWebPart lv = (ListViewWebPart)wp; // Extract view System.Reflection.PropertyInfo ViewProp = lv.GetType().GetProperty("View", System.Reflection.BindingFlags.NonPublic | ...


2

This solution worked for me private static void SetToolbarType(SPView spView, string toolBarType) { spView.GetType().InvokeMember("EnsureFullBlownXmlDocument", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.InvokeMethod, null, spView, null, System.Globalization.CultureInfo.CurrentCulture); PropertyInfo nodeProp = ...


1

Check out this article on ITUnity: Managing JavaScript References in Office 365


0

Try this: Make Sure that 'EnbleViewState' property of your page or button is set to True. Set button property UseSubmitBehavior="False"


0

I have encountered the same error today and spend half a day to solve it. In the end the answer from the question http://stackoverflow.com/questions/25857722/visual-studio-unexpectedly-adding-feature-on-load helped me. If the lists in the same feature have the same Type ID, the tooling will move the lists into a newly created feature, because the Type ...


0

Office 365 does not support sandbox solutions that run .net code as Wictor's blog post orients you. Those were deprecated deprecated a year or two after he wrote it. If you have anything running .net code on there, you're not going to be able to put it in Office 365. you need to move to the new App Model. The Office Team have a Github repository with ...


0

Create a webpart page and embed a webpart into it using elements xml file : Deploy webpart page using module Custom application pages in the Sandbox Solution



Top 50 recent answers are included