Tagged Questions

Visual Web Part is a Web Part built using a User Control (.ascx)

learn more… | top users | synonyms

1
vote
4answers
2k views

How to enable site collection feature by default when deploying a visual webpart from visual studio?

I am making a visual web part in SP 2010 using visual studio 2010. I want it so that when I add and deploy my wsp file, it should by default keep the site collection feature activated for the web ...
0
votes
1answer
3k views

How to get a document library URL from c# in visual web part?

I'm making a visual webpart in a sp2010 environment. I am trying to get the document library URL. I have this code so far: My variables are not getting the right values. Like the libraryURL, ...
2
votes
2answers
825 views

Error: This page contains content or formatting that is not valid. You can find more information in the affected sections

I have a web part code with no controls on it. This web part simply checks the current login user entry in a custom list. If found the user can access the home page else it redirects the user to a ...
2
votes
2answers
773 views

How to add Visual web part deployed using wsp file?

I have created a visual web part using Visual studio 2010. I want to deploy that Visual web part in another site using .wsp file created by building the solution in Visual studio 2010. I have ...
0
votes
3answers
1k views

How to get a creation date from a SPListItem that is a folder in c#?

I am making a visual webpart in SP 2010, and I download the SPListItems from a document library. I need to get the creation date of all the documents and folder items. I can do it successfuly for ...
0
votes
1answer
95 views

SharePoint 2010 Visual Web Part development @_parser.AddParsedSubObject LiteralControl WebPartPageUserException

I am using SharePoint 2010 Foundation on a vmware virtual machine. I am using Visual Studio 2012 update 3. I am working on a visual web part project. I have so far in this project only used asp.net ...
1
vote
2answers
591 views

How to embed resources in a visual web part

I am creating a visual web-part that has a few images, a CSS file and a java-script file, but i'm having issues. Can someone please tell me what I am missing or doing wrong? I have added the files ...
0
votes
4answers
488 views

chart webpart Sharepoint 2010

how to create a custom web part/visual web part that will generate a chart from an existing sharepoint list. Is there any possible way of doing this aside from using the OOB Chart Web Part? We have ...
0
votes
1answer
374 views

How to create a custom chart webpart

I would like to create a custom web part/visual web part that will generate a chart from an existing sharepoint list. Is there any possible way of doing this aside from using the OOB Chart Web Part?
0
votes
1answer
82 views

How to detect if the user exited page edit mode?

I am making a visual web part for SP2010, and the webpart hides shows content depending on if there was a postback or not. However the only exception to this, is the postback of exiting the page edit ...
-1
votes
1answer
1k views

How to use SPSecurityTrimmedControl to check if current user has edit rights to current page?

I am making a visual webpart in SP2010, and I want to use this below to only show content if the current user has edit rights to the current page: <SharePoint:SPSecurityTrimmedControl ...
0
votes
1answer
705 views

What is the scope of SPContext.Current.Web.GetList?

In my visual web part for sharepoint 2010, I use the function SPContext.Current.Web.GetList("myserverrelativeurl") to get a document library. But I noticed this only works if the link is in the same ...
4
votes
3answers
6k views

Error occurred in deployment step 'Recycle IIS Application Pool': Object reference not set to an instance of an object

I get this error in the deployment step of a share-point farm based project. Most of the suggested solutions on the net are a simple Visual Studio re-start, however, a simple VS restart won't fix ...
0
votes
0answers
137 views

Is there a way to make a SPGridView look like XSLTListViewWebPart?

is there a possibility to make an SPGridView (or any other WebControl) look like an XSLTListViewWebPart? I want to mimic a sharepoint list, but can't use a plain list, since i have calculated data ...
1
vote
2answers
599 views

jQuery.noConflict() and Sharepoint 2010 WebParts

I've made two webparts for Sharepoin 2010 with jQuery plugins fancybox (slider) and cycle (slider). I need to locate both webparts on one page. But it doesn't work. I tried to use jQuery.noConflict() ...
0
votes
3answers
139 views

Is there a way to say getitembyid and use caml query to get no fields?

In my visual webpart, I want to get an item by it's id from a document library, and change it's field value. I don't want to actually read any of its field values, so I was wondering is there is a way ...
2
votes
1answer
2k views

How to check if user has read/write permission for a SPListItem in c#?

In my SP2010 visual webpart, I am checking permissions with the code below. Basically the current user is either an admin or a regular user. If they are an admin, they need to have permission to edit ...
1
vote
2answers
71 views

ModalupDialog not Working Properly

i had made Modalupdialog for Document Upload fro following Cod. <script type="text/javascript"> function RedirectUpload() { var tempUrl = ...
0
votes
0answers
328 views

Getting error when doing a jquery ajax funtion to a webpart aspx page

I want to send data using ajax from jquery to c# (note: im sending request to the same page). I am following this tutorial http://encosia.com/using-jquery-to-directly-call-aspnet-ajax-page-methods/. ...
0
votes
1answer
291 views

Call WCF hosted in SharePoint from JQuery

I created a WCF Service hosted in JQuery, when I navigate to the web service in browser and pass a parameter to it, I get back the data correctly, for example like this: ...
1
vote
0answers
42 views

SP2010 - Visual Web Part - Storing metadata in folders in document libraries

I want to store a number to folders to enforce ordering. I noticed these three pages http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfolder.getproperty.aspx ...
0
votes
1answer
124 views

SP 2010 Visual Webpart - How to get all documents in a folder and sort them by caml query?

I am making a visual web part for sharepoint 2010. I have a SPFolder object and I want to get all items in it, but I want to sort it by a specific field. I want to do this by CAML query instead of ...
1
vote
0answers
370 views

CreateChildControls() in Visual Web Part in SharePoint 2010 called twice

(x-post from http://stackoverflow.com/q/17065543/1943) I have a Custom SharePoint 2010 Visual Web Part which I've realized is calling the CreateChildControls() method twice. I've tried setting the ...
3
votes
1answer
349 views

Create Password Field in webpart properties

I have created a custom web-part. this web-part have a custom web-part properties. i want a Password field in this property. How can i do this ? Any help will appreciated ..
0
votes
1answer
73 views

Sandbox Visual Webpart Not Adding BulletedList Control

I have a sandbox visual webpart (got it by installing SharePoint Power Tools) and in that I have a "Place Holder" control named "phMsg". I am adding a "BulletedList" control to that place holder in ...
1
vote
0answers
43 views

Issue between user control and Visual webpart

I have user control in my master page (countrycontrol.ascx) on clicking the user control It will show links, user is allowed to select the country based on the selected country the visual webpart need ...
0
votes
1answer
102 views

Pass user credentials to JSP website from SharePoint website

I have developed a JSP website. I also have a SharePoint server based website. Let's call my JSP website to be www.xyzjsp.com and my SharePoint based website to be www.mySPwebsite.com How can I ...
1
vote
1answer
480 views

Set Web Part Recommendation Settings in elements.xml or .webpart file

Is it possible to set the Recommendation Settings of a WebPart in the elements.xml or .webpart file? Just like you can do with Group, Title and Description...
0
votes
2answers
9k views

How to add jQuery script to a custom visual webpart?

Similar to some previous questions, I'm trying to use jQuery in a visual web part but I keep getting that jQuery is undefined. I've added the jQuery script to SiteAssets as well as a script folder ...
1
vote
1answer
375 views

Can I use a .net 4.0 dll assembly reference in a .net 3.5 sharepoint web part?

I am using some dll's from the crm 2011 sdk in a .NET 3.5 web part.The target is for SharePoint 2010 online. When I try to build it gives me the following error: The primary reference ...
1
vote
1answer
360 views

I want to make a weather webpart that displays temperature by using Api like Google or yahoo

I want to make a Weather web part form any api. I have searched on Google but could not find any good solution. So, any link or suggestion or steps for that?
1
vote
2answers
1k views

Add visualwebpart with vs2012 does not add an ascx path

I am making a visual webpart with custom properties. Basically its a link button which Text and Url properties can be set by the user via web part properties. All samples I have seen say that in vs ...
0
votes
2answers
42 views

Using sharepoint 2010 on another server in VS?

How can I use sharepoint 2010 that is on another server in VS? When I try to create a new project for creating visual web part, A message "Sharepoint not installed on this client" is showed.
0
votes
1answer
162 views

display Multi parents-childs dynamic Diagrams in sharepoint web access

We design KMS (Knowledge Management Systems) with SharePoint that everything is OK but we need to Display relations between entities,Documents and etc. in Web access. my question about solutions: ...
1
vote
0answers
106 views

Import Error on ChartDataProvider Webpart

My Sharepoint project contains a visual Webpart which retrieves data and works fine. In addition to that, I want to display some Chart webparts which visualize this data. In order to do so, i added a ...
0
votes
1answer
413 views

2007 templates broken in 2013

We're upgrading to SP2013 from 2007 and using 2010 as a stepping stone for the DB upgrade. (This is all out of production, we're building a plan to do production) The problem we're having is that many ...
1
vote
1answer
103 views

Duplicated datatable showed to all users

I'm trying to code a visual Webpart in sharepoint2010 where users can fill out a form to order meals, you can order meals for several persons at once. The form fills a static datatable which in turn ...
6
votes
1answer
224 views

Protect wsp file from Reverse Engineering

How to protect wsp file so no one can read my source code. When we change wsp file extension from wsp to zip, it gives all dll file and this dll can be extracted from .net reflector and get all source ...
0
votes
1answer
222 views

How to use dynamic or relative path in SPList object?

I am using the following code to read a picture library: SPList list = SPContext.Current.Web.GetList("http://win-12/sites/mysite/ImageLibrary") Problem is, in above code "win-12" is my machine name ...
-1
votes
1answer
150 views

How to access Literal conrol from Visual Web Part code file

I have added a literal control in my visual web part VisualWebPart1.ascx file as follows: <asp:Literal id="slider"></asp:Literal> I am trying to access it in VisualWebPart1.ascx.cs file ...
1
vote
1answer
2k views

Visual WebPart does not recognize tag for resources

I created a visual webpart from VS2012. The headers of the ascx page are <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Assembly Name="Microsoft.Web.CommandUI, ...
2
votes
1answer
500 views

need to display image of the user in the people picker, Sharepoint 2013?

In the people picker, the attributes it shows are name,designation and their online or offline status, Is it possible to display the image of the person?
0
votes
2answers
481 views

Users can't see css on my visual webpart

I'm trying to add some css on my webpart for the first time in SP2010. But for some reason the css only works when you visit the site on the sharepoint server. I belive it's the href path because it ...
0
votes
1answer
87 views

Member Variable / public property null on postback

I have a sandboxed visual web part (created in VS2012) when I initially load my web part and its child controls I set myProperty to a value retrieved from the database. When I fill out the relevant ...
1
vote
1answer
707 views

How to deploy SharePoint 2010 Sandbox solution on SharePoint 2013 Office 365

I have developed a SharePoint 2010 Sandbox solution in Visual Studio 2012 which has been deployed on Office 365 SP2010. The solution contains custom lists, visual web parts and workflow activities. I ...
0
votes
2answers
334 views

Sharepoint 2010: Saving content of a textbox back to a variable of a visual web-part

not sure if this is even possible. What I'm trying to do is create a visual web-part for SharePoint 2010 (using Visual Studio 2013) that will allow the user to add the web-part to a page then add data ...
3
votes
0answers
217 views

Change month in SharePoint MonthlyCalendarView control

How to change month in SharePoint MonthlyCalendarView Control? It seems, there is no way to change month in calendar or change view of calendar.
0
votes
1answer
1k views

How do I get the list item ID of an item I just created in a Visual Webpart

I have a visual webpart which creates a list item, but I need to reference the newly created item's ID for later use in the same webpart. How would I do this in C#? Thanks
0
votes
1answer
309 views

How to make different permission on document library?

I want to make document library that can filter view from the user organisation by region. In my Institution has 3 levels that has different level of access file. The hierarchy of user level can be ...
1
vote
1answer
90 views

WebPart on Top of Displayform for Custom List, ListItem deleted => Server Error

so I have a visual webpart for registering/unregistering for an event on top of a custom lists' ("events"-list) display form (added via &ToolPaneView=2). Now my use-case is this: potential ...