.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

Writing Custom Webparts

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :SharePoint
Thanks to some feedback from .NET Frenzy and others, I've decided to explore some custom web parts. I do have one concern: what factors should be considered [regarding custom webpart code] when planning to upgrade from sharepoint 2007 to sharepoint 2010? How can a custom webpart be written so that it will be supported by later releases of sharepoint? Are there any issues there? Thanks. Of course I'm also researching this myself, but any information you guys give will be taken into account.

View Complete Post

More Related Resource Links

Writing custom MembershipProvider

ASP.NET Membership mechanism allows to use the build-in server tables to store and retrieve user data. By default, this mechanism can only be used with SQL Server database to which Microsoft provides suitable MembershipProvider class.
Inheriting from this abstract class, developer can use his own table(-es) from any database and use any database engine other than SQL Server, like Oracle, DB2 etc.

Write Custom WebParts for SharePoint 2007

The popularity of SharePoint Portal Server 2003 led Microsoft to tightly integrate the next SharePoint version, Microsoft Office SharePoint Server (MOSS) 2007, with its ASP.NET 2.0 WebPart framework. This tight integration enables the ASP.NET and SharePoint developer to do a number of things that previously weren't possible

Writing Custom Web Parts for SharePoint 2007

As I mentioned in an earlier blog post, SharePoint 2007 is built on top of ASP.NET 2.0, which means you can now use ASP.NET 2.0 features (Forms Authentication, Master Pages, Membership, Site Navigation, New Data Controls, etc) when building SharePoint sites. This is true for both the new Windows SharePoint Services 3.0 version (which will be a free download) as well as Microsoft Office SharePoint Server 2007 (which costs money).

Writing to a custom sink

Hi all,I'm using a modified version of Stephen Toub's secure channel to add compression to the sink along with encryption. Thanks to Stephen I have a very good base to build my sink on and I had no problem adding compression to the sink. Now I want to have compression feature enabled only if the user asks for it. I did'nt know how to send client request to the server. I know that I should write the boolean to the stream on the client side and read it on the server side but it should be done only once.Can anybody show me how or direct me to a sample on the web?Thanks in advance.

Writing a custom Aggregate function in SSIS


Hi is it possible to write a custom aggregate function in SSIS. Is there any other way to do it better? Any help is highly appreciated.


My values are like this

Item | VALUE








I am trying to bring the output. 


1, abc-xyz-wer

2, def-tyu

3, ppl

Ganesh Ranganathan
[Please mark the post as answer if it answers your question]

the joy of writing a custom workflow activity for SharePoint Designer...


So, I need an activity that will replace some old text into new text in a given string.
Not present OOTB in SharePoint Designer, so - oh boy! oh boy! - we can develop it ourselves using Visual Studio!

Ok great, I did some reading about it on SP2007 in the past, but never needed it, so never actually tried it.
Now I'm on SP2010, so I googled again to find guides on how to write my very first custom workflow activity to use in SharePoint Designer 2010.
Nothing to be found.... The few posts about 2010 were only stating that it works still the same as in SP2007, and to look for guides on 2007.

Ok, so I googled some guides on how to do this in SP2007. I found one from MSDN, perfect to start with you'd say: http://msdn.microsoft.com/en-us/library/cc627284.aspx 
But really, it doesn't work the same... When I create an Activity Library project in VS2010, I don't have a class, like in the guide. All I have is a xaml file, no cs at all, and I have absolutely no clue what I should add in order to get the same class as in the guide. Adding a regular class is not it, since in the guide they're using a partial class. So I'm blocked 5secs after I started reading the guide... just great.

I'm so fed up with the lack of information on development for SharePoint. I hit

Problem with adding third party webparts and sharepoint webparts to the custom pages


Hi All,


 I have a problem with my custom webpart pages which are inside sitedefinition. I have a sitedefinition defined for creating sites and sitedefinition contains the master pages and .aspx pages. My pages have webpartzone defined to with the custom webparts added in it. From the browser, when I try to add third party webparts or sharepoint webparts or my custom webparts, it's failing with "Unable to add selected web part(s). The operation could not be completed because the Web Part was deleted by another user or is invalid." Does anyone have the same problem? Please help me. Why the pages are not allowing to add any other webparts to the page. Also I double checked my pages and webpartzones if I am blocking to add webparts via AllowCustomizations=false but I am not. If I create a site with the sitedefinition, isn't it possible to add webparts to the page manually? I haven't found any information about this. Any ideas please.


Thanks in advance,


Custom Controls in C# .NET

Embedding user controls in a Windows form is just like adding a simple button or text box that are already provided with .NET. These basic controls were written essentially like you code your own controls. Typically the controls you design are to be used in multiple forms or to modularize your code. These reasons help reduce the amount of code you have to type as well as make it easier for you to change your implementation. There should almost never be any reason to duplicate code because it leaves a lot of room for bugs. So, implementing functionality specific to your control in the control's source code is a good idea. This reduces code duplication as well as modularize your code, which is a good programming guideline.

10 Tips for Writing High-Performance Web Applications

Writing a Web application with ASP.NET is unbelievably easy. So easy, many developers don't take the time to structure their applications for great performance. In this article, I'm going to present 10 tips for writing high-performance Web apps. I'm not limiting my comments to ASP.NET applications because they are just one subset of Web applications. This article won't be the definitive guide for performance-tuning Web applications-an entire book could easily be devoted to that. Instead, think of this as a good place to start.

Custom Editing Behavior for DataGridView TextBox Columns

For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key

Reading and Writing Images From a Windows Mobile Database using UltraLite 10(C#)

Periodically I get a request for information on how to read and write binary data to a database running on Windows Mobile. If you search the Internet you can typically find examples that are available on Windows Desktops or allow you to read and write to a local file system. The problem is that it can take a bit of work to get this code to work on Windows Mobile accessing a database.

Ultimately you might be asking, why would I want to store and image in a database? Well in an environment where you synchronizing data between a local mobile database and a consolidated (central) database this can be extremely useful. Imagine if an insurance adjuster went to an accident scene, took a picture of a damaged car, loaded it into his Windows Mobile database and then replicated that image up to the Insurance headquarters for approval. All of this could be done in a very short period of time when using images in the database. Another good example might be a doctor who was waiting for a patient chart to become available. If you could store the image in a database this chart could be sent down to the doctor's device once it became available.

For this article I am not going to get into how to synchronize the images to and from a remote and central database as this is typically fairly straightforward when using a data synchronization technologies like MobiLink

XML Reading and Writing

We learned to process XML files using the Document Object Model as implemented by the XmlDocument class. To go further and make XML friendlier, the .NET Framework provides many other classes for different purposes, allowing you to create and manage nodes from custom .NET classes.
Besides the XmlDocument and the derived classes of XmlNode, the .NET Framework provides the XmlTextWriter class, which is derived from XmlWriter. The XmlTextWriter class works in a top-down approach to create, or deal with, the contents of an XML file. This class writes an XML node and moves down without referring

Writing Http Handlers and Modules in IIS 7.5

This article describes how Http modules and handlers are to be written and configured in IIS 7.5. The concept of a handler and module remains same, so dose there programming model. In this section we start off with the concept of a Http module and a Http handler, then talk about how to code them and finally describe the two methods available to configure them.

Help me with webParts


I added WebPartManager to my default.aspx and i get   teh following Message :

Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

SQLExpress database file auto-creation error:

The connection string specifies a local Sql Server Express instance using a database location within the applications App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:

  1. If the applications App_Data directory does not already exist, the web server account must have read and write access to the applications directory. This is necessary because the web server account will automatically create the App_Data directory

Custom views on .aspx webpage


Hi again, i have a client that needs me to create a custom view on thier webpage similar to Microsoft Word.

It goes about that, when I click on an image it redirects me to another page and must create a custom view for a certain paragraph on that page. I am not sure how to do this and wonder if anyone knows how.

I am using C# programming language if that helps at all. I Heard that using javascript would work but i dont know javascript yet so is there any alternative?

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