Tag Info

Hot answers tagged

7

I had the same problem today. I compared the project files with an older version. In my case the Package directory (with the files Package.package and Package.Template.xml) was missing. After copying this directory back from the older version of the project and modifying the csproj file to include the references to the package directory, the error solved ...


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 ...


4

You'll need the full four part assembly name, with the Assembly, Version, Culture and PublicKey, to reference an assembly in the GAC.


3

change your code to: <Taxonomy:TaxonomyWebTaggingControl runat="server" ID="taxProjectOwnerDepartment" Visible="true" IsMulti="false" IsDisplayPickerButton="true"> </Taxonomy:TaxonomyWebTaggingControl> <asp:CustomValidator ID="rfvProjectOwnerDepartment" runat="server" OnServerValidate="validator_ServerValidate" /> now in your ...


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

When working with URLs in SharePoint, there are two very helpful utility classes: SPUtility and SPUrlUtility There are three different kinds of url used in different properties of various SharePoint objects: absolute, server-relative and site-relative. One need to be careful with them, especially when site collection is not located directly at web ...


2

Use following code to get the creation date of folder: item.Folder.Item["Created"]


2

You can add the layouts mapped folder to your project and keep javascript and css files there.You can then use ScriptLink class to register the js and CssRegistration class to register the css in the Page_Load method of the webpart. Following is the example: private const string script = "/_layouts/JQuery/JS/jquery.min.js"; ScriptLink.Register(Page, script ...


2

For Site and Web scoped feature, only way is to use the powershell to activate the feature after it is deployed. (But for Farm and Web Application scoped features, Go to the manifest of your feature and set "ActivateOnDefault" to true, this will cause the feature to get activated automatically whenever the solution is deployed using powershell or central ...


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

your code is fine appart from one part, you looping on the validation! you need to set date type at the end: so you have: ControlToValidate="dtcProjectPlannedEndDate$dtcProjectPlannedEndDate" should be: ControlToValidate="dtcProjectPlannedEndDate$dtcProjectPlannedEndDateDate" i got that from the error you shown: Unable to find control id ...


2

Use (!this.Page.IsPostBack) in Sharepoint


2

TaxonomyWebTaggingControl on the server side TaxonomyWebTaggingControl.Text Property is used to set or get value that represent a Term object Get values from this control as pairs of labels and GUIDs. The delimiter between a label and a GUID is the | character. When using multiple values, delimit them with a ; character. Example: ...


2

You can not upload files to the hive like that. In this case you would have to upload the image to a Library on your SharePoint site/web Read more about the Hive folders here (for 2010 but still very valid if you replace 14 with 15). Since these folders are virtual, every single site and web in your SharePoint Farm will have access to, and use the same ...


2

AFAIK, the "SharePoint 2010 - visual web part" solution template will create a web part targeted at SharePoint 2010, while the other will create a web part to be deployed to a SP 2013 farm. If anything else, the referenced assemblies would be different so I strongly advise against mixing the two (that is - assuming that VS actually allows you to do that). ...


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

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'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

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 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

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 ...


1

Please try to delete this line: <?xml version="1.0" encoding="utf-8"?> after <![CDATA[


1

do know if this is a typo or not but shouldnt it be like this: protected void Button1_Click(object sender, EventArgs e) { CheckBox chkStatus = null; chkStatus = (CheckBox)sender; bool status = chkStatus.Checked; string strBoolean = Convert.ToString(status); SPSite oSiteCollection = SPContext.Current.Site; using(SPWeb oWeb = ...


1

You have made your WebPart property static. That is why all instances of the WebPart are sharing the value. It should be: public Boolean WP_EnableRatingsPages; [Category("Extended Settings"), Personalizable(PersonalizationScope.Shared), WebBrowsable(true), WebDisplayName("Enable Rattings"), WebDescription("Enable Rattings")] public Boolean ...


1

If oplLink is a hyperlink fieldtype, then you can implement what I explain in this answer: Duplicate response Since you are already using code to get the items you want, you might as well take it one step further and alter the DataTable by creating a new DataTable Example: protected void Page_Load(object sender, EventArgs e) { DataTable dt = null; ...


1

just save the image to a Sharepoint Library, here's a post :http://johnlivingstontech.blogspot.com/2008/06/upload-file-to-sharepoint-document.html


1

please refer to my other post for uploading files to a list! openfiledialog in webpart just to make it clear, when uploading its using the url not the location of list! so goto your list and get the relative path and not the name of the list ;) as an example i did this for client side app to upload to a sharepoint image document library ...



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