Tag Info

Hot answers tagged

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

You could use the something like const string scriptKey = "jQuery"; if( !Page.ClientScript.IsClientScriptIncludeRegistered( Page.GetType(), scriptKey ) ) { Page.ClientScript.RegisterClientScriptInclude( Page.GetType(), scriptKey, ResolveClientUrl("~/js/jquery.min.js" ) ); } The key to making this work is that you need to include the same key ...


2

Fixed it by using the following code: private const string _ascxPath = @"~/_CONTROLTEMPLATES/15/VisualWebPartProject/Export/ExportControl.ascx"; Note I just added 15 after CONTROLTEMPLATES.


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


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


1

When attempting to troubleshoot something like this, remember that F12 is your friend. The CSS tab of most browser debuggers - IE, Chrome, Firefox - will allow you to select an element on the screen and see all CSS affecting it. In the case you describe, the menu element or one of its parent containers is being overridden by a style from one of the following ...


1

You are passing two strings (name and WOGLicensetext) to your AppendData function, yet in the function you are trying to access a result object, which probably doesn't exist in that scope. So you should change $("textarea#idTxtArGenHtml").append(result.WOGLicensetext); to $("textarea#idTxtArGenHtml").append(WOGLicensetext);


1

I wrote this code here so I can't guarantee it will work as is. It should get you pointed in the right direction. private Func<string> _func; protected void Page_Load(object sender, EventArgs e) { _func = new Func<string>(GetCurrentUserData); Page.RegisterAsyncTask( new PageAsyncTask( new ...


1

Well, you can still register scripts in a Web Part through the ScriptLink control: <Sharepoint:ScriptLink ID="ctlScriptLink" runat="server" Name="file.js"></Sharepoint:ScriptLink> You can also just embed the JS in a script tag in your web part for the time being to test if the code works (or use a content editor web part on the page). ...


1

This should work. $('#Hide').on('click',function(e){$('#div000').hide(); }); $('#Show').on('click',function(e){$('#div000').show(); }); Add this inside the page load event.


1

There are certain recommended hardware given by Microsoft. Depending on the traffic you get to your SharePoint server you may need to scale your hardware. Writing to a custom list is the general and the safest method considering the set of operations supported by lists. If the server side object model is slowing you down, you can use the Javascript client ...


1

The CSWP can return any content from the search index. Use it on your SharePoint 2013 sites when you are connecting to a search service and want to return indexed search results in your pages. The CSWP returns content that is as fresh as the latest crawl of your content, so if you crawl often, the content that the CSWP returns is more up-to-date than if you ...


1

Open the list in Shareoint Designer and create a new NewForm.aspx - we need the old one in case of a problem. Then, using UI edit, delete the webpart and add yours webpart


1

Create a feature receiver. On activation event use below snippet to change the Page. SPList lst = web.Lists["ListTitle"]; string newUrl = url; var form = web.GetFile(newUrl); if (form != null && form.Exists) { lst.DefaultEditFormUrl = newUrl; lst.Update(); } Also make sure to create those pages using Module and Elements.xml file.


1

No, there is no way to deploy a solution to a particular site collection. A solution is deployed either Globally to all web applications or a single web application. It is the feature inside the solution which can be deployed to a farm/webapplication/site collection/web.


1

Usually you deploy your farm solution to web application, but you activate solution's feature(s) only on desired site collection.


1

You should get the current site collection rootweb url as below String siteUrl = SPContext.Current.Site.RootWeb.Url;


1

You can loop through the XsltListViewWebPart internal controls and hide the Toolbar control like: //Find the ToolBar control and set visible to False foreach (Control ctrl in webpart.Controls) { if (ctrl.GetType() == typeof(ViewToolBar)) { ctrl.Visible = false; break; } } Or you can use Reflection to set the Toolbar to none for View, ...


1

When you use Visual Studio to build your visual web part. In the Feature Design mode we you gave the scope of feature as Farm by mistake and when we try to deploy the solution you will get the error message. "Error occurred in deployment step 'Activate Features': Feature with Id XXXXXXX' is not installed in this farm, and cannot be added to this scope". ...


1

Separating the recipient addresses by commas is acceptable: http://social.technet.microsoft.com/Forums/office/en-US/e68c8f84-cd95-4d9f-bcdf-2609b9cdf315/sending-one-email-to-multiple-recipients-only-one-gets-the-email?forum=sharepointgenerallegacy You may want to try the same troubleshooting steps as shown in the accepted answer: The string format of ...


1

You cannot read directly from the webpart. But you can however write the values out in the control. Controls.Add(new LiteralControl(String.Format("<script type='javascript'>var customWebPartProperty1 = '{0}';</script>", myWebPart.CustomProperty1))); You can also write them to hidden fields in the webpart instead if that makes it easier.


1

Make a standard web link in the format mailto:user@domain.com


1

After dtRow["Name"] = user.Name; dtRow["Email"] = user.Email; Write dtRow.update(); Well, speaking more broadly, whenever you make a change to a list item, make sure you cal the update method to actually make the changes to the list item.


1

You can try the following code snippet: using (SPSite site = new SPSite(args[0])) foreach(SPWeb web in site.AllWebs) { //SPUserCollection allAdmins = web.AssociatedOwnerGroup; SPGroup ownerGroup = web.AssociatedOwnerGroup; if (ownerGroup != null) ...


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

You can use this 3-rd party web part - Sharepoint Change Password Web Part



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