Tag Info

Hot answers tagged

5

In sandbox solution you can not create visual webpart directly. for that you have download and install the Visual Studio 2010 SharePoint Power Tools from given link and then you can create Visual WebPart in sandbox solution. [Visual Web Part(Sandboxed)] http://visualstudiogallery.msdn.microsoft.com/8e602a8c-6714-4549-9e95-f3700344b0d9/


4

The url for the document set welcome page includes an ID in the query string, so you can use this parameter to find the document set: http://server/MyDocumentLibrary/Forms/MyDocumentSet/docsethomepage.aspx?ID=2 var id = Convert.ToInt32(HttpContext.Current.Request.QueryString["ID"]); SPListItem item = ...


4

Yes. You can place web part in any page and show this page in dialog. How to call dialog: MSDN: SP.UI.ModalDialog.showModalDialog(options) Method


3

Another option to what Vikalp said is to use Visual Studio 2012


3

In order to execute RunNow method Farm Administrator rights are required. When you use RunWithElevatedPrivileges method, the code runs in the context of application pool account, which usually does not have farm admin rights (and it should not have it according to best practices) So the solution is to run the code in context of some user that does have farm ...


3

Vikalp, Many people have asked this question before: Sharepoint Calendar sync with Google Calendar How to syncroniz google calender with sharepoint 2007 calender Sync calendar between Sharepoint, Google, Outlook I hope this helps!


2

If I have understood correctly you just want to change the styling on the title of the web part so this is just CSS - no need to play with XSLT. This is the standard tag at the top of a web part. If you create some CSS such as: .ms-WPTitle {color: red} This will style the title font - but note that it will style all the web part headers. If you want ...


1

How about placing those client controls inside <div> tags and changing the visibility of the div tag.


1

This is working on my dev environment from a long time. I guess issue is with single and double inverted commas. Check this <script type="text/javascript" src='<SharePoint:EncodedLiteral runat="server" Text="<%$SPUrl:~sitecollection/Style%20Library/Scripts/jquery-1.11.1.min.js%>" />'></script> <script type="text/javascript" ...


1

Not sure where you are storing your js files, but if you are storing them in the LAYOUTS folder you need to reference what hive you are storing them in now. Example: 2010: src="/_layouts/js/jquery-1.11.0.js" 2013: src="/_layouts/15/js/jquery-1.11.0.js" Hope this helps!


1

Roger, Looking at the error description it seem to me that jQuery library is not loaded correctly, Can you check your jQuery.min.js file reference. Make sure it is pointing to the current site address. Also try changing it to following line to see if that works. None of the jQuery script will be executed if your reference is not correct. Put this code ...


1

We have done this for so many of our custom web parts in our intranet. The steps we follow are given below: First we create custom web parts Then we added a web service The Web Method will return the html mark up of the user control Finally, we render the html mark up on the page using Ajax and JQuery. Please read this article for more details, I have ...


1

You can find many articles on how to do this. On codeplex there is a solution that gives an example of how to load your webparts asynchonous. Also MSDN there is a nice article that explains how to create Asynchronous Web Parts. But maybe you can first analyze your page and detect what webpart and why this webpart slowdown the page. One way to do this is ...


1

<script type=”text/javascript”> function OpenDialog(URL) { var options = SP.UI.$create_DialogOptions(); options.url = URL; options.width = 600; options.height = 400; SP.UI.ModalDialog.showModalDialog(options); } </script>


1

You can show any page using eg SP.UI.ModalDialog. You could just add your WebPart to a page, and link to it: <a title="aTitle" onclick="javascript:SP.UI.ModalDialog.ShowPopupDialog('http://link/to/page/with/webpart.aspx');return false;"> aLink </a>


1

Jeez, it's been a very long time since I've even looked at XSLT but that's how you would style a Content Query Web Part. Microsoft's How-To is a decent starting point but there are years worth of blogs you can dig up that will provide better examples. Another thing to consider is that Microsoft is phasing this technique out (which is why I can't provide a ...


1

It seems like somewhere inside your webpart an exception is thrown. I would suggest you to wrap all your code inside CreateChildControls and client_DownloadStringCompleted methods with try..catch something like that: try{ ... } catch (Exception ex){ this.Controls.Add(new LiteralControl(ex.Message+"; "+ex.StackTrace)); } It is a good practice to ...


1

Here is an article that Microsoft made to create the "People Picker": http://msdn.microsoft.com/en-us/library/jj713593.aspx In the ascx file: <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> <SharePoint:ScriptLink name="clienttemplates.js" runat="server" LoadAfterUI="true" Localizable="false" /> ...


1

This is how I would do it: Create a blank solution (sln). Create a SharePoint project to hold the Web Parts (this will also be one single WSP). Use Add Existing Project... to add the Web Part projects to your solution (sln). In your new SharePoint project create a Feature. Add the Web Parts to the new Feature. Now you will have a completely separate ...


1

After you installed Visual Studio 2010 SharePoint Power Tools for you create a sandbox solutions, you need create a Empty Project, and after add a Visual Web Part (Sandboxed). I tell this because only install VS 2010 Power Tools not enable this option.



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