.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Web Part Versioning and Deployment (properties only)

Posted By:      Posted Date: August 26, 2010    Points: 0   Category :SharePoint

Suppose I have a 3<sup>rd</sup> party Web Part (source code provided, with Web Part deployed as a Feature) that’s installed and used in several Sites within a Site Collection.  I want to make changes not to the source code (which would require updating the assembly and deploying the changes as an updated Feature/Solution Package), but to property values of the Web Part that exist.  Say the WP exists on 10 pages, and I want to change the WP’s Title property from “Amazing Vendor Web Part” to “My New Title”.


First, would this be considered an “out-of-band” patch?  Not that it matters terribly how to label this…


Second, would the ideal approach be to simply add code within a Feature Receiver in that Web Parts VS project (the Feat

View Complete Post

More Related Resource Links

.NET Zero Deployment: Security and Versioning Models in the Windows Forms Engine Help You Create and


Windows Forms applications solve many of the problems inherent in building Web applications the old fashioned way?with HTML. To demonstrate the use of Windows Forms over the Web, the author takes his existing app, Wahoo!, and ports it to Windows Forms. In doing so, he discusses versioning, linked files, security, storage isolation, the deployment model, and everything else you need to get started building your own Windows Forms apps for the Web.

Chris Sells

MSDN Magazine July 2002

Customizing Web Part Properties


 I am writing a web part for SharePoint. To define a custom property that will render as a dropdown list in tool pane For That I need the variable in a type of enum.But that dropdownlist has to be populated dynamically(i.e droplist items are supposed to the list&document lib names in the entire site collection),Which is not supported by Enum.I am extremely new to coding.any help is highly appreciated .

Thankz in advance.



Web Part Namespace & Deployment Question



I have a web part deployment and development question. Probably newbie questions..

For web parts which will only be used in certain web applications, I can definitely see creating custom CAS policies etc.. and deploying the dll only to the Bin of the Web Application, but what is the best practice for deploying a Farm wide web part that everyone will use?

I assume it goes in the GAC, and additionally, are there any best practices as far as the namespaces for web parts when they are going into the GAC?

For example, if I go into the Assembly folder and look at all the assemblies in the GAC, is it "okay" to have various globally deployed web part assemblies in there? Like, "MyCustomWebPart" sitting in there with the other sharepoint assemblies? Seems messy to me, but if these are "one-off" web parts that won't have a bunch of classes within a single namespace, it seems like what needs to be done.

Hopefully that was clear enough!

Custom Web Part deployment with class library reference

Hi All, We have class library as a project in our solution as well as a web part project. Our web part simply references and executes a service utility class in the class library and outputs it into a label. The deployment is successful but when attempting to add the web part to the page, it comes out with a error page saying "File Not Found" with a correlation ID and date/time reference. Once we take out the code that executes the utility class, it deploys fine and we're able to add it to the page without any issues. It seems evident that any reference to our class library causes this "File Not Found" issue... but we're not sure how to implement this solution. Any ideas? Do we add the class library dll directly into the GAC?  If so, how? Is there another reference we have to implement in the AssemblyInfo.cs?  If so, what does that look like? Any help is appreciated. Thanks, Eric

Visual Web Part Deployment

I have Visual WebPart that developed using VS 2010. Now I want to deploy that web Part in different server. There VS 2010 is not installed. When I using the command "Package" in VS 2010 one .wsp file is created in bin folder. But using that .wsp I can't do the following task: 1. Add safe control entry. 2. Place .ascx file in "Control Template" folder. can anybody tell me what is the process of deployment in VS2010 and SharePoint from One server to another. In VS2008 one setup.bat file was created that I can use for first time to create safe control entry and other staff but there is no so such file is created in VS 2010. Can anybody halp me on that.  Thanks tat --- Follow me @ http://moss-inside.blogspot.com/

Third part plug-in deployment in web application?

I developed a Java Applet for asp.net c# web application, my question is : How should I deploy this Java Applet in my  msi file , I hope that one expert can give me detailed steps for how to put the java applet into msi file?Thanks.

Web Part Properties issue


Hi there,

I've create a custom object for my web part. I can compile  the web part or web part editor without any issue.  However, when I click "Apply" or "Ok" on the Web Part Editor (this is where I've to update the CustomObject value, I have debugging it line by line there was NO error at all) But an error message raise on the top on the editor.

"Cannot save all of the property settings for this Web Part. An error has occurred."


Any idea what could cause this? or how should I debug this one? Thanks!


  [WebBrowsable( false ), WebDescription( "Custom Object" ), WebDisplayName( "Custom Object" ), Personalizable( PersonalizationScope.User )]
  public CustomObject ProjectCustomFieldsInfo {



How does web part stores its properties when a piece of code is executed in it?



I am trying to program my first webpart based on this:


This webpart must show people who have birthdays on particular day of the month. There should be a button for each month (and one for "whole year) and button for each day (and one for "whole month") and so user can choose to show only those with birthdays in say, april 23, or whole june...

I did it this way:

Following the tutorial, i create all my controls inside the CreateChildControls() and i store references to them as properties of the webpart class. Also the class (public class BirthdayFullScreenWebPart) has properties (int chosen_month) and (int chosen_day).

Then i have have onclick for buttons that changes the chosen month and/or day web part property, based on which button was clicked.

Then i have a function "UpdateUserList" that ouptuts list of users into the webpart's table control, based on the chosen month and day. this function is called inside createchidlcontrols after all of them are created, and inside onclicks when the month/day is changed.


What i got is that the values of the variables were behaving really odd. 

In my mind, it

SummaryLinkWebPart : Access Denied saving Web Part properties after migration to Moss 2010


Hi everyone,

i got the error below when i access pages containing a SummaryLinkWebPart. The error occured only with user having non-administrative privilege.

The curious thing is that after an administrator access one of this pages, it starts to work for non-administrative users too.

The site collections containing these pages has been migrated from Moss 2007 to Moss 2010.

I'd like to find a better solution than navigate through all my pages with site collection administrator account.

Any suggestion would be very appreciate

Access Denied saving Web Part properties: either the Web Part is embedded directly in the page, or you do not have sufficient permissions to save properties

Custom web part properties are not saved in SharePoint 2010 visual web part


I have created my first visual web part in SP2010.  In 2007 version I didn't use user controls so all of my code was in a single file for the most part.  Now I've separated out the code.  Everything works great and I like this a lot better (more like traditional ASP.NET development) with one exception.  In my bootstrap .cs file (I call it that because it does nothing but load the user control file) I put all of my custom web part properties.  Then in my web part code-behind I reference them thru an instance of the containing class.  I must have something incorrectly configured because none of the changes to the properties at runtime are getting updated in the code.  Here's a filtered view of how I have it wired together:

Sample property in the top level .cs file:

private string m_ImagePath = "sites/myapp/images1/branded_image.png";
   WebDisplayName("Relative path to header image"),
   WebDescription("Relative path to header image"),

Custom Properties in Advanced Search Web Part - a bug??



we are trying to configure the advanced search web part and add some custom properties. Those properties are of type managed metadata.

We saw the following sample:


When try to use the web part, for example by add the property "product" and then search "when [product]="valueA",

we get not only results where the item has a property "product=valueA",

but also any item where in its body (full text) there is "valueA".

This behavior doesn't occur when searching non-custom property (for example "author=keren").

Is that a bug or are we missing something in the customization?

thanks a lot!



keren tsur

Web Part Properties - Need InputFormTextBox to open in a new window.


Hi All,

I have developed a web part for SP2010. It inherits from the EditorPart class and uses an InputFormTextBox control. My problem is that the control appears in the web part properties in it's complete form (taking up alot of space).

Does anyone know how I can replicate the feature of the Content Editor Web Part by having a button open a window like RTE2PUEditor.aspx for editing?


To Configure Search Box Web Part properties


I need configure the Search Box Web Part properties to add a custom scope HR to it. Are these steps below the right steps?
  1. Navigate to the Search Center site.
  2. In the Search Center, click the Site Actions menu, and then click Edit Page . The Search page opens in Edit mode.
  3. In the Search Box Web Part, expand the Edit drop-down list, and then click Modify Shared Web Part .
  4. In the Search Box tool pane, expand the Scopes Dropdown node.
  5. Expand the Miscellaneous node.

In the Scope Display Group box, type the name of the scope display group "HR" that you want to display in the scopes drop-down list. By default, the value of this property is Search Dropdown .

Please let me know the solution to this issue as soon as possible.


Thanks and Regards,



Web Part Error: "The Height and Width properties do not ..."


I,ve made a asp webpart based on two datagridviews, a textbox and a button. It works fine under asp.net, but when deployed under MOSS2007 it shows the textbox and button.

When the button is pushed (with a search argument) the following error apears.

Web Part Error: The Height and Width properties do not support proportional metrics (for example, 20%).

Can anyone tell me what this means?




Resetting properties in web deployment project based on custom build config file


I'm trying to create a general build environment for multiple projects that can take a some command line parameters and execute a build based on a custom config file.

The problem I am having is after I read in the config parameters with MSBuild.Community.Tasks XMLQuery, which works fine, I can't get aspnet_complier to see these parameters.

I keep getting "error MSB3462: Either MetabasePath or VirtualPath must be specified."

 Here is my project file:

<Project InitialTargets="PreMessage" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
   <Target Name="PreMessage">
    <Message Text="Building..." />
 <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tas

WPF: If Heineken did MVVM Frameworks Part 4

MVVM is to have an instance of a particular Model (say currentPerson) inside my ViewModel (say PeopleViewModel) which is exposed to the View (say PeopleView). The View binds and edits the Model directly.

This definitely flies in the face of what most people consider to be the holy grail of MVVM pattern, but it's a fairly new pattern, so people are still finding their way with it every day, and this works for me very well. The reason I do what I do, is for the following reasons:

1.I have always had the luxury of being able to write my own UI specific Model classes. I would even do this if I was using some other Model classes first, such as LINQ to SQL or LINQ to Entity Framework. As these classes don't have everything a proper WPF Model class needs in my humble opinion. Though, they are pretty good, as they are Partial classes and use INotifyPropertyChanged/DataContract etc etc
2.I am a pragmatist and I do not like writing code for the sake of writing code. I have seen some MVVM apps where the author has had a Model with 50 properties on it, that are simply repeated in the ViewModel abstraction, where the ViewModel added nothing. On that day I decided I would never do that unless I have to.
3.I honestly see no harm in writing directly to the Model from the View, JUST SO LONG AS if the Model is InValid its data NEVER makes its way to the database. I honestly see no pro

Building Layered Web Applications with Microsoft ASP.NET 2.0 - Part 1

"Building Layered Web Applications" that shows you how to build N-Layer applications with Microsoft ASP.NET 2.0. These articles teach you how to design, build and use custom business objects in your web application. The target audience for this series are developers that are ready to make the switch from using SqlDataSource controls to ObjectDataSource controls with custom business objects. Experience with ASP.NET 2 and C# is necessary while some knowledge about object oriented design certainly helps. The design I am going to show you in these articles is a simplified version of a design you would use in a real world application. It doesn't feature all the necessary functionality your application needs, but instead focuses on the underlying concepts.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend