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

learn more… | top users | synonyms

1
vote
1answer
1k views

Add a visual web part to the default page of the custom site definition via ONET.xml file

We have created a SharePoint solution with custom site definition and a simple visual Webpart using Visual Studio 2012. The purpose of the solution would be to add the custom visual webpart to the ...
0
votes
1answer
313 views

Using SharePoint resource file in my web part

I have a SharePoint application and for that I have created resource files which are inside App_GlobalResources folder. I am making a visual web part and want to use those resource files rather ...
1
vote
1answer
585 views

Check box in gridview should update the splistitem check box

I am a newbie in visual studio. I have a Sharepoint list which contains the following fields group name, user, section and active(which is a check box) . I have a grid view visual web part which will ...
0
votes
0answers
168 views

SPServiceContext class not available in SharePoint

I have made a web part in Visual Studio in which I am using the following class: Microsoft.SharePoint.SPServiceContext It is working fine. Then I created a new visual web part project and tried to ...
0
votes
1answer
217 views

Unable to create Image Slider web part using slideShow.js

I want to make the web part for image sliding for Picture Library. I got this link for doing so. My code for visual web part is : <!DOCTYPE html> <html> <head> <meta ...
0
votes
1answer
101 views

Custom Web Part property is applied to all web parts when configured

I am facing an issue with SharePoint 2010 Web part Properties. I have created a Custom Web Part Property with Boolean type. Now I am adding this web part to 3 different pages when I set this ...
0
votes
1answer
255 views

Visual Studio WebPart to get the item being edited to replace List Edit Form

I had created a web part in Visual Studio 2010 for Sharepoint 2010. I added all the fields, implemented cascading dropdowns, custom panel and bind the data using Sharepoint SPLists var ...
1
vote
2answers
2k views

How to separate Title and Url from hyperlink field?

I have created a column which is of type Hyperlink or Picture. I want to display the list of links in web part, in such a manner that title should appear as text and the Url should be bound in that ...
0
votes
1answer
56 views

Cant access variables assigned in OnPreRender in a click event

Im trying to break down a problem Ive been having for several days. And I think it comes down too the code below. When I assign stuff in OnPreRender, I cant access them with my click event. What am I ...
1
vote
1answer
1k views

SharePoint 2010 Visual Webpart vs SharePoint 2013 Visual Web part

Having a SharePoint 2013 installation, I wanted to try creating a web part for SP 2013. I opened visual studio 2012, I could see, project templates for SharePoint 2010 visual web part and SharePoint ...
0
votes
2answers
102 views

Unable to store the uploaded file to the Images mapped folder

I have a file upload control in my visual web part which will enable user to select the image. I want to put it in the mapped folder. My code is: if (flPicture.HasFile) { SPSite ...
1
vote
1answer
299 views

User profile picture in visual web part

I want to make user upload the profile picture in my web part, I searched over the internet how to accomplish this? I found the this post which describes how to get it. My code is: void ...
1
vote
1answer
1k views

How to get selected terms from Taxonomy web tagging control

I have created a web part in which there is one taxonomy picker control to enable user to select department. I want to store the selected term to the list column which is of type Managed Metadata. ...
1
vote
3answers
236 views

Storing WebPart property per user who does not have enough privileges

I am implementing a webpart, where user can change some information of the webpart itself. I store this information in webpart property. [WebBrowsable] [WebDisplayName("Group name")] ...
0
votes
0answers
32 views

I would like to hide/show properties on a visual webpart based on permissionlevel

I have a few custom properties on my visual webpart that I don't want everyone to see, now I know that I can change the normal custom properties but I also built a webpart editor. I use this for a ...
0
votes
3answers
2k views

Unable to validate sharepoint date time control

I have added a <SharePoint:DateTimeControl> in my visual web part and I want to make it mandatory. To do so I referred this link and used as per my code. My code is: <tr> <td> ...
0
votes
0answers
102 views

ClientPeoplePicker control & TaxonomyWebTaggingControl stopped displaying used in visual web part

I developed a visual web part in which I have used the <SharePoint:ClientPoplePicker> control choose the users. It worked perfectly the day I created(before 2 days) but now it's not working. ...
1
vote
1answer
603 views

How to make taxonomy picker required when used in visual web part?

I have created a visual web part in which user has to specify a field's value from taxonomy picker control. I want to make that value mandatory. The control is placed successfully but when I use the ...
10
votes
3answers
2k views

Visual Studio 2012. Visual webpart's ascx.g.cs file empty after registering any control

I've discovered a problem when a Visual webpart's g.cs appears to be empty. I'm using Visual Studio 2012 Update 3 and a project for SharePoint 2010. The steps to reproduce the problem: in Visual ...
0
votes
1answer
602 views

Adding a custom control in visual web part

Can anyone please provide steps or a link for deploying a visual webpart with custom control in sharepoint 2013?
0
votes
1answer
1k views

Creating and deploying a visual webpart using VS 2012

I'm new to sharepoint. I managed to create a visual web part in VS 2012. But I don't know how to deploy it properly. I only added a button control to the webpart page. After that I used F5 to deploy ...
1
vote
2answers
226 views

Error Register Assembly visual web part

I'm developing a web part in SharePoint 2013 using VS2012. In this web part I'm trying to use third party dll controls like telerik but i face a problem : Could not load file or assembly...... and ...
0
votes
0answers
42 views

Add content to Web Part from Modal

I'm showing a button, when editing the web part, so the user can click and a modal popups up. This modal should have a couple of option, doesn't matter now, but then I want to save the content so that ...
0
votes
1answer
46 views

I can't find the markup for webpart properties in visual studio

I've created a custom web part editor but I don't know where to look if I want to find the markup for all the properties of my webpart inside visual studio. I mean I can create new controls on ...
0
votes
1answer
130 views

Getting Term name from clicked Managed Navigation Item

I have created a Term Set (Channels) which is marked as "Available for Tagging" and "use this term set for Site Navigation" and for its "Target Page Settings" I chose Topics.aspx in pages list. This ...
0
votes
0answers
232 views

SharePoint 2013 Updatepanel Idle

I have implemented AJAX update panel on my SharePoint visual web part. The web part contains two dropdownlists and and a grid surrounded by update panel. The page is working fine in Chrome/Safari/IE ...
1
vote
4answers
1k 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
2k 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, ...
0
votes
0answers
224 views

gridview in visual web part in SharePoint 2013 not showing table borders

I have a simple gridview in a visual webpart project that displays data from SQL, The grid shows up well when deployed to sp 2010 but when deployed to sp 2013,(built in VS 2012 & then deployed) ...
2
votes
2answers
633 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
510 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
993 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
86 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 ...
0
votes
0answers
165 views

Programatically getting SharePoint 2013 document uploader destination folder structure

I want to add documents to my document library folders programatically. I don't know how to get the destination folder structure to upload documents to SharePoint. How do I get destination folder ...
1
vote
2answers
489 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
357 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
322 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
77 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
901 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
543 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
5k 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
119 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
435 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
113 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
1k 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
66 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
255 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
211 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
41 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
110 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 ...