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

learn more… | top users | synonyms

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 ...
8
votes
4answers
4k views

Problem with HTTP Handler deployed on Sharepoint 2010

I've developed a Visual Web Part for Sharepoint 2010. I've used VS2010 to do that and tested the Webpart in a testing server using VS to do the deployment. But to deploy it on the production server I ...
7
votes
3answers
3k views

How to asynchronously load and refresh a Visual Web Part?

We have developed a Visual Web Part for Sharepoint 2010 with Visual Studio 2010 (Visual Web Part project template). The web part loads some stuff and shows a list of items. It takes some seconds to ...
6
votes
2answers
9k views

Difference between WebPart & Visual Web Part

I'm not sure how Visual Web Part is different from the actual Web Part in SharePoint 2010. Thanks!
6
votes
1answer
205 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 ...
5
votes
1answer
1k views

How to check for IsPostback in Visual Webpart

I have created visual webpart in SharePoint 2010 which will generate class file for class derived from Webpart and second for UserControl. Now I have TabStrip Control on .ascx markup. Now I want to ...
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 ...
4
votes
1answer
837 views

How to create a multilingual visual webpart in SharePoint 2013

Have anyone ever implemented multilingual visual web part in SharePoint 2013? I see there are many links out there on this topic but they are not cohesive and complete. I don't know how can I address ...
4
votes
1answer
3k views

How to get Attachment URL Programatically From Sharepoint ListItem?

How to get Attachment Full URL Programatically From Sharepoint ListItem? Explanation: I have adding new item with attachment. Now i have to bind that attachment link to grid. When click on that link ...
4
votes
1answer
576 views

Visual web part - data binder issues

We have couple of lists in our application. Application types is a list which contains information about various applications - name, description and icon (as URL field with image format). Second one ...
4
votes
2answers
1k views

Create a custom error page to redirect to instead of generic AccessDenied.aspx?

When a user has not been given permissions to a particular site they receive the ugly "Error: Access Denied" page. Is it possible to capture this on one particular team site (via custom webpart) and ...
3
votes
1answer
2k views

How do I retrieve a user's LogIn name through the Created By column of a specific item in a document library

Created By Field Returns the following: 1073741823;#System Account I want the following without string manipulation (i.e. without using substring to remove all of the characters before ";#"): ...
3
votes
5answers
2k views

Visual web part and custom web control - can't register

I have created visual web part and copied custom web control which I'd like to use. My control looks as below: namespace AppsListWebPart { [ToolboxData("<{0}:CustomImageButton ...
3
votes
3answers
3k views

How to change active directory password from webpart?

How to change active directory User Account Password using code?
3
votes
2answers
2k views

Page.ClientScript.RegisterClientScriptInclude in Sandbox?

I'm trying to use jQuery in a Sandboxed Visual WebPart (2010): protected void Page_Load(object sender, EventArgs e) { string jQuerySrc = Page.ClientScript.GetWebResourceUrl(this.GetType(), ...
3
votes
4answers
441 views

Problem with Visual web part

Good day! I have an event handler that, when you add a document to the library redirects the user to a web form with the parameters of the document. In the web form, it displays the current user in ...
3
votes
1answer
611 views

Show asp.net webpart elements based on user permission level?

I want to do the following: I have a webpart and two users (not in groups, though, because for a reason I don't understand there are no groups in the productive environment here ;) ). One stands ...
3
votes
3answers
1k views

How to create and write xml file in sharepoint layout folder using visual studio(Programatically)

How to create and write xml file in below url using visual studio(Programatically). web.Url + "/_layouts/MyPoject/Generated.xml" I want to generate xml programatically inside MyProject Folder. ...
3
votes
1answer
285 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 ..
3
votes
1answer
204 views

Error: Sharepoint 2010 Web Part appears to be causing a problem. Invalid temp directory in chart handler configuration

I have a sp2010 website where I am trying to use a network path for the images as I have a WebFarm which is loadBalanced using CISCO ACE appliance hardware (without IP Stickiness). The reason I am ...
3
votes
1answer
815 views

Setting the DisplayFormURL of a CalendarView item to an absolute URL, SPCalendarView control

Background: I have a WebPart that makes use of the SPCalendarView control and in it I add items (events) dynamically from different Calendar lists from multiple sites. like this (please note that I ...
3
votes
1answer
347 views

Intellisense for Visual WebParts (ASCX) and Custom Application Pages (ASPX) in VS 2010

How can I enable intellisense for visual webparts (.ascx) & custom application (aspx) pages in VS 2010? It would save me a lot of time! Thanks in advance.
3
votes
0answers
185 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.
3
votes
1answer
171 views

Why Microsoft.SharePoint.WebControls over System.Web.UI.WebControls? [closed]

I am building visual web parts for SharePoint 2010 Foundation, using ASP.NET 3.5 in Visual Studio 2010. For those who are new, these are like making a custom "normal" .net control that you can drop ...
2
votes
5answers
2k views

Adding new webparts to an already deployed solution

I have a webpart project built in visual studio 2010 and it has been deployed successfully to my production environment. I recently had to make some changes to the webpart and also needed to add a ...
2
votes
2answers
90 views

SharePoint Visual Studio Development

I need to understand the best practice for developing SharePoint solutions for sites that exist already on the production server. I am currently trying to create a visual webpart for a list that ...
2
votes
2answers
1k views

How to set visual webparts to load one after - another sharepoint 2010

I have a webpart page which have 2 custom visual webparts. When i set the debugger point on both the page loads of the webpart the 2nd visual webpart debugger is hit...that makes me think the 2nd ...
2
votes
4answers
1k views

Refreshing page or making it to respond after downloading the file. All happening in Webpart

I'm having a Visual Webpart that allows user to select Managed Properties and find out what is stored inside it. The result is displayed inside a gridview which he/she can export it to excel. It is ...
2
votes
2answers
761 views

One Visual Webpart Multiple Times On Page (problems saving personalization state)

I have a requirement for building a budget report which has the same key fields for 6 different categories. I have written a visual web part which pulls a listitem for each section and displays the ...
2
votes
1answer
917 views

How do I set the Default Value of a TextBox ToolPart without using [DefaultValue(“Default Value”)]

Right now I have created a bunch of custom controls in the ToolPart panel and I want to set a default value for one of the text boxes. Obviously I want the value to be editable by the user. I have ...
2
votes
1answer
64 views

Create a VisualWebPart from Picture Library

I've a Picture Library to which I added pictures,now i want to create a Visual Web Part which displays a list of pictures added to library like this I created the similar design in ascx file like ...
2
votes
3answers
848 views

Retrive data using Caml Query Join Operation

How can I retrieve data from two SharePoint List using Join CamlQuery ?
2
votes
5answers
1k views

How to detect where a memory leak is in my application?

I have a web part that loops through web apps, sites, and webs. I'm using DoesUserHavePermissions() to check whether or not the user has access to the site. I'm getting an error and I've made sure to ...
2
votes
2answers
740 views

sharepoint webpart property disappear after a day (C#)

I developed a custom webpart with a webpart property with some textboxes and it works partially. If I deploy the project, the written text in the property is away. This is ok. But my MAIN Problem ...
2
votes
2answers
2k views

Is it possible to use a DLL in a webpart that does not have a strong name?

My Sharepoint project has a webpart, which references dlls without strong names, which in turn further reference other dlls without strong names. Is it possible to add these dlls to sharepoint ...
2
votes
1answer
82 views

Reading Web Part custom properties using JavaScript client object model in SharePoint 2010

Is it possible to read visual web part custom properties using Java script client object model in SharePoint 2010?
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 ...
2
votes
1answer
451 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?
2
votes
1answer
66 views

How to Retrieve the Data from an Individual Blog Post

I am trying to brand a blog post according to our standards, and to do that I have simply created a custom visual web part to take the place of the SharePoint default. What I am wondering is how am I ...
2
votes
1answer
465 views

Send emails to multiple recipients via contactform webpart

Happy new year everyone, so I'm creating a contact form webpart for my event management system at the moment which has a checkbox "send to all attendees". I'm using the SPUtility.SendEmail method to ...
2
votes
1answer
1k views

Adding Report Viewer Control on Custom Web Part ASCX Control

I am trying to use Report Viewer control in one of my custom web part (on ascx) of SP 2010. As I drop the report viewer control on my ascx it register its assembly on top with assembly version ...
2
votes
4answers
612 views

Issue with Sharepoint DateTimeControl

DateTimeControl is inside grid and I bind the grid inside !ispostback section, on row databound of grid I find that datetimecontrol and disable it. When button click event (outside of grid), the ...
2
votes
1answer
690 views

Visual Web Part vs Visual Web Part (Sandboxed)

While I was creating a visual web part in Visual Studio 2010, I also saw an option to create Visual Web Part (Sandboxed) under Visual Studio Template Gallery. I need to know how does a Sandboxed ...
2
votes
1answer
592 views

Displaying SPChange data in visual webpart

Here is some code I've been playing with to display all items that have been changed in a web and all subwebs in a visual webpart (it grabs a heap of info and chucks it in a label): protected ...
2
votes
1answer
3k views

Cannot add WebPart to master page using SP Designer

I've built a WebPart for a SharePoint 2010 site. I need to add it to one of its master pages (using SharePoint Designer), and when I select it from the WebParts menu I click it but I don't see it ...
2
votes
2answers
668 views

VisualWebpart - controls like radiobuttonlist and dropdownlist not firing the SelectedIndexChanged event when inside a repeater datarow

VisualWebpart - controls like radiobuttonlist and dropdownlist not firing the SelectedIndexChanged event when inside a repeater datarow. Any help? Source code: ...
2
votes
1answer
177 views

Visual Web Part Property Validation in Sandbox Solution [SharePoint Online 2013]

How can I validate a custom web part property in a Sandbox solution (SharePoint Online 2013 environment)? I am throwing a WebPartPageUserException when validation fails, as shown below. private ...
2
votes
2answers
697 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
590 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 ...
2
votes
0answers
1k views

Why Sharepoint FormField's ID is parametrized and how it can take different values after its initial creation?

In SPD 2010, on designer surface of a web part page I insert DataFormWebPart by: "Current Data Source" ("Data Sources Details" Task Pane) --> choose rows --> "Insert Selected Fields As.." --> "New ...