SlideShare a Scribd company logo
Manisha M. ChotheJunior Solution Developer Parallel Minds Technology Solutions Pvt. Ltd. www.parallelminds.biz(o) + 91-20-65000209 http://Dotnetminders.blogspot.com/Google: mchothe8@gmail.com
Agenda1      Introduction2.     Before webpart3.     Need of webpart4.     Web part benefits5.     Dev environment required for web parts6.     Web part infrastructure7.     Hello world web part8.     Getting property from editor zone9.     Calling web service from web part10.     Showcase Data grid in web part11.   Using ajax in webpart12.   Using user control in web part13.   Best coding practices for web part
Web Parts in asp.net
What is Web Part???
IntroductionA Web Part is  a .NET Web custom control assembly that uses  a Web Part description file (.dwp). The .dwp file  contains XML metadata that describes an instance of the Web Part.Web Parts is a framework built into ASP.NET 2.0 for building highly customizable portal-style pages.
IntroductionASP.NET Web parts is an integrated set of controls for creating Web sites that enable end users to modify the content, appearance, and behavior of Web pages directly from a browser.End users can customize Web Parts pages by changing the page layout, adding and removing Web Parts, editing Web Parts properties, establishing connections between Web Parts, and more.
Before Web Parts…..Before ASP.NET 2.0, developer had to build his own custom personalization framework to implement personalization feature in the application.Web Parts are included in ASP.NET server control framework and are used like any other ASP.NET server controls.
Building Web PartsThere are two basic ways to create a Web Part. You can treat any standard Microsoft ASP.NET control as a Web Part or you can build a custom control that derives from the base WebPart class.You are not required to modify a control in any way to use it as a Web Part. Standard ASP.NET controls (such as the Calendar and GridView controls), Web User Controls, and even custom controls can all be used as Web Parts.
Web Parts ControlsThe Toolbox area within Visual Studio (when developing Web Forms) includes a Web Parts category that contains the various controls available to utilize Web Parts in an application.
ASP.NET 2.0 Web Part page
ASP.NET Web Parts Life Cycle
ASP.NET Web Parts Life CycleInitialization:-The WebPartZone objects register with the WebPartManager control.The WebPartManager control loads the static WebPart objects.The WebPartManager control calls the TrackViewState method for each static WebPart object already in the control hierarchy at this point.Initialization Complete:-The WebPartManager control loads the dynamic WebPart objects and the WebPartConnection objects.       The WebPartManager control calls the WebPartPersonalization control on the static and dynamic WebPart objects.
ASP.NET Web Parts Life CycleLoad Complete:-The WebPartManager control activates the WebPartConnection objects.Save State Complete:-     The WebPartManager control saves the static  and dynamic WebPart objects' personalization information in permanent storage.
ASP.NET 2.0 Web Part infrastructure
Advantages of Web PartsWeb Parts allows for personalization of page content. They allows users to move or hide the Web Parts and add new Web Parts changing the page layout.Web Parts allows user to export or import Web Parts settings for use in other pages. Web Parts retain the properties, appearance and the data across the pages when imported or exported.Web Parts can be assigned role-based access. So you can determine which Web Parts can share by all or which should be hidden for certain roles. This helps us to provide customized content based on security.Web Parts can talk to each other. You can utilize the data in one Web Part in another Web Part for different purposes.
Web Parts Modesa) Normal mode: End user cannot edit or move sections of page.b) Edit Mode: End user can edit Web Parts on the page including Web Parts title, color or even setting custom properties.c) Design Mode: End user can rearrange the order of the pages     Web Parts in a WebPartZone.d) Catalog Mode: End user enjoys the choice to add new Web Parts or add deleted Web Parts in any WebPartZone on the page.
ASP.NET Web Parts ControlsWebPartManager:-     The WebPartManager is the manager for all web parts. If you use webparts in your web projects you are required to use the WebPartManager. Usually you just drag and drop this into your webform and are ready to go.WebPart Zones:-      There are four kinds of zones in web part zones:Web Part ZoneEditor ZoneCatalog ZoneConnection ZoneWebPart Zone:-The web part Zone is the basic unit for web parts. By placing different contents in a web part zone we can allow a user to drag and drop contents on a page.
WebParts  ZoneCatalog ZoneThe purpose of the CatalogZone control is to allow end users to customize Web Parts pages by adding Web Parts to them. for example, to enable users to restore closed Web Parts to the page by including a CatalogZone in the page.A Catalog Zone can contain several types of Catalog Part controls. The following list summarizes the Catalog Part controls provided with the Web Parts control set:PageCatalogPartDeclarativeCatalogPartImportCatalogPart
WebParts Zones   EditorZone     The EditorZone Web Server control serves as the primary control in the Web Parts control set for hosting EditorPart controls on a Web page.AppearanceEditorPart:-    Lets users customize the visual properties of a WebPart control at run time, such as the width,height, and title.BehaviorEditorPart:-   Lets users customize behavior properties of a WebPart control at run time, such as displaying minimize, close, and edit buttons.LayoutEditorPart:-   Lets users customize layout properties of a WebPart control at run time, such as selecting a minimized or normal state, or setting the index at which the control will appear within the target zone.PropertyGridEditorPart:-   Lets users edit custom properties at run time that are declared as part of a WebPart control.
WebParts Zones   ConnectionZone     The ConnectionsZone Web server control provides a user interface (UI) that enables users to form connections between WebPart and other server controls that reside in WebPartZoneBasezones.    You can connect controls in these ways:Declare a connection in a Web page.Create a connection in code.Add a ConnectionsZone control to the page so that users can connect the controls on demand.
WebParts in Asp.net Following is the list of features provided exclusively by the SharePoint WebPart class:Cross page connectionsConnections between Web Parts that are outside of a Web Part zoneClient-side connections (Web Part Page Services Component)A data caching infrastructure that allows caching to the content database
  Simple Hello World Example for Web Parts
Hello World Example for Web PartsVisual studio ->create web Site ->asp.net web site ->ok
Hello World Example for Web PartsOutput Screen
Hello World Example for Web PartsOutput Screen
Example of Web Parts
Use of User Control in Web Part
Use of User Control in Web PartSol. Exp -> Add ->New item -> select  web user control -> Add
Use of User Control in Web PartDesign view of user control
Use of User Control in Web PartDesign view of web part containing user control
Use of User Control in Web PartOutput Screen of  web part with user control
Use of User Control in Web PartOutput Screen of  web part with user control
User Control Vs Web PartsUser ControlUser Controls cannot be shared across web applications but they can be created using a designer tool.Customization and personalization is not possible using User Controls.     Web PartWeb Part is a combination of User Control and Custom Control.Web Parts are ASP.NET controls in that they add extra dimensions of user customization and personalization.
 Getting Property From Editor Zone
Getting Property From Editor Zone
Getting Property From Editor Zone
Getting Property From Editor Zone
Getting Property From Editor Zone
Getting Property From Editor Zone
Getting Property From Editor Zone
Getting Property From Editor Zone
Getting Property From Editor ZoneThe code will populate the DropDownList with all the available modes for the WebParts.  private void BindData() {WebPartDisplayModeCollection modes = wpm.DisplayModes;foreach (WebPartDisplayMode mode in modes)               {ddlModes.Items.Add(mode.Name);                 }ddlModes.DataBind();   }
Getting Property From Editor ZoneNow, in order to select the particular mode you need to catch the Selected_IndexChanged event of the DropDownList. protected void ddlModes_SelectedIndexChanged(object sender, EventArgs e){WebPartDisplayMode mode = (WebPartDisplayMode)      wpm.SupportedDisplayModes[ddlModes.SelectedValue];wpm.DisplayMode = mode; }
 Web Services in Asp.net
Step 1: Create the ASP.NET Web Service Source FileWeb Services in Asp.netFile: MyWebService.asmx<%@ WebService Language="C#" class="MyClass" %>   using System.Web.Services ;     public class MyClass        {           [WebMethod()]           public int Add ( int a, int b)                  {                    return a + b ;                   }           }
Calling  Web  Service From Web Parts
Calling  Web  Service From Web PartsCreate web site-> asp.net web service-> ok
Calling  Web  Service From Web Parts
Calling  Web  Service From Web Parts
Calling  Web  Service From Web Parts
Calling  Web  Service From Web Parts
Calling  Web  Service From Web Parts
AJAX in asp.net
AJAX in asp.netAjax enables you to build highly interactive and responsive web applications by doing more in the browser.provides a framework for asynchronously dispatching and processing requests and responses from the server.The ASP.NET Ajax Library enables you to enhance ASP.NET Web Forms applications with Ajax. You don't need to know JavaScript to use the controls in the ASP.NET Ajax Library.The ASP.NET Ajax Library includes the Ajax Control Toolkit. The Ajax Library contains more than 30 controls that enable you to easily create rich, interactive web pages. For example, you can use the Ajax Library controls to display HTML editors, auto-complete textboxes, cascading dropdown lists, picture slide shows, and modal popup dialog boxes.
Ajax Server ControlsThe topics in this section describe how to work with ASP.NET Web server controls that enable you to add Ajax functionality to an ASP.NET Web page.ScriptManager Control OverviewManages client script for Ajax-enabled ASP.NET pages. By default, the ScriptManager control registers the script for the Microsoft Ajax Library with the page. This enables client script to use the Microsoft Ajax type system extensions and to support features such as partial-page rendering and Web-service calls. In addition, theScriptManager control enables the Microsoft Ajax Library to be loaded from the Microsoft Content Delivery Network (CDN).Timer Control OverviewPerforms tasks at defined intervals. If you use the Timer control with an UpdatePanel control, you can enable partial-page updates at a defined interval. You can also use the Timer control to perform full-page postbacks.
Ajax Server ControlsUpdatePanel Control OverviewEnables you to refresh selected parts of the page instead of refreshing the whole page with a postback. An ASP.NET Web page that contains a ScriptManager control and one or more UpdatePanel controls can automatically participate in partial-page updates, without custom client script.UpdateProgress Control OverviewEnables you to provide status information about partial-page updates in UpdatePanel controls.
Use of Ajax in web Parts
Use of Ajax in web Parts
Use of Ajax in web Parts
Use of Ajax in web Parts
Use of Ajax in web Parts
Use of Ajax in web Parts
Use of Ajax in web Parts
AJAX in SharePoint 2010SharePoint Ajax Library for SharePoint 2010, release 1.1.SharePoint Ajax Library 2010 1.1 This is a base framework built on top of the Microsoft AJAX Library and ASP.NET AJAX for deploying client-side AJAX Web Parts and controls that work against web services and Xml feeds utilizing the ASP.NET AJAX framework. 
Showcase of Gridview in Web Part
Showcase of Gridview in Web Part
Showcase of Gridview in Web Part
WebParts Zones   Connection Zone
WebParts Zones   Connection Zone
Thank You!

More Related Content

What's hot (17)

PPTX
Chanhao Jiang And David Wei Presentation Quickling Pagecache
Ajax Experience 2009
 
PPTX
Meteor Meet-up San Diego December 2014
Lou Sacco
 
PDF
Webformer: a Rapid Application Development Toolkit for Writing Ajax Web Form ...
Thomas Lee
 
PPTX
1 app 2 developers 3 servers
Mark Myers
 
DOC
Tutorial asp.net
Vivek K. Singh
 
PDF
jsf2 Notes
Rajiv Gupta
 
PDF
Custom theme creation websphere portal 8.5
michele buccarello
 
PPT
Csphtp1 20
HUST
 
PPT
JAX-WS Basics
Wes Williams
 
PDF
Rest web service_with_spring_hateoas
Zeid Hassan
 
PDF
How we rest
ColdFusionConference
 
PDF
Unit 2.10 - Frames
Intan Jameel
 
PPT
Struts Intro
guestd8c458
 
DOCX
58615764 net-and-j2 ee-web-services
homeworkping3
 
PDF
Enable seo friendly url in websphere portal
michele buccarello
 
PPTX
Google app engine by example
Alexander Zamkovyi
 
PDF
IBM Connections 4.5 bidirectional synchronization
michele buccarello
 
Chanhao Jiang And David Wei Presentation Quickling Pagecache
Ajax Experience 2009
 
Meteor Meet-up San Diego December 2014
Lou Sacco
 
Webformer: a Rapid Application Development Toolkit for Writing Ajax Web Form ...
Thomas Lee
 
1 app 2 developers 3 servers
Mark Myers
 
Tutorial asp.net
Vivek K. Singh
 
jsf2 Notes
Rajiv Gupta
 
Custom theme creation websphere portal 8.5
michele buccarello
 
Csphtp1 20
HUST
 
JAX-WS Basics
Wes Williams
 
Rest web service_with_spring_hateoas
Zeid Hassan
 
Unit 2.10 - Frames
Intan Jameel
 
Struts Intro
guestd8c458
 
58615764 net-and-j2 ee-web-services
homeworkping3
 
Enable seo friendly url in websphere portal
michele buccarello
 
Google app engine by example
Alexander Zamkovyi
 
IBM Connections 4.5 bidirectional synchronization
michele buccarello
 

Similar to Parallelminds.web partdemo1 (20)

PDF
Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
SPTechCon
 
PPTX
SharePoint 2010 Training Session 5
Usman Zafar Malik
 
PPS
15 asp.net session22
Niit Care
 
PPT
Creating Web Parts New
LiquidHub
 
PPT
Creating Web Parts New
LiquidHub
 
PPTX
SharePoint Web part programming
Quang Nguyễn Bá
 
PDF
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
SPTechCon
 
PPTX
Advanced SharePoint Web Part Development
Rob Windsor
 
PPT
ASP.NET 03 - Working With Web Server Controls
Randy Connolly
 
PPT
WSS 3.0 using asp.net 2.0 for extending pages,Server Farms etc..
maddinapudi
 
PPT
Sharepoint
LiquidHub
 
PPT
EPiServer Web Parts
EPiServer Meetup Oslo
 
PPS
03 asp.net session04
Niit Care
 
PPT
2310 b 04
Krazy Koder
 
PPT
Aspnet2 Overview
ajitbergi
 
PPS
12 asp.net session17
Niit Care
 
PPTX
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
SPTechCon
 
PPT
How to develop asp web applications
Deepankar Pathak
 
PPS
16 asp.net session23
Niit Care
 
PPT
ASP.NET 06 - Customizing Your Sites Appearance
Randy Connolly
 
Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
SPTechCon
 
SharePoint 2010 Training Session 5
Usman Zafar Malik
 
15 asp.net session22
Niit Care
 
Creating Web Parts New
LiquidHub
 
Creating Web Parts New
LiquidHub
 
SharePoint Web part programming
Quang Nguyễn Bá
 
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
SPTechCon
 
Advanced SharePoint Web Part Development
Rob Windsor
 
ASP.NET 03 - Working With Web Server Controls
Randy Connolly
 
WSS 3.0 using asp.net 2.0 for extending pages,Server Farms etc..
maddinapudi
 
Sharepoint
LiquidHub
 
EPiServer Web Parts
EPiServer Meetup Oslo
 
03 asp.net session04
Niit Care
 
2310 b 04
Krazy Koder
 
Aspnet2 Overview
ajitbergi
 
12 asp.net session17
Niit Care
 
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
SPTechCon
 
How to develop asp web applications
Deepankar Pathak
 
16 asp.net session23
Niit Care
 
ASP.NET 06 - Customizing Your Sites Appearance
Randy Connolly
 
Ad

More from parallelminder (16)

PDF
Restoring SharePoint Frontend server
parallelminder
 
PDF
Windows azure development setup
parallelminder
 
PDF
Jason parsing
parallelminder
 
PPTX
Project Server 2010 and Sharepoint 2010 integration with BI
parallelminder
 
PDF
Digital asset management sharepoint 2010
parallelminder
 
PDF
Share point 2010 enterprise single server farm installation
parallelminder
 
PDF
Share point 2010 enterprise single server farm installation
parallelminder
 
PDF
SharePoint2010 single server farm installation
parallelminder
 
PPTX
Sharepoint 2010 Object model topology
parallelminder
 
PDF
How to install / configure / setup language pack in SharePoint 2010
parallelminder
 
PPTX
Formbased authentication in asp.net
parallelminder
 
PPTX
Master Pages In Asp.net
parallelminder
 
PPTX
Nevigation control in asp.net
parallelminder
 
PPTX
Parallel minds silverlight
parallelminder
 
PPTX
Parallelminds.asp.net web service
parallelminder
 
PPTX
Parallelminds.asp.net with sp
parallelminder
 
Restoring SharePoint Frontend server
parallelminder
 
Windows azure development setup
parallelminder
 
Jason parsing
parallelminder
 
Project Server 2010 and Sharepoint 2010 integration with BI
parallelminder
 
Digital asset management sharepoint 2010
parallelminder
 
Share point 2010 enterprise single server farm installation
parallelminder
 
Share point 2010 enterprise single server farm installation
parallelminder
 
SharePoint2010 single server farm installation
parallelminder
 
Sharepoint 2010 Object model topology
parallelminder
 
How to install / configure / setup language pack in SharePoint 2010
parallelminder
 
Formbased authentication in asp.net
parallelminder
 
Master Pages In Asp.net
parallelminder
 
Nevigation control in asp.net
parallelminder
 
Parallel minds silverlight
parallelminder
 
Parallelminds.asp.net web service
parallelminder
 
Parallelminds.asp.net with sp
parallelminder
 
Ad

Recently uploaded (20)

PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPTX
How to Manage Allocation Report for Manufacturing Orders in Odoo 18
Celine George
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PPTX
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
PPTX
TRANSLATIONAL AND ROTATIONAL MOTION.pptx
KIPAIZAGABAWA1
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PDF
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PPTX
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
PDF
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
PDF
epi editorial commitee meeting presentation
MIPLM
 
PPTX
infertility, types,causes, impact, and management
Ritu480198
 
PPTX
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
PDF
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
How to Manage Allocation Report for Manufacturing Orders in Odoo 18
Celine George
 
Horarios de distribución de agua en julio
pegazohn1978
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
TRANSLATIONAL AND ROTATIONAL MOTION.pptx
KIPAIZAGABAWA1
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
epi editorial commitee meeting presentation
MIPLM
 
infertility, types,causes, impact, and management
Ritu480198
 
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 

Parallelminds.web partdemo1

  • 1. Manisha M. ChotheJunior Solution Developer Parallel Minds Technology Solutions Pvt. Ltd. www.parallelminds.biz(o) + 91-20-65000209 http://Dotnetminders.blogspot.com/Google: [email protected]
  • 2. Agenda1 Introduction2.     Before webpart3.     Need of webpart4.     Web part benefits5.     Dev environment required for web parts6.     Web part infrastructure7.     Hello world web part8.     Getting property from editor zone9.     Calling web service from web part10.     Showcase Data grid in web part11.   Using ajax in webpart12.   Using user control in web part13.   Best coding practices for web part
  • 3. Web Parts in asp.net
  • 4. What is Web Part???
  • 5. IntroductionA Web Part is a .NET Web custom control assembly that uses a Web Part description file (.dwp). The .dwp file contains XML metadata that describes an instance of the Web Part.Web Parts is a framework built into ASP.NET 2.0 for building highly customizable portal-style pages.
  • 6. IntroductionASP.NET Web parts is an integrated set of controls for creating Web sites that enable end users to modify the content, appearance, and behavior of Web pages directly from a browser.End users can customize Web Parts pages by changing the page layout, adding and removing Web Parts, editing Web Parts properties, establishing connections between Web Parts, and more.
  • 7. Before Web Parts…..Before ASP.NET 2.0, developer had to build his own custom personalization framework to implement personalization feature in the application.Web Parts are included in ASP.NET server control framework and are used like any other ASP.NET server controls.
  • 8. Building Web PartsThere are two basic ways to create a Web Part. You can treat any standard Microsoft ASP.NET control as a Web Part or you can build a custom control that derives from the base WebPart class.You are not required to modify a control in any way to use it as a Web Part. Standard ASP.NET controls (such as the Calendar and GridView controls), Web User Controls, and even custom controls can all be used as Web Parts.
  • 9. Web Parts ControlsThe Toolbox area within Visual Studio (when developing Web Forms) includes a Web Parts category that contains the various controls available to utilize Web Parts in an application.
  • 10. ASP.NET 2.0 Web Part page
  • 11. ASP.NET Web Parts Life Cycle
  • 12. ASP.NET Web Parts Life CycleInitialization:-The WebPartZone objects register with the WebPartManager control.The WebPartManager control loads the static WebPart objects.The WebPartManager control calls the TrackViewState method for each static WebPart object already in the control hierarchy at this point.Initialization Complete:-The WebPartManager control loads the dynamic WebPart objects and the WebPartConnection objects. The WebPartManager control calls the WebPartPersonalization control on the static and dynamic WebPart objects.
  • 13. ASP.NET Web Parts Life CycleLoad Complete:-The WebPartManager control activates the WebPartConnection objects.Save State Complete:- The WebPartManager control saves the static and dynamic WebPart objects' personalization information in permanent storage.
  • 14. ASP.NET 2.0 Web Part infrastructure
  • 15. Advantages of Web PartsWeb Parts allows for personalization of page content. They allows users to move or hide the Web Parts and add new Web Parts changing the page layout.Web Parts allows user to export or import Web Parts settings for use in other pages. Web Parts retain the properties, appearance and the data across the pages when imported or exported.Web Parts can be assigned role-based access. So you can determine which Web Parts can share by all or which should be hidden for certain roles. This helps us to provide customized content based on security.Web Parts can talk to each other. You can utilize the data in one Web Part in another Web Part for different purposes.
  • 16. Web Parts Modesa) Normal mode: End user cannot edit or move sections of page.b) Edit Mode: End user can edit Web Parts on the page including Web Parts title, color or even setting custom properties.c) Design Mode: End user can rearrange the order of the pages Web Parts in a WebPartZone.d) Catalog Mode: End user enjoys the choice to add new Web Parts or add deleted Web Parts in any WebPartZone on the page.
  • 17. ASP.NET Web Parts ControlsWebPartManager:- The WebPartManager is the manager for all web parts. If you use webparts in your web projects you are required to use the WebPartManager. Usually you just drag and drop this into your webform and are ready to go.WebPart Zones:- There are four kinds of zones in web part zones:Web Part ZoneEditor ZoneCatalog ZoneConnection ZoneWebPart Zone:-The web part Zone is the basic unit for web parts. By placing different contents in a web part zone we can allow a user to drag and drop contents on a page.
  • 18. WebParts ZoneCatalog ZoneThe purpose of the CatalogZone control is to allow end users to customize Web Parts pages by adding Web Parts to them. for example, to enable users to restore closed Web Parts to the page by including a CatalogZone in the page.A Catalog Zone can contain several types of Catalog Part controls. The following list summarizes the Catalog Part controls provided with the Web Parts control set:PageCatalogPartDeclarativeCatalogPartImportCatalogPart
  • 19. WebParts Zones EditorZone The EditorZone Web Server control serves as the primary control in the Web Parts control set for hosting EditorPart controls on a Web page.AppearanceEditorPart:- Lets users customize the visual properties of a WebPart control at run time, such as the width,height, and title.BehaviorEditorPart:- Lets users customize behavior properties of a WebPart control at run time, such as displaying minimize, close, and edit buttons.LayoutEditorPart:- Lets users customize layout properties of a WebPart control at run time, such as selecting a minimized or normal state, or setting the index at which the control will appear within the target zone.PropertyGridEditorPart:- Lets users edit custom properties at run time that are declared as part of a WebPart control.
  • 20. WebParts Zones ConnectionZone The ConnectionsZone Web server control provides a user interface (UI) that enables users to form connections between WebPart and other server controls that reside in WebPartZoneBasezones. You can connect controls in these ways:Declare a connection in a Web page.Create a connection in code.Add a ConnectionsZone control to the page so that users can connect the controls on demand.
  • 21. WebParts in Asp.net Following is the list of features provided exclusively by the SharePoint WebPart class:Cross page connectionsConnections between Web Parts that are outside of a Web Part zoneClient-side connections (Web Part Page Services Component)A data caching infrastructure that allows caching to the content database
  • 22. Simple Hello World Example for Web Parts
  • 23. Hello World Example for Web PartsVisual studio ->create web Site ->asp.net web site ->ok
  • 24. Hello World Example for Web PartsOutput Screen
  • 25. Hello World Example for Web PartsOutput Screen
  • 27. Use of User Control in Web Part
  • 28. Use of User Control in Web PartSol. Exp -> Add ->New item -> select web user control -> Add
  • 29. Use of User Control in Web PartDesign view of user control
  • 30. Use of User Control in Web PartDesign view of web part containing user control
  • 31. Use of User Control in Web PartOutput Screen of web part with user control
  • 32. Use of User Control in Web PartOutput Screen of web part with user control
  • 33. User Control Vs Web PartsUser ControlUser Controls cannot be shared across web applications but they can be created using a designer tool.Customization and personalization is not possible using User Controls. Web PartWeb Part is a combination of User Control and Custom Control.Web Parts are ASP.NET controls in that they add extra dimensions of user customization and personalization.
  • 34. Getting Property From Editor Zone
  • 35. Getting Property From Editor Zone
  • 36. Getting Property From Editor Zone
  • 37. Getting Property From Editor Zone
  • 38. Getting Property From Editor Zone
  • 39. Getting Property From Editor Zone
  • 40. Getting Property From Editor Zone
  • 41. Getting Property From Editor Zone
  • 42. Getting Property From Editor ZoneThe code will populate the DropDownList with all the available modes for the WebParts. private void BindData() {WebPartDisplayModeCollection modes = wpm.DisplayModes;foreach (WebPartDisplayMode mode in modes) {ddlModes.Items.Add(mode.Name); }ddlModes.DataBind(); }
  • 43. Getting Property From Editor ZoneNow, in order to select the particular mode you need to catch the Selected_IndexChanged event of the DropDownList. protected void ddlModes_SelectedIndexChanged(object sender, EventArgs e){WebPartDisplayMode mode = (WebPartDisplayMode) wpm.SupportedDisplayModes[ddlModes.SelectedValue];wpm.DisplayMode = mode; }
  • 44. Web Services in Asp.net
  • 45. Step 1: Create the ASP.NET Web Service Source FileWeb Services in Asp.netFile: MyWebService.asmx<%@ WebService Language="C#" class="MyClass" %> using System.Web.Services ; public class MyClass { [WebMethod()] public int Add ( int a, int b) { return a + b ; } }
  • 46. Calling Web Service From Web Parts
  • 47. Calling Web Service From Web PartsCreate web site-> asp.net web service-> ok
  • 48. Calling Web Service From Web Parts
  • 49. Calling Web Service From Web Parts
  • 50. Calling Web Service From Web Parts
  • 51. Calling Web Service From Web Parts
  • 52. Calling Web Service From Web Parts
  • 54. AJAX in asp.netAjax enables you to build highly interactive and responsive web applications by doing more in the browser.provides a framework for asynchronously dispatching and processing requests and responses from the server.The ASP.NET Ajax Library enables you to enhance ASP.NET Web Forms applications with Ajax. You don't need to know JavaScript to use the controls in the ASP.NET Ajax Library.The ASP.NET Ajax Library includes the Ajax Control Toolkit. The Ajax Library contains more than 30 controls that enable you to easily create rich, interactive web pages. For example, you can use the Ajax Library controls to display HTML editors, auto-complete textboxes, cascading dropdown lists, picture slide shows, and modal popup dialog boxes.
  • 55. Ajax Server ControlsThe topics in this section describe how to work with ASP.NET Web server controls that enable you to add Ajax functionality to an ASP.NET Web page.ScriptManager Control OverviewManages client script for Ajax-enabled ASP.NET pages. By default, the ScriptManager control registers the script for the Microsoft Ajax Library with the page. This enables client script to use the Microsoft Ajax type system extensions and to support features such as partial-page rendering and Web-service calls. In addition, theScriptManager control enables the Microsoft Ajax Library to be loaded from the Microsoft Content Delivery Network (CDN).Timer Control OverviewPerforms tasks at defined intervals. If you use the Timer control with an UpdatePanel control, you can enable partial-page updates at a defined interval. You can also use the Timer control to perform full-page postbacks.
  • 56. Ajax Server ControlsUpdatePanel Control OverviewEnables you to refresh selected parts of the page instead of refreshing the whole page with a postback. An ASP.NET Web page that contains a ScriptManager control and one or more UpdatePanel controls can automatically participate in partial-page updates, without custom client script.UpdateProgress Control OverviewEnables you to provide status information about partial-page updates in UpdatePanel controls.
  • 57. Use of Ajax in web Parts
  • 58. Use of Ajax in web Parts
  • 59. Use of Ajax in web Parts
  • 60. Use of Ajax in web Parts
  • 61. Use of Ajax in web Parts
  • 62. Use of Ajax in web Parts
  • 63. Use of Ajax in web Parts
  • 64. AJAX in SharePoint 2010SharePoint Ajax Library for SharePoint 2010, release 1.1.SharePoint Ajax Library 2010 1.1 This is a base framework built on top of the Microsoft AJAX Library and ASP.NET AJAX for deploying client-side AJAX Web Parts and controls that work against web services and Xml feeds utilizing the ASP.NET AJAX framework. 
  • 65. Showcase of Gridview in Web Part
  • 66. Showcase of Gridview in Web Part
  • 67. Showcase of Gridview in Web Part
  • 68. WebParts Zones Connection Zone
  • 69. WebParts Zones Connection Zone