Content by Category
.NET 1.x
.NET 2.0
.NET 3.0
.NET 3.5
.NET 4.0
.NET 4.5
.NET Assemblies
.NET Framework
.NET Getting Started
Accessibility
ADO.NET
Advertorials
Agile Development
AJAX
Amazon Web Services
Analysis Services
Android
Architecture
Arduino
ASP .NET Web API
ASP.NET
ASP.NET MVC
ASP.NET WebForms
Azure
B2B (Business Integration)
BDD
Big Data
Bing
BizTalk
Book Excerpts
Build and Deploy
Business Intelligence
C#
C++
ClickOnce
Cloud Computing
Code Contracts
CODE Framework Info - non Technical
CODE on the Road!
COM+
Community
Conferences
Continuous Integration
Crystal Reports
CSLA.NET
CSS
Data
Debugger
Design Patterns
Development Process
Display Technologies
Distributed Computing
Document Database
DotNetNuke
DSL
Dynamic Languages
Dynamic Programming
Editorials
Enterprise Services ("COM+")
Entity Framework
Events
Expression Blend
F#
Fox to Fox
Frameworks
Functional Programming
Git
Graphics
HTML 5
Internet Explorer 8.0
Interviews
IOS
iPhone
Iron Ruby
Java
Java Script
JavaScript
jQuery
JSON
Lightswitch
LINQ
Linux
LUA
Mac OS X
MDX
Messaging
Metro
Microsoft Application Blocks
Microsoft Business Rules Framework
Microsoft Dynamics
Microsoft Expression
Microsoft Office
Mobile Development
Mobile PC
Mono
MsBuild
MVVM
MySQL
Network
NHibernate
node.js
NOSQL
Nuget
Object Oriented Development
Objective C
Odata
OLAP
Open Source
Opinion
Opinions
Oracle
ORM
Other Languages
Parallel Programming
Patterns
PHP
Podcasts
Post Mortem
PowerPoint
Print/Output
Prism
Product News
Product Reviews
Project Management
Prolog
Python
Q&A
Rails
Rake
Razor
Reporting Services
REST
RIA Services
Ruby
Ruby on Rails
Scheme
Search
Security
Services
SharePoint
SignalR
Silverlight
SOA
Social Networks
Software & Law
Software Business
Source Control
Speech-Enabled Applications
SQL Server
SQL Server 2000
SQL Server 2005
SQL Server 2008
SQL Server 2012
SQL Server CE/AnyWhere/Mobile/Compact
SSIS
Subversion
Sync Framework
Tablet PC
TDD
Team System
Techniques
Testing and Quality Control
TFS
Tips
TypeScript
UI Design
UML
User Groups
VB Script
VB.NET
Version Control
VFP and .NET
VFP and SQL Server
Virtual Earth
Vista
Visual Basic
Visual Basic 6 (and older)
Visual FoxPro
Visual Studio .NET
Visual Studio 11
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Visual Studio 2011
Visual Studio 2012
Visual Studio Tools for Office
VSX
WCF
Web Development (general)
Web Services
WebMatrix
WF
Whitepapers
Windows 7
Windows 8
Windows Azure
Windows Live
Windows Phone 7
Windows Phone SDK
Windows Server
Windows Vista
WinForms
WinRT
Workflow
WPF
XAML
Xiine Documentation
XML
XNA
XSLT



LearnNow


XAMALOT
 


SSWUG


Reader rating:
Click here to read 2 comments about this article.
Article source: CoDe (2007 - Jan/Feb)


Article Pages:  1  2 3 4 5 - Next >


ASP.NET 2.0 Web Part Infrastructure and SharePoint 2007

In my previous article, (“ASP.NET 2.0 Web Part Infrastructure”, Nov/Dec 2006, CoDe Magazine) I talked about the ASP.NET 2.0 Web Part framework. I made the case for the emergence of Web Part or widget-like solutions, and explained the support for Web Parts in the ASP.NET 2.0 framework. However, I stopped short with a teaser into connecting these Web Parts with each other and where this story fits in with SharePoint 2007.

In this article, I intend to cover the rest of that ground. As I indicated in my last article, SharePoint 2007 is built on ASP.NET 2.0. In this article I intend to take the discussion from ASP.NET 2.0 to SharePoint 2007. I will demonstrate Web Part connections, and how all that I have discussed in these two articles ties into writing Web Parts for SharePoint 2007.

"
In a production environment, you could restrict the number of keys you use, and then use the keys as evidence to create a tiered-level security structure based on keys to keep things clean.
"

SharePoint 2007 is built in ASP.NET 2.0. Thus any discussion about SharePoint 2007 starts in ASP.NET 2.0 land. In my last article, I wrote a simple example that introduced you to the major key components of the ASP.NET 2.0 Web Part framework. In that example, I wrote a simple Web site that demonstrated key concepts such as the GenericWebPart, Web Part catalogs, personalization, and writing custom editors for the Web Parts. However, I stopped short at Web Part connections, and I really didn’t talk much about SharePoint 2007.

In this article I intend to continue the journey forward, discuss Web Part connections, and finally finish at writing and deploying custom Web Parts in SharePoint 2007.

If you haven’t had a chance to read my last article, I strongly suggest that you start there or this article won’t much too much sense.

Web Part Connections

Picking up from where I left off in the last article, I will continue to enhance the code I have already written. You can find the code for both my first article and the finished code for this article on my Web site at www.winsmarts.com.

Towards the end of my last article, I invited you to attempt to set the display mode of the WebPartManager to “Connect”. In response you saw an exception as shown in Figure 1.

Click for a larger version of this image.

Figure 1: Error from last article because there is no Connections Zone on the page.

This exception was reasonable to expect since I haven’t yet added a ConnectionsZone to my Web pages. Since all my zones are in the SiteMaster.master file, open the master page and add the connections zone as shown below:

<asp:ConnectionsZone 
    ID="ConnectionsZone1" 
runat="server"/>

With this new zone added to the master page, try selecting the “Connect” display mode once again. You no longer receive the error. But what does the connect verb do, and what can you use this zone for?

This zone will provide you with a UI allowing you to connect different Web Parts with each other. In other words, if two Web Parts on the same page wish to communicate with each other, and are able to communicate with each other, you can set up this communication using the connections zone.

That is a mouthful. But I just covered two very interesting points.

The first point is: “If two Web Parts are able to communicate with each other…” The obvious question here is: “What qualifies two Web Parts as being able to communicate with each other?” Two Web Parts can communicate with each other as long as they speak the same language-the same language being a common interface as you will see shortly. In case they do not understand a common interface, they can still communicate with each other as long as there is a transformer in the middle. A transformer simply performs the task of translating between two Web Parts that understand communication, but do not speak the same interfaces.

The second important point is: “…being able to set up this communication using a connections zone.” Communication can be set up at run time using the connections zone. You also have the option of setting up communication statically at design time between various Web Parts using the <StaticConnections> element inside the WebPartManager. For the purposes of this article, I will focus on the more interesting way of setting up communication, which is at run time using the connections zone.

Similar to the last article, the best way to learn to swim is to dive right in. Let me first present you with a practical problem to solve, and in the process of solving this problem I will illustrate the various concepts pertinent to Web Part communication and Web Parts in SharePoint 2007.

Defining the Problem: the Business Requirements

I wish to easily set up a Web site which serves as an RSS Reader. There are a number of such Web-based RSS Readers available such as Bloglines, NewsGator, etc.

Thus the business requirements for such an RSS Reader include the following:

  1. The RSS Reader will allow me to maintain my RSS feeds (the OPML).
  2. The RSS Reader will allow me to select one of the RSS feeds out of my OPML.
  3. When the user selects an RSS feed, I should then be able to view that RSS feed rendered on the page.
&

By: Sahil Malik

Sahil Malik is a Microsoft MVP, INETA speaker, a .NET author, consultant, and trainer, and a well-rounded overweight geek. He has a passion for SharePoint, data access, and application architecture.

Sahil loves interacting with fellow geeks in real time. His talks are full of humor and practical nuggets. His talks tend to get very highly charged, fast moving, and highly interactive.

You should check out his blog at http://blah.winsmarts.com

sahilmalik@gmail.com

Fast Facts

SharePoint works under a default locked-down mode.



Article Pages:  1  2 3 4 5 - Next Page: 'Breaking Down the Problem: the Functional Requirements' >>

Page 1: ASP.NET 2.0 Web Part Infrastructure and SharePoint 2007
Page 2: Breaking Down the Problem: the Functional Requirements
Page 3: Establishing Communication with the RSSRender WebPart
Page 4: SharePoint 2007 Built on ASP.NET 2.0
Page 5: Deploying Your Web Parts in SharePoint 2007 (con't)

How would you rate the quality of this article?
1 2 3 4 5
Poor      Outstanding

Tell us why you rated the content this way. (optional)

Average rating:
2.3 out of 5

82 people have rated this article.

Instantly Search Terabytes Of Text
“Lightning Fast”
– Redmond Mag
“Covers all data
sources” – eWeek
25+ fielded & full-text search options
dtSearch’s own document filters highlight hits in popular file types
Web Spider supports static & dynamic data
APIs for .NET, Java, C++, SQL, etc.
Win / Linux (64-bit & 32-bit)
www.dtSearch.com
 

      Sharepoint TechCon

 

Sharepoint TechCon