.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

How do I update/modify already created sites vs Best Practices

Posted By:      Posted Date: October 01, 2010    Points: 0   Category :SharePoint


I was listining to a Channel 9 Web Cast by Ted P (http://tinyurl.com/2euy8uf) regarding best practices - in fact I think it was more an advertorial of feature stapling. In this web cast Ted told that it was a best practice to AVOID(!) custom site definitions but use feature stapling instead. Someone posted a very interesting remark stating the problem on how to handle updates on already created sub sites. So you create 100 sites using feature stapling. After this is done the customers wants you to add the text 'Hello World' behind the title.

Q1: How do you alter these 100 sites?

Q2: What would be the best practice in this case? Feature Stapling or a custom site definition.


View Complete Post

More Related Resource Links

Best Practices for developing accessible web sites in SharePoint 2007


I'm currently busy with an overview of Best Practices for developing accessible web sites in SharePoint 2007. After a little research I have noticed that the challenges I have faced so far are mostly XHTML/CSS/JS related and there are actually very few SharePoint 2007 specific issues: this has to do with the fact that we use very little to none of standard SharePoint controls in the Internet facing web sites we deliver.


As I would like to share the Best Practices I'm writing with the community I've been wondering whether you have tried to develop an accessible web site in SharePoint 2007 yourself and faced any challenges you would like to share. To make myself clear I'm looking for issues and challenges and not solutions in particular (these are welcome as well by the way).

Cannot change themes of newly created sites "Access denied"

When creating a new site i cannot change the default theme (grayed out) and a message appears something like "access denied". What's wrong? The first 6 sites where created succesfully and have a modified (OOB) site theme applied, all sites I create from now on cannot have the default theme modified. I checked any check-out settings but couldnt find anything obvious. What's wrong? I didn't use any custom code or such, just clicked around like an Admin does ;)  I thought about some check-in/out issue, but couldnt see anything. Someone HELP! please!I am a SharePoint Infrastructure Engineer, focussed on Administration and Installation of SharePoint Server environments.

How to post comments in blogs created on My Site sites

Hi all, I've been trying to comment in blogs created on My Site sites of other users in my SharePoint 2010 organization. But the only one allowed to comment a blog is the owner of the site. Does anyone knows how can I enable this option to other users? Thanks in advance for you help.

event receiver to update created field of uploaded document

Hi,   I need to update the created column with the document creation time . 1) First should i use ItemAdding event or Item Added event 2) how do i get the file created properties and assign it to the cdocument library created column.

SharePoint tool - update metadata, permissions of sites, lists,listitems


Hi All,


I am setting a SharePoint test environment with loads of data.

I could some how manage to use tools to populate data in Sharepoint.

But I couldn't find a way to

1) Modify the sites/lists/listitems in an easy way without me havng to manually perform that

As I had 200GB of data with some thousands of sites and lists, I am not able to manage this data manually.

For my testing to run smoothly, I need to be able to add/delete/modify the metadata, permissions of many objects easily


Can someone suggest me  a tool which allows me to do this kind of functionality




How can I make my Visual Studio Workflow update my External List that I created in SPD


I am creating a workflow VS2010 that can write to regular SP Lists however, when I try to have it write to my External List it does not work?


Leland Usher SharePoint Developer/Administrator

What would be the best way of adding a button that will only update a status of row from "Created" t



I am planning to add couple of custom buttons to update a status of a record in GridView?

What would be the best way of implementing it?

Many thanks, 

Update Query ? Incorrect use of the xml data type method 'modify'. A non-mutator method is expecte


I have a column of ntext da


ta type and NOT XML. It stores all xml data. I need to update xml node in the records. It throws an error saying "Incorrect use of the xml data type method 'modify'. A non-mutator method is expected in this context."

 begin transaction
declare @Cps_Id int;
set @Cps_Id = 236;
declare @Cps_Message nvarchar(1024);
set @Cps_Message = 'updating cpsia message with smoking';

update table_name
set column_name = CONVERT(xml,column_name).modify('replace value of (/root/ProductInformation/CPSIA/CpsiaDetails/Item[CpsiaId=sql:variable("@Cps_Id")]/CpsiaMessage/text())[1] with sql:variable("@Cps_Message")')
WHERE Convert(xml,column_name).exist('/root/ProductInformation/CPSIA/CpsiaDetails/Item[CpsiaId=sql:variable("@Cps_Id")]')=1


Sample XML:

<strong><root> <ProductInformation> <Name> Truck with Battery Charger</Name> <Description>Fr.</Description> <CPSIA> <CpsiaDetails> <Item> <CpsiaId>456</CpsiaId> <CpsiaMessage>waring</CpsiaMessage> </Item> <Item> <CpsiaId>236</CpsiaId> <CpsiaMessage>to health</CpsiaMessage> </Item&

SharePoint Tutorial - Team Sites

Team sites are small web sites that are created to store everything about a particular thing. For example a site can be created for a department in an organization like human resources. I site can be created for a particular project. A site can even be created for a meeting. Everything about the thing (department, project, meeting) like documents, lists, calendars, etc. is stored in that site.

ASP.NET Best Practices for High Performance Applications

This article lists the techniques that you can use to maximize the performance of your ASP.NET applications. It provides common issues, design guidelines, and coding tips to build optimal and robust solutions.

ASP.Net Gridview Edit Update Cancel Commands

In ASP.Net 2.0, GridView Control also provides the functionality to edit and update the data retrieved from the database using CommandField template. You can cancel the action using Cancel Command of the CommandField. GridView consists of events that can be used to perform the actions like edit, update and cancel upon the Data items displayed in the ASP.Net GridView Data Control.

How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

12 ASP.NET MVC Best Practices

And one of them was about what I consider to be ASP.NET MVC Best Practices. The presentation was in Italian so I decided to translate my slide in English so that everybody can read them.

Controller's best practices

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).

Update Vs SystemUpdate

Many of you might noticed that share point ListItem has Update() method as well as SystemUpdate().

What is the difference between these two methods and why MOSS has two different APIs for updating an ListItem

SqlCommand.ExecuteNonQuery() returns -1 when doing Insert / Update / Delete

Sometimes you end up with a return value of -1 when using the SqlClient.SqlCommand.ExecuteNonQuery method.

Why is that?

Well, the ExecuteNonQuery method is there for statements for changing data, ie. DELETE / UPDATE /INSERT, and the returned value are the number of rows affected by that statement.

When checking the documentation we can see that there are some conditions that return -1.

For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command.

When a trigger exists on a table being inserted or updated, the return value includes the number of rows affected by both the insert or update operation and the number of

rows affected by the trigger or triggers. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1.

>>>How to update multiple rows of gidview by one click



I want to add multiple rows of a gridview if the data for multiple fields are same.

Idea for this is that a user may search a record with some parameter e.g. Sector, plot.

For example 15 records being displayed in gridview.

There should be checkbox before every row and if user wants to update Plot and Flat No that is same for 10 rows out of 15 so he will check the rows and update.

For this a dialog box should appear asking for the parameter i.e. Plot and Flat or something else next time may be it will be City or country. Moreover, there is already an Edit button to update records, when user click it another page open for the record to be updated and whatever he wants to update, it updates.

Hope everone understand the scenario.

I don't want to disturb the already provided Edit functionality and want to provide same record to be updated.

Any idea in this regard would be appreciated.

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