Tag Info

Hot answers tagged

5

In general, you should avoid directly connecting to PRODUCTION for any sort of development or debugging. Consider bringing the list to your development environment. You can use import/export or consider saving list as template and install the template in Dev environment. How should you develop, debug and deploy sharepoint solutions? The serious ...


5

Here is a way to do it in sharepoint 2013 in visual studio 2012 1)Create a empty sharepoint 13 solution Farm solution . 2) Add a sharepoin 13 project into it . 3)Add a mapped foder "Resources" to the project . 4)Now you gonna add three resources one for english "testMutliLing.en-US.resx" and one for german "testMutliLing.de-DE.resx" and one default ...


3

You can create a quick and dirty copy of the list from the production server by creating a list template from the list settings screen. When you create the list template, you will be given the option to include the content as well. Make sure that is checked. Download the file from the list template gallery in production, then upload the file to the list ...


2

This may be unrelated, but did you put a proper URL in your project's Site URL field, and can you properly deploy and activate an empty solution from VS? I find that the designer files are not generated properly if my site URL is faulty (VS can't connect to it) or if I lack the permissions to deploy and activate a solution from within Visual Studio.


2

Use (!this.Page.IsPostBack) in Sharepoint


2

There are two ways to use resource file. In .ascx file: <asp:Label ID="lbl1" runat="server" Text="<%$Resources:ResourcesFileName, ResourceFileItemKey %>" And in .cs file use SPUtility.GetLocalizedString() method For the second option your resource file should be present in sharepoint mapped resources folder. For more details visit this link ...


2

You must use code like this to get image url: SPList spList = web.Lists["ImagesLibrary"]; SPListItem item = spList.Items.GetItemById(itemID); //Thumbnail Url string thumbnailUrl = item[SPBuiltInFieldId.EncodedAbsThumbnailUrl].ToString(); //Picture Url string pictureUrl = item[SPBuiltInFieldId.EncodedAbsUrl].ToString(); The above Urls are the full Urls ...


2

in your webpart you need to change the web.config: <pages enableSessionState="false" enableViewState="true" enableViewStateMac="true" validateRequest="false" pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=*******" asyncTimeout="7"> to ...


2

You'd need to enable Session State in your web application. Execute the following powershell script Enable-SPSessionStateService –DefaultProvision Apply the following web.config change: pages enableSessionState="true" More information is available at: Using Session State in SharePoint 2010


2

try once using ClientScript.RegisterStartupScript as below : Page.ClientScript.RegisterStartupScript(this.GetType(), "nima", "alert('this is nima');", true);


2

You can create a single global resources file and deploy it to: {WebApplicationRoot}\App_GlobalResources\ This post shows you more on how to do it: http://blogbaris.blogspot.co.uk/2012/07/localization-with-sharepoint-2010-and.html The post is based on SP2010 but works just as well for SP2013


2

a- Add reference to "Microsoft.SharePoint.Taxonomy" assembly b- You need to register following Assembly in your Web Part <%@ Register TagPrefix="Taxonomy" Namespace="Microsoft.SharePoint.Taxonomy" Assembly="Microsoft.SharePoint.Taxonomy, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> c- You can use the control as following ...


2

When you add runat="server" to a div tag it gets an auto generated id. So when you in javascript or jQuery wants to get an element by ID and that element has the runat="server" attribute, then you need to use inline code to get it. Example without runat="server" attribute [HTML] <div id="MyDIV">some content </div> [jQuery] var mydiv = ...


2

It depends on what you want to do with the data, I'd say. In general, I would recommend the custom list approach, especially if the purpose of the form is to collect data and use it later. Recently, I built a custom 'poll' web part that did just this - I had a PollResponses list that stored the choice the user submitted through an AJAX request, and then I ...


2

First of all, you have an update panel. With that you have a few options. You could wire up a server side event to your button and hide the div on button click. The button click would cause an Async Postback which would just update the content inside of your update panel. One issue with your code is you are using normal html elements. To make your ...


2

According to this article Sandboxed Solutions support both custom actions as well as visual web parts. The following are not supported. Application Pages Custom Action Group Farm-scoped features HideCustomAction element Web Application-scoped features Workflows with code


1

Listfielditerator control renders each field in a list item with an appropriate control. A single line text field will be rendered as a text box while a lookup field will be rendered as combo box. This control resides in the Microsoft.SharePoint.WebControls namespace of the Microsoft.SharePoint.dll. You can use this control in a custom application page or ...


1

Here is also one another way to solve this. As the taxonomy picker page belongs to _layouts, by default, it is not available to the anonymous users. Hence, we should set the property of the page AllowAnonymousAccess to true. Go to the _layouts folder and find the WebTaggingDialog.aspx and place the below code. <script runat="server" ...


1

We can not call webservice in sand box solution(It's does not support).The reason behind of this sand box solution support only full trust code.One or more assemblies referenced by the XmlSerializer cannot be called from partially trusted code. You need to extend the sandboxed solution by making use of SPProxyOperation and SPProxyOperationArgs. Some ...


1

I would use Knockout JS to bind your inputs and jQuery to submit/create SPList items. here is an example of knockout dynamic row binding: http://knockoutjs.com/examples/gridEditor.html Personally i try to stay away from SPServices and rather use OOB JavaScript api's. Infopath is almost dead, i wouldn't invest my time creating forms etc with it.


1

I finally found one solution. It has all to do with the url of the site. It should be a valid url. It is a bit strange though because the url that I was providing was valid. To test it I created a new webapp with a site collection eg.: http://mysomething:5040 and visual web part was created successfully with the design file "....g.cs".


1

In SharePoint Online you can not use Farm solutions! You are limited to sandboxed solutions and Apps. You would have to rewrite and rearchitect your solutions to one of those two patterns. For sandboxed solutions, see here: http://msdn.microsoft.com/en-us/library/office/gg454741(v=office.14).aspx (Please note that sandboxed solutions, that are not no-code ...


1

To develop apps for SahrePoint Online you should select 'App for SharePoint' instead of Visual Web Part. You can choose from three types of hosting options, SharePoint-hosted, Provider-hosted or Autohosted. To know what are the differences between these options take a look at: http://msdn.microsoft.com/en-us/library/office/fp179887%28v=office.15%29.aspx. If ...


1

already answered here: Activate a feature in feature installed issue and why: The FeatureInstalled method is called when the WSP is loaded into the Farm and the Feature files are copied into the 12 hive. This is done in Central Administration or via the command line (Powershell or STSADM). Because of this, there is no website Context to ...


1

Your validation controls (and your button) should specify a validation group. http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.basevalidator.validationgroup%28v=vs.110%29.aspx


1

Got the answer by testing workarounds. Just I need to write some lines of code in the OnInit() method of form. if (Page.Request.Browser.Type.ToUpper().Contains("SAFARI")) { ScriptManager sm = ScriptManager.GetCurrent(this.Page); if (sm != null) { sm.EnablePartialRendering = false; } } Anything for ScripManger cannot be changed ...


1

Resource files in SharePoint are located in different folders, including these: C:\Inetpub\wwwroot\wss\VirtualDirectories\\App_GlobalResources\ $SharePointRoot$\14\Resources\ $SharePointRoot$\14\CONFIG\Resources\ $SharePointRoot$\14\CONFIG\AdminResources\ $SharePointRoot$\14\TEMPLATE\FEATURES\\Resources\ The target folder you use depends on what kind of ...


1

Based on documentation in MSDN it can't be done using the old regular way. Visual web parts don't directly support SharePoint server tokens such as $SPUrl. For more information, see "Token Restrictions in Sandboxed Visual Web Parts". Visual web parts in sandboxed solutions can't process standard tokens, such as $SPUrl, that the SharePoint runtime ...


1

Here's an example on how to use the SharePoint:SPMenuField on a SPGridView. Basically, you first have to add a SharePoint:MenuTemplate control, then a SharePoint:SPMenuField to the SPGridView columns collection, with the MenuTemplateId pointing to the ID of the SPMenuField control previously created.


1

You can use SPServices to create Cascade dropdowns. SPServices is a jQuery library which abstracts SharePoint's Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install. For ...



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