SlideShare uma empresa Scribd logo
1 de 66
ASAP to ASP.NET 2.0 Noam King CTO Sela youniversity
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Introduction to ASP.NET 2.0 Data Controls Login Controls Web Parts Other New Controls Master Pages Themes and Skins Mobility and Localization Compilation Membership Role Management Profiles Configuration Site Maps Health Monitoring Other Services Controls Page Framework Services and APIs
Architecture
Architecture – Code Model ,[object Object]
Architecture – Coding Model (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Architecture – Coding Model (cont.) Compilation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Architecture – Coding Model (cont.) Compilation (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Architecture – Coding Model (cont.) Compilation (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Architecture – Page LifeCycle   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],ProcessPostData1 OnPreLoad OnLoad ProcessPostData2 (PB) RaiseChangedEvents (PB) RaisePostBackEvent (PB) OnLoadComplete OnPreRender OnPreRenderComplete SavePersonalizationData SaveControlState SaveViewState SavePageStateToPersistenceMedium Render OnUnload PB = Post Back
Architecture – Code Page Posting If Page.IsCrossPagePostBack Then Label1.Text = “Hello “ &  PreviousPage.pp_Textbox1.Text  & “<br />” & _ “ Date Selected: “ & _ PreviousPage.pp_Calendar1.Sele ctedDate.ToShortDateString() Else Response.Redirect(“Page1.aspx”) End If
Architecture - Extensibilty ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Architecture – Performance ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Master Pages
Master Pages - Basics ,[object Object],[object Object],<%@ Master %> <asp:ContentPlaceHolder ID=&quot;Main&quot; RunAt=&quot;server&quot; /> <%@ Page MasterPage- File=&quot;Site.master&quot; %> <asp:Content ContentPlaceHolderID= &quot;Main&quot; RunAt=&quot;server&quot; /> </asp:Content> Site.master default.aspx http://.../default.aspx
Master Pages – Defining and applying ,[object Object],<%@ Master %> <%@ Page MasterPageFile=&quot;~/Site.master&quot; %> <asp:Content ContentPlaceHolderID=&quot;Main&quot; RunAt=&quot;server&quot;> This content fills the place holder &quot;Main&quot; defined in the master page </asp:Content> ,[object Object]
Master Pages ,[object Object],<configuration> <system.web> <pages masterPageFile=&quot;~/Site.master&quot; /> </system.web> </configuration> Sub Page_PreInit (ByVal sender As Object,ByVal e As EventArgs) Page.MasterPageFile = &quot;~/Site.master&quot; End Sub ,[object Object]
Master Pages – Weak Typing (CType(Master.FindControl (&quot;Title&quot;), Label).Text = &quot;Orders&quot; In the content page… <asp:Label ID=&quot;Title&quot; RunAt=&quot;server&quot; /> In the master page…
Master Pages – Strong Typing Master.TitleText = &quot;Orders&quot; In the content page… <asp:Label ID=&quot;Title&quot; RunAt=&quot;server&quot; /> . . . <script language=“VB&quot; runat=&quot;server&quot;> Public Property TitleText as string Get  return Title.Text  End Get Set  Title.Text = value End Set End Property </script> In the master page…
Master Pages - Nesting Master Page IDF (idf.master) Master Page IDF North (idfnorth.master) Master Page IDF South  (idfsouth.master) Content page1 (default.aspx) Content Page2 (default2.aspx) Content Page3 (default3.aspx) Content Page4 (default4.aspx)
Master Pages – Nesting (cont.) ,[object Object],<!-- Orders.Master --> <%@ Master MasterPageFile=&quot;~/Site.Master&quot; %> <asp:Content ContentPlaceHolderID=&quot;...&quot; RunAt=&quot;server&quot;> <asp:ContentPlaceHolder ID=&quot;...&quot; RunAt=&quot;server&quot;> ... </asp:ContentPlaceHolder> <asp:Content>
Master Pages - Container-Specific ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Master Pages – Event order ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Personalization
Personalization - Overview   ,[object Object],[object Object],[object Object],[object Object]
Personalization – Defining & Using ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Profile.FirstName = TextBox1.Text Configuration Using
Personalization - Groups <group name=”MemberDetails”> <add name=”Member” /> <add name=”DateJoined” /> <add name=”PaidDuesStatus” /> <add name=”Location” /> </group> Label1.Text = Profile.MemberDetails.DateJoined Configuration Using
Personalization - Types ,[object Object],[object Object],[object Object],[object Object],<add name=”Field name” type=”FieldType” serializeAs=”Binary” />
Web Parts
Web Parts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],<asp:WebPartManager ID=&quot;WebPartManager1&quot; RunAt=&quot;server&quot; />
Web Parts - WebPartZone ,[object Object],[object Object],<asp:WebPartZone ID=&quot;WeatherZone&quot; DragHighlightColor=&quot;244,198,96&quot;  RunAt=&quot;server&quot; > <PartTitleStyle BackColor=&quot;#2254B1&quot; ForeColor=&quot;White&quot; /> <PartStyle BorderColor=&quot;#81AAF2&quot; BorderStyle=&quot;Solid&quot; BorderWidth=&quot;1px&quot; /> <ZoneTemplate> <!-- Web Parts declared here --> </ZoneTemplate> </asp:WebPartZone>
Web Parts - Controls ,[object Object],[object Object],[object Object],[object Object],<ZoneTemplate> <asp:Calendar Title=&quot;Calendar&quot; ID=&quot;Calendar1&quot; RunAt=&quot;server&quot; /> <user:Weather Title=&quot;Weather&quot; ID=&quot;Weather1&quot; RunAt=&quot;server&quot; /> <custom:Search Title=&quot;Search&quot; ID=&quot;Search1&quot; RunAt=&quot;server&quot; /> </ZoneTemplate>
Web Parts – WebPartManager & WebPartPage Menu ,[object Object],Value Description BrowserDisplayMode &quot;Normal&quot; display mode; no editing (default) EditDisplayMode Permits editing of Web Parts' appearance and behavior DesignDisplayMode Permits drag-and-drop layout editing CatalogDisplayMode Permits Web Parts to be added to the page ConnectDisplayMode Permits connections to be established between Web parts <asp:WebPartPageMenu ID=”Webpartpagemenu1” Runat=”server”> </asp:WebPartPageMenu>
Web Parts – Catalog Zone <asp:CatalogZone ID=&quot;CatalogZone1&quot; Runat=&quot;server&quot;> <ZoneTemplate> <asp:PageCatalogPart ID=&quot;PageCatalogPart1&quot; Runat=&quot;server&quot; /> <asp:DeclarativeCatalogPart ID=&quot;DeclarativeCatalogPart1&quot; Runat=&quot;server&quot;> <WebPartsTemplate> <!-- Declarative Web Parts go here --> </WebPartsTemplate> </asp:DeclarativeCatalogPart> <asp:ImportCatalogPart ID=&quot;ImportCatalogPart1&quot; Runat=&quot;server&quot; /> </ZoneTemplate> </asp:CatalogZone> DeclarativeCatalogPart
Web Parts - EditorZone <asp:EditorZone ID=&quot;EditorZone1&quot; Runat=&quot;server&quot;> <ZoneTemplate> <asp:AppearanceEditorPart ID=&quot;AppearanceEditorPart1&quot; Runat=&quot;server&quot; /> <asp:BehaviorEditorPart ID=&quot;BehaviorEditorPart1&quot; Runat=&quot;server&quot; /> <asp:LayoutEditorPart ID=&quot;LayoutEditorPart1&quot; Runat=&quot;server&quot; /> </ZoneTemplate> </asp:EditorZone>
Web Parts – Custom Web Parts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Web Parts – Custom Web Parts (cont.) public class MyWebPart : WebPart { public override WebPartVerbCollection Verbs { get { EnsureChildControls (); WebPartVerb verb = new WebPartVerb (new WebPartEventHandler (OnClearResults)); verb.Text = &quot;Clear Results&quot;; WebPartVerb[] verbs = new WebPartVerb[] { verb }; return new WebPartVerbCollection (base.Verbs, verbs); } } void OnClearResults (object sender, WebPartEventArgs args) { ... } ... }
Skins And Themes
Skins and Themes - Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Skins and Themes - Applying <%@ Page Theme=&quot;BasicBlue&quot;> <configuration> <system.web> <pages theme=&quot;BasicBlue&quot; /> </system.web> </configuration> Sub Page_PreInit (ByVal sender As Object, ByVal e As EventArgs) Page.Theme = &quot;BasicBlue&quot; End Sub On a page On a Site Programmatically
Skins And Themes – Global Themes BasicBlue Smoke-AndGlass SKIN SKIN SKIN SKIN ASP.NET-ClientFiles Theme   name = Subdirectory name
Skins and Themes - Local Themes Shocking-Pink Autumn-Leaves SKIN SKIN SKIN SKIN vroot Theme name = Subdirectory name
Skins and Themes – Named Skins ,[object Object],[object Object],[object Object],[object Object],[object Object]
Skins and Thems – Named Skins (Defining and Using) <!-- Default look for DropDownList controls --> <asp:DropDownList runat=&quot;server&quot; BackColor=&quot;blue&quot; ForeColor=&quot;white&quot; SkinID=&quot;Blue&quot; /> <!-- Default look for DataGrid conotrols --> <asp:DataGrid runat=&quot;server&quot; BackColor=&quot;#CCCCCC&quot; BorderWidth=&quot;2pt&quot; BorderStyle=&quot;Solid&quot; BorderColor=&quot;#CCCCCC&quot; GridLines=&quot;Vertical&quot; HorizontalAlign=&quot;Left&quot; SkinID=&quot;Blue&quot;> <HeaderStyle ForeColor=&quot;white&quot; BackColor=&quot;blue&quot; /> <ItemStyle ForeColor=&quot;black&quot; BackColor=&quot;white&quot; /> <AlternatingItemStyle BackColor=&quot;lightblue&quot; ForeColor=&quot;black&quot; /> </asp:DataGrid> ... <asp:DropDownList ID=&quot;Countries&quot; SkinID=&quot;Blue&quot; RunAt=&quot;server&quot; />
Administration & Management
A&M - Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A&M – ASP.NET MMC Snap-In ,[object Object]
A&M – Web Site Administration Tool (WAT) ,[object Object],Invoked by requesting Webadmin.axd or using the &quot;ASP.NET Configuration&quot; command in Visual Studio's Website menu
A&M – Configuration class ,[object Object],[object Object],[object Object],[object Object]
A&M – Configuration Class Methods   Name Description GetExeConfiguration Returns a Configuration object representing config settings for a managed EXE GetMachineConfiguration Returns a Configuration object representing configuration settings for the specified server GetWebConfiguration Returns a Configuration object representing configuration settings for the specified Web application GetSectionGroup Returns a ConfigurationSectionGroup object representing the specified section group Update Records changes in the relevant configuration file GetSection Returns a ConfigurationSection object representing the specified section (e.g., <appSettings>
A&M – Configuration class properties Name Description AppSettings Returns an AppSettingsSection object representing the <appSettings> section ConnectionStrings Returns a ConnectionStringsSection object representing the <connectionsStrings> section HasFile True if there's a corresponding configuration file, false if not SectionGroups Returns a ConfigurationSectionGroupCollection representing all section groups Sections Returns a ConfigurationSectionCollection representing all sections Path Path to the app represented by this Configuration object
A&M – Configuration example (Reading Connection String) ‘ Read a connection string from <connectionStrings> Dim connect As string = ConfigurationSettings.ConnectionStrings(&quot;Northwind“).ConnectionString ‘ Add a connection string to <connectionStrings> Dim config As Configuration = Configuration.GetWebConfiguration (Request.ApplicationPath) config.ConnectionStrings.ConnectionStrings.Add (new ConnectionStringSettings (&quot;Northwind&quot;, &quot;server=localhost;database=northwind;integrated security=true&quot;) config.Update () // Important!
A&M – ASP.NET Instrumentation Name Description Performance   counters New peformance counters supplement the ones introduced in ASP.NET 1.x Windows event tracing Integration with ETW subsystem to support low-overhead tracing of HTTP requests through the system Application tracing ASP.NET trace facility upgraded with new features and to allow coupling to System.Diagnostics.Trace Health monitoring New provider-based subsystem for logging notable events (&quot;Web events&quot;) that occur during an application's lifetime
Handling Data
Handling Data – DataSource control ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Handling Data – Data Bound Server controls ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Site Navigation
Site Navigation - Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Site Navigation - Schema Site Navigation API Site Maps Web.sitemap Other Data Stores Controls Menu TreeView SiteMapPath SiteMap- DataSource SiteMap SiteMapNode SiteMapNode SiteMapNode XmlSiteMapProvider Other Site Map Providers Providers
Site Navigation – TreeView Example <asp:TreeView ShowLines=&quot;true&quot; Font-Name=&quot;Verdana&quot; Font-Size=&quot;10pt&quot; ... > <SelectedNodeStyle BackColor=&quot;Yellow&quot; /> <HoverNodeStyle BackColor=&quot;LightBlue&quot; /> <Nodes> <asp:TreeNode Text=&quot;Not selectable&quot; SelectAction=&quot;None&quot; RunAt=&quot;server&quot;> <asp:TreeNode Text=&quot;Selectable&quot; SelectAction=&quot;Select&quot; RunAt=&quot;server&quot; > <asp:TreeNode Text=&quot;Click to expand or collapse&quot; SelectAction=&quot;Expand&quot; Runat=&quot;server&quot;> <asp:TreeNode Text=&quot;Click to select and expand or collapse&quot; SelectAction=&quot;SelectExpand&quot; Runat=&quot;server&quot;> <asp:TreeNode Text=&quot;Check box node&quot; ShowCheckBox=&quot;true&quot; Runat=&quot;server&quot;> <asp:TreeNode Text=&quot;Click to navigate&quot; NavigateUrl=&quot;...&quot; Runat=&quot;server&quot; /> </asp:TreeNode> </asp:TreeNode> </asp:TreeNode> </asp:TreeNode> </asp:TreeNode> </Nodes> </asp:TreeView>
Site Navigation – Menu Control <asp:Menu Orientation=&quot;Horizontal&quot; RunAt=&quot;server&quot;> <Items> <asp:MenuItem Text=&quot;Training&quot; RunAt=&quot;server&quot;> <asp:MenuItem Text=&quot;Programming .NET&quot; RunAt=&quot;server&quot; Navigateurl=&quot;Classes.aspx?id=1&quot; /> <asp:MenuItem Text=&quot;Programming ASP.NET&quot; RunAt=&quot;server&quot; NavigateUrl=&quot;Classes.aspx?id=2&quot; /> <asp:MenuItem Text=&quot;Programming Web Services&quot; RunAt=&quot;server&quot; NavigateUrl=&quot;Classes.aspx?id=3&quot; /> </asp:MenuItem> <asp:MenuItem Text=&quot;Consulting&quot; RunAt=&quot;server&quot; NavigateUrl=&quot;Consulting.aspx&quot; /> <asp:MenuItem Text=&quot;Debugging&quot; RunAt=&quot;server&quot; NavigateUrl=&quot;Debugging.aspx&quot; /> </Items> </asp:Menu>
Site Navagation - SiteMap <siteMap> <siteMapNode title=&quot;Home&quot; description=&quot;&quot; url=&quot;default.aspx&quot;> <siteMapNode title=&quot;Training&quot; url=&quot;Training.aspx&quot; description=&quot;Training for .NET developers&quot;> <siteMapNode title=&quot;Programming .NET&quot; url=&quot;Classes.aspx?id=1&quot; description=&quot;All about the .NET Framework&quot; /> <siteMapNode title=&quot;Programming ASP.NET&quot; url=&quot;Classes.aspx?id=2&quot; description=&quot;All about ASP.NET&quot; /> <siteMapNode title=&quot;Programming Web Services&quot; url=&quot;Classes.aspx?id=3&quot; description=&quot;All about Web services&quot; /> </siteMapNode> <siteMapNode title=&quot;Consulting&quot; url=&quot;Consulting.aspx&quot; description=&quot;Consulting for .NET projects&quot; /> <siteMapNode title=&quot;Debugging&quot; url=&quot;Debugging.aspx&quot; description=&quot;Help when you need it the most&quot; /> </siteMapNode> </siteMap>
Site Navigation – TreeView and SiteMap <siteMap> <siteMapNode title=&quot;Home&quot; description=&quot;&quot; url=&quot;default.aspx&quot;> <siteMapNode title=&quot;Training&quot; url=&quot;Training.aspx&quot; description=&quot;Training for .NET developers&quot;> <siteMapNode title=&quot;Programming .NET&quot; url=&quot;Classes.aspx?id=1&quot; description=&quot;All about the .NET Framework&quot; /> <siteMapNode title=&quot;Programming ASP.NET&quot; url=&quot;Classes.aspx?id=2&quot; description=&quot;All about ASP.NET&quot; /> <siteMapNode title=&quot;Programming Web Services&quot; url=&quot;Classes.aspx?id=3&quot; description=&quot;All about Web services&quot; /> </siteMapNode> <siteMapNode title=&quot;Consulting&quot; url=&quot;Consulting.aspx&quot; description=&quot;Consulting for .NET projects&quot; /> <siteMapNode title=&quot;Debugging&quot; url=&quot;Debugging.aspx&quot; description=&quot;Help when you need it the most&quot; /> </siteMapNode> </siteMap> Web.sitemap <asp:SiteMapDataSource ID=&quot;SiteMap&quot; RunAt=&quot;server&quot; /> <asp:TreeView DataSourceID=&quot;SiteMap&quot; RunAt=&quot;server&quot; />
Site Navigation – Menu and SiteMap <asp:SiteMapDataSource ID=&quot;SiteMap&quot; RunAt=&quot;server&quot; /> <asp:Menu DataSourceID=&quot;SiteMap&quot; RunAt=&quot;server&quot; /> <siteMap> <siteMapNode title=&quot;Home&quot; description=&quot;&quot; url=&quot;default.aspx&quot;> <siteMapNode title=&quot;Training&quot; url=&quot;Training.aspx&quot; description=&quot;Training for .NET developers&quot;> <siteMapNode title=&quot;Programming .NET&quot; url=&quot;Classes.aspx?id=1&quot; description=&quot;All about the .NET Framework&quot; /> <siteMapNode title=&quot;Programming ASP.NET&quot; url=&quot;Classes.aspx?id=2&quot; description=&quot;All about ASP.NET&quot; /> <siteMapNode title=&quot;Programming Web Services&quot; url=&quot;Classes.aspx?id=3&quot; description=&quot;All about Web services&quot; /> </siteMapNode> <siteMapNode title=&quot;Consulting&quot; url=&quot;Consulting.aspx&quot; description=&quot;Consulting for .NET projects&quot; /> <siteMapNode title=&quot;Debugging&quot; url=&quot;Debugging.aspx&quot; description=&quot;Help when you need it the most&quot; /> </siteMapNode> </siteMap> Web.sitemap
Site Navigation – SiteMap API Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Hyperlink1.Text = SiteMap.CurrentNode.ParentNode.ToString() Hyperlink1.NavigateUrl = SiteMap.CurrentNode.ParentNode.Url Hyperlink2.Text = SiteMap.CurrentNode.PreviousSibling.ToString() Hyperlink2.NavigateUrl = SiteMap.CurrentNode.PreviousSibling.Url Hyperlink3.Text = SiteMap.CurrentNode.NextSibling.ToString() Hyperlink3.NavigateUrl = SiteMap.CurrentNode.NextSibling.Url End Sub <html xmlns=”http://www.w3.org/1999/xhtml” > <head runat=”server”> <title>SiteMapDataSource</title> </head> <body> <form id=”form1” runat=”server”> Move Up: <asp:Hyperlink ID=”Hyperlink1” Runat=”server”></asp:Hyperlink><br /> <-- <asp:Hyperlink ID=”Hyperlink2” Runat=”server”></asp:Hyperlink> | <asp:Hyperlink ID=”Hyperlink3” Runat=”server”></asp:Hyperlink> --> </form> </body> </html>
Summary – ASAP.Net ,[object Object],[object Object],[object Object],[object Object]

Mais conteúdo relacionado

Mais procurados

6.Resource Exhaustion
6.Resource Exhaustion6.Resource Exhaustion
6.Resource Exhaustion
phanleson
 
Classloading and Type Visibility in OSGi
Classloading and Type Visibility in OSGiClassloading and Type Visibility in OSGi
Classloading and Type Visibility in OSGi
martinlippert
 
Advanced java programming-contents
Advanced java programming-contentsAdvanced java programming-contents
Advanced java programming-contents
Self-Employed
 
Chapter1 introduction to asp.net
Chapter1  introduction to asp.netChapter1  introduction to asp.net
Chapter1 introduction to asp.net
mentorrbuddy
 

Mais procurados (20)

6.Resource Exhaustion
6.Resource Exhaustion6.Resource Exhaustion
6.Resource Exhaustion
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
The Enterprise Case for Node.js
The Enterprise Case for Node.jsThe Enterprise Case for Node.js
The Enterprise Case for Node.js
 
Java spring framework
Java spring frameworkJava spring framework
Java spring framework
 
Spring Framework - MVC
Spring Framework - MVCSpring Framework - MVC
Spring Framework - MVC
 
BGA CTF Ethical Hacking Yarışması Çözümleri
BGA CTF Ethical Hacking Yarışması ÇözümleriBGA CTF Ethical Hacking Yarışması Çözümleri
BGA CTF Ethical Hacking Yarışması Çözümleri
 
ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015
 
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
 
Introduction to asp
Introduction to aspIntroduction to asp
Introduction to asp
 
Classloading and Type Visibility in OSGi
Classloading and Type Visibility in OSGiClassloading and Type Visibility in OSGi
Classloading and Type Visibility in OSGi
 
Spring Web MVC
Spring Web MVCSpring Web MVC
Spring Web MVC
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
Advance Java Programming (CM5I) 6.Servlet
Advance Java Programming (CM5I) 6.ServletAdvance Java Programming (CM5I) 6.Servlet
Advance Java Programming (CM5I) 6.Servlet
 
MVC Architecture in ASP.Net By Nyros Developer
MVC Architecture in ASP.Net By Nyros DeveloperMVC Architecture in ASP.Net By Nyros Developer
MVC Architecture in ASP.Net By Nyros Developer
 
Dynamic components using SPA concepts in AEM
Dynamic components using SPA concepts in AEMDynamic components using SPA concepts in AEM
Dynamic components using SPA concepts in AEM
 
Spring MVC 3.0 Framework
Spring MVC 3.0 FrameworkSpring MVC 3.0 Framework
Spring MVC 3.0 Framework
 
Use Node.js to create a REST API
Use Node.js to create a REST APIUse Node.js to create a REST API
Use Node.js to create a REST API
 
Advanced java programming-contents
Advanced java programming-contentsAdvanced java programming-contents
Advanced java programming-contents
 
Springboot introduction
Springboot introductionSpringboot introduction
Springboot introduction
 
Chapter1 introduction to asp.net
Chapter1  introduction to asp.netChapter1  introduction to asp.net
Chapter1 introduction to asp.net
 

Destaque (7)

SLAUGHTERHOUSE
SLAUGHTERHOUSESLAUGHTERHOUSE
SLAUGHTERHOUSE
 
Information Technology Report
Information Technology ReportInformation Technology Report
Information Technology Report
 
Tateiju EspañA GuíA Del Inmigrante Segundo Numero
Tateiju EspañA GuíA Del Inmigrante Segundo NumeroTateiju EspañA GuíA Del Inmigrante Segundo Numero
Tateiju EspañA GuíA Del Inmigrante Segundo Numero
 
Quickpoint How To
Quickpoint How ToQuickpoint How To
Quickpoint How To
 
Quickword How To
Quickword How ToQuickword How To
Quickword How To
 
Arts Education And Creativity.Pcah Reinvesting 4web
Arts Education And Creativity.Pcah Reinvesting 4webArts Education And Creativity.Pcah Reinvesting 4web
Arts Education And Creativity.Pcah Reinvesting 4web
 
رواية 4
رواية 4رواية 4
رواية 4
 

Semelhante a Aspnet2 Overview

Master pages ppt
Master pages pptMaster pages ppt
Master pages ppt
Iblesoft
 
Advanced SEO for Web Developers
Advanced SEO for Web DevelopersAdvanced SEO for Web Developers
Advanced SEO for Web Developers
Nathan Buggia
 
Google在Web前端方面的经验
Google在Web前端方面的经验Google在Web前端方面的经验
Google在Web前端方面的经验
yiditushe
 

Semelhante a Aspnet2 Overview (20)

EPiServer Web Parts
EPiServer Web PartsEPiServer Web Parts
EPiServer Web Parts
 
Master pages ppt
Master pages pptMaster pages ppt
Master pages ppt
 
Vb.Net Web Forms
Vb.Net  Web FormsVb.Net  Web Forms
Vb.Net Web Forms
 
Developing PHP Web Applications with the Raxan Framework
Developing PHP Web Applications with the Raxan FrameworkDeveloping PHP Web Applications with the Raxan Framework
Developing PHP Web Applications with the Raxan Framework
 
Intro To Asp Net And Web Forms
Intro To Asp Net And Web FormsIntro To Asp Net And Web Forms
Intro To Asp Net And Web Forms
 
Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09
 
Introduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformIntroduction to Alfresco Surf Platform
Introduction to Alfresco Surf Platform
 
ASP.NET MVC
ASP.NET MVCASP.NET MVC
ASP.NET MVC
 
Real-World AJAX with ASP.NET
Real-World AJAX with ASP.NETReal-World AJAX with ASP.NET
Real-World AJAX with ASP.NET
 
ASP.NET MVC introduction
ASP.NET MVC introductionASP.NET MVC introduction
ASP.NET MVC introduction
 
Advanced SEO for Web Developers
Advanced SEO for Web DevelopersAdvanced SEO for Web Developers
Advanced SEO for Web Developers
 
Introduction To ASP.NET MVC
Introduction To ASP.NET MVCIntroduction To ASP.NET MVC
Introduction To ASP.NET MVC
 
Getting More Traffic From Search Advanced Seo For Developers Presentation
Getting More Traffic From Search  Advanced Seo For Developers PresentationGetting More Traffic From Search  Advanced Seo For Developers Presentation
Getting More Traffic From Search Advanced Seo For Developers Presentation
 
2 Asp Dot Net Ajax Extensions
2 Asp Dot Net Ajax Extensions2 Asp Dot Net Ajax Extensions
2 Asp Dot Net Ajax Extensions
 
Internet Explorer 8 for Developers by Christian Thilmany
Internet Explorer 8 for Developers by Christian ThilmanyInternet Explorer 8 for Developers by Christian Thilmany
Internet Explorer 8 for Developers by Christian Thilmany
 
Front End Website Optimization
Front End Website OptimizationFront End Website Optimization
Front End Website Optimization
 
Web performance testing
Web performance testingWeb performance testing
Web performance testing
 
Jsp
JspJsp
Jsp
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Google在Web前端方面的经验
Google在Web前端方面的经验Google在Web前端方面的经验
Google在Web前端方面的经验
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

Aspnet2 Overview

  • 1. ASAP to ASP.NET 2.0 Noam King CTO Sela youniversity
  • 2.
  • 3. Introduction to ASP.NET 2.0 Data Controls Login Controls Web Parts Other New Controls Master Pages Themes and Skins Mobility and Localization Compilation Membership Role Management Profiles Configuration Site Maps Health Monitoring Other Services Controls Page Framework Services and APIs
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. Architecture – Code Page Posting If Page.IsCrossPagePostBack Then Label1.Text = “Hello “ & PreviousPage.pp_Textbox1.Text & “<br />” & _ “ Date Selected: “ & _ PreviousPage.pp_Calendar1.Sele ctedDate.ToShortDateString() Else Response.Redirect(“Page1.aspx”) End If
  • 12.
  • 13.
  • 15.
  • 16.
  • 17.
  • 18. Master Pages – Weak Typing (CType(Master.FindControl (&quot;Title&quot;), Label).Text = &quot;Orders&quot; In the content page… <asp:Label ID=&quot;Title&quot; RunAt=&quot;server&quot; /> In the master page…
  • 19. Master Pages – Strong Typing Master.TitleText = &quot;Orders&quot; In the content page… <asp:Label ID=&quot;Title&quot; RunAt=&quot;server&quot; /> . . . <script language=“VB&quot; runat=&quot;server&quot;> Public Property TitleText as string Get return Title.Text End Get Set Title.Text = value End Set End Property </script> In the master page…
  • 20. Master Pages - Nesting Master Page IDF (idf.master) Master Page IDF North (idfnorth.master) Master Page IDF South (idfsouth.master) Content page1 (default.aspx) Content Page2 (default2.aspx) Content Page3 (default3.aspx) Content Page4 (default4.aspx)
  • 21.
  • 22.
  • 23.
  • 25.
  • 26.
  • 27. Personalization - Groups <group name=”MemberDetails”> <add name=”Member” /> <add name=”DateJoined” /> <add name=”PaidDuesStatus” /> <add name=”Location” /> </group> Label1.Text = Profile.MemberDetails.DateJoined Configuration Using
  • 28.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34. Web Parts – Catalog Zone <asp:CatalogZone ID=&quot;CatalogZone1&quot; Runat=&quot;server&quot;> <ZoneTemplate> <asp:PageCatalogPart ID=&quot;PageCatalogPart1&quot; Runat=&quot;server&quot; /> <asp:DeclarativeCatalogPart ID=&quot;DeclarativeCatalogPart1&quot; Runat=&quot;server&quot;> <WebPartsTemplate> <!-- Declarative Web Parts go here --> </WebPartsTemplate> </asp:DeclarativeCatalogPart> <asp:ImportCatalogPart ID=&quot;ImportCatalogPart1&quot; Runat=&quot;server&quot; /> </ZoneTemplate> </asp:CatalogZone> DeclarativeCatalogPart
  • 35. Web Parts - EditorZone <asp:EditorZone ID=&quot;EditorZone1&quot; Runat=&quot;server&quot;> <ZoneTemplate> <asp:AppearanceEditorPart ID=&quot;AppearanceEditorPart1&quot; Runat=&quot;server&quot; /> <asp:BehaviorEditorPart ID=&quot;BehaviorEditorPart1&quot; Runat=&quot;server&quot; /> <asp:LayoutEditorPart ID=&quot;LayoutEditorPart1&quot; Runat=&quot;server&quot; /> </ZoneTemplate> </asp:EditorZone>
  • 36.
  • 37. Web Parts – Custom Web Parts (cont.) public class MyWebPart : WebPart { public override WebPartVerbCollection Verbs { get { EnsureChildControls (); WebPartVerb verb = new WebPartVerb (new WebPartEventHandler (OnClearResults)); verb.Text = &quot;Clear Results&quot;; WebPartVerb[] verbs = new WebPartVerb[] { verb }; return new WebPartVerbCollection (base.Verbs, verbs); } } void OnClearResults (object sender, WebPartEventArgs args) { ... } ... }
  • 39.
  • 40. Skins and Themes - Applying <%@ Page Theme=&quot;BasicBlue&quot;> <configuration> <system.web> <pages theme=&quot;BasicBlue&quot; /> </system.web> </configuration> Sub Page_PreInit (ByVal sender As Object, ByVal e As EventArgs) Page.Theme = &quot;BasicBlue&quot; End Sub On a page On a Site Programmatically
  • 41. Skins And Themes – Global Themes BasicBlue Smoke-AndGlass SKIN SKIN SKIN SKIN ASP.NET-ClientFiles Theme name = Subdirectory name
  • 42. Skins and Themes - Local Themes Shocking-Pink Autumn-Leaves SKIN SKIN SKIN SKIN vroot Theme name = Subdirectory name
  • 43.
  • 44. Skins and Thems – Named Skins (Defining and Using) <!-- Default look for DropDownList controls --> <asp:DropDownList runat=&quot;server&quot; BackColor=&quot;blue&quot; ForeColor=&quot;white&quot; SkinID=&quot;Blue&quot; /> <!-- Default look for DataGrid conotrols --> <asp:DataGrid runat=&quot;server&quot; BackColor=&quot;#CCCCCC&quot; BorderWidth=&quot;2pt&quot; BorderStyle=&quot;Solid&quot; BorderColor=&quot;#CCCCCC&quot; GridLines=&quot;Vertical&quot; HorizontalAlign=&quot;Left&quot; SkinID=&quot;Blue&quot;> <HeaderStyle ForeColor=&quot;white&quot; BackColor=&quot;blue&quot; /> <ItemStyle ForeColor=&quot;black&quot; BackColor=&quot;white&quot; /> <AlternatingItemStyle BackColor=&quot;lightblue&quot; ForeColor=&quot;black&quot; /> </asp:DataGrid> ... <asp:DropDownList ID=&quot;Countries&quot; SkinID=&quot;Blue&quot; RunAt=&quot;server&quot; />
  • 46.
  • 47.
  • 48.
  • 49.
  • 50. A&M – Configuration Class Methods Name Description GetExeConfiguration Returns a Configuration object representing config settings for a managed EXE GetMachineConfiguration Returns a Configuration object representing configuration settings for the specified server GetWebConfiguration Returns a Configuration object representing configuration settings for the specified Web application GetSectionGroup Returns a ConfigurationSectionGroup object representing the specified section group Update Records changes in the relevant configuration file GetSection Returns a ConfigurationSection object representing the specified section (e.g., <appSettings>
  • 51. A&M – Configuration class properties Name Description AppSettings Returns an AppSettingsSection object representing the <appSettings> section ConnectionStrings Returns a ConnectionStringsSection object representing the <connectionsStrings> section HasFile True if there's a corresponding configuration file, false if not SectionGroups Returns a ConfigurationSectionGroupCollection representing all section groups Sections Returns a ConfigurationSectionCollection representing all sections Path Path to the app represented by this Configuration object
  • 52. A&M – Configuration example (Reading Connection String) ‘ Read a connection string from <connectionStrings> Dim connect As string = ConfigurationSettings.ConnectionStrings(&quot;Northwind“).ConnectionString ‘ Add a connection string to <connectionStrings> Dim config As Configuration = Configuration.GetWebConfiguration (Request.ApplicationPath) config.ConnectionStrings.ConnectionStrings.Add (new ConnectionStringSettings (&quot;Northwind&quot;, &quot;server=localhost;database=northwind;integrated security=true&quot;) config.Update () // Important!
  • 53. A&M – ASP.NET Instrumentation Name Description Performance counters New peformance counters supplement the ones introduced in ASP.NET 1.x Windows event tracing Integration with ETW subsystem to support low-overhead tracing of HTTP requests through the system Application tracing ASP.NET trace facility upgraded with new features and to allow coupling to System.Diagnostics.Trace Health monitoring New provider-based subsystem for logging notable events (&quot;Web events&quot;) that occur during an application's lifetime
  • 55.
  • 56.
  • 58.
  • 59. Site Navigation - Schema Site Navigation API Site Maps Web.sitemap Other Data Stores Controls Menu TreeView SiteMapPath SiteMap- DataSource SiteMap SiteMapNode SiteMapNode SiteMapNode XmlSiteMapProvider Other Site Map Providers Providers
  • 60. Site Navigation – TreeView Example <asp:TreeView ShowLines=&quot;true&quot; Font-Name=&quot;Verdana&quot; Font-Size=&quot;10pt&quot; ... > <SelectedNodeStyle BackColor=&quot;Yellow&quot; /> <HoverNodeStyle BackColor=&quot;LightBlue&quot; /> <Nodes> <asp:TreeNode Text=&quot;Not selectable&quot; SelectAction=&quot;None&quot; RunAt=&quot;server&quot;> <asp:TreeNode Text=&quot;Selectable&quot; SelectAction=&quot;Select&quot; RunAt=&quot;server&quot; > <asp:TreeNode Text=&quot;Click to expand or collapse&quot; SelectAction=&quot;Expand&quot; Runat=&quot;server&quot;> <asp:TreeNode Text=&quot;Click to select and expand or collapse&quot; SelectAction=&quot;SelectExpand&quot; Runat=&quot;server&quot;> <asp:TreeNode Text=&quot;Check box node&quot; ShowCheckBox=&quot;true&quot; Runat=&quot;server&quot;> <asp:TreeNode Text=&quot;Click to navigate&quot; NavigateUrl=&quot;...&quot; Runat=&quot;server&quot; /> </asp:TreeNode> </asp:TreeNode> </asp:TreeNode> </asp:TreeNode> </asp:TreeNode> </Nodes> </asp:TreeView>
  • 61. Site Navigation – Menu Control <asp:Menu Orientation=&quot;Horizontal&quot; RunAt=&quot;server&quot;> <Items> <asp:MenuItem Text=&quot;Training&quot; RunAt=&quot;server&quot;> <asp:MenuItem Text=&quot;Programming .NET&quot; RunAt=&quot;server&quot; Navigateurl=&quot;Classes.aspx?id=1&quot; /> <asp:MenuItem Text=&quot;Programming ASP.NET&quot; RunAt=&quot;server&quot; NavigateUrl=&quot;Classes.aspx?id=2&quot; /> <asp:MenuItem Text=&quot;Programming Web Services&quot; RunAt=&quot;server&quot; NavigateUrl=&quot;Classes.aspx?id=3&quot; /> </asp:MenuItem> <asp:MenuItem Text=&quot;Consulting&quot; RunAt=&quot;server&quot; NavigateUrl=&quot;Consulting.aspx&quot; /> <asp:MenuItem Text=&quot;Debugging&quot; RunAt=&quot;server&quot; NavigateUrl=&quot;Debugging.aspx&quot; /> </Items> </asp:Menu>
  • 62. Site Navagation - SiteMap <siteMap> <siteMapNode title=&quot;Home&quot; description=&quot;&quot; url=&quot;default.aspx&quot;> <siteMapNode title=&quot;Training&quot; url=&quot;Training.aspx&quot; description=&quot;Training for .NET developers&quot;> <siteMapNode title=&quot;Programming .NET&quot; url=&quot;Classes.aspx?id=1&quot; description=&quot;All about the .NET Framework&quot; /> <siteMapNode title=&quot;Programming ASP.NET&quot; url=&quot;Classes.aspx?id=2&quot; description=&quot;All about ASP.NET&quot; /> <siteMapNode title=&quot;Programming Web Services&quot; url=&quot;Classes.aspx?id=3&quot; description=&quot;All about Web services&quot; /> </siteMapNode> <siteMapNode title=&quot;Consulting&quot; url=&quot;Consulting.aspx&quot; description=&quot;Consulting for .NET projects&quot; /> <siteMapNode title=&quot;Debugging&quot; url=&quot;Debugging.aspx&quot; description=&quot;Help when you need it the most&quot; /> </siteMapNode> </siteMap>
  • 63. Site Navigation – TreeView and SiteMap <siteMap> <siteMapNode title=&quot;Home&quot; description=&quot;&quot; url=&quot;default.aspx&quot;> <siteMapNode title=&quot;Training&quot; url=&quot;Training.aspx&quot; description=&quot;Training for .NET developers&quot;> <siteMapNode title=&quot;Programming .NET&quot; url=&quot;Classes.aspx?id=1&quot; description=&quot;All about the .NET Framework&quot; /> <siteMapNode title=&quot;Programming ASP.NET&quot; url=&quot;Classes.aspx?id=2&quot; description=&quot;All about ASP.NET&quot; /> <siteMapNode title=&quot;Programming Web Services&quot; url=&quot;Classes.aspx?id=3&quot; description=&quot;All about Web services&quot; /> </siteMapNode> <siteMapNode title=&quot;Consulting&quot; url=&quot;Consulting.aspx&quot; description=&quot;Consulting for .NET projects&quot; /> <siteMapNode title=&quot;Debugging&quot; url=&quot;Debugging.aspx&quot; description=&quot;Help when you need it the most&quot; /> </siteMapNode> </siteMap> Web.sitemap <asp:SiteMapDataSource ID=&quot;SiteMap&quot; RunAt=&quot;server&quot; /> <asp:TreeView DataSourceID=&quot;SiteMap&quot; RunAt=&quot;server&quot; />
  • 64. Site Navigation – Menu and SiteMap <asp:SiteMapDataSource ID=&quot;SiteMap&quot; RunAt=&quot;server&quot; /> <asp:Menu DataSourceID=&quot;SiteMap&quot; RunAt=&quot;server&quot; /> <siteMap> <siteMapNode title=&quot;Home&quot; description=&quot;&quot; url=&quot;default.aspx&quot;> <siteMapNode title=&quot;Training&quot; url=&quot;Training.aspx&quot; description=&quot;Training for .NET developers&quot;> <siteMapNode title=&quot;Programming .NET&quot; url=&quot;Classes.aspx?id=1&quot; description=&quot;All about the .NET Framework&quot; /> <siteMapNode title=&quot;Programming ASP.NET&quot; url=&quot;Classes.aspx?id=2&quot; description=&quot;All about ASP.NET&quot; /> <siteMapNode title=&quot;Programming Web Services&quot; url=&quot;Classes.aspx?id=3&quot; description=&quot;All about Web services&quot; /> </siteMapNode> <siteMapNode title=&quot;Consulting&quot; url=&quot;Consulting.aspx&quot; description=&quot;Consulting for .NET projects&quot; /> <siteMapNode title=&quot;Debugging&quot; url=&quot;Debugging.aspx&quot; description=&quot;Help when you need it the most&quot; /> </siteMapNode> </siteMap> Web.sitemap
  • 65. Site Navigation – SiteMap API Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Hyperlink1.Text = SiteMap.CurrentNode.ParentNode.ToString() Hyperlink1.NavigateUrl = SiteMap.CurrentNode.ParentNode.Url Hyperlink2.Text = SiteMap.CurrentNode.PreviousSibling.ToString() Hyperlink2.NavigateUrl = SiteMap.CurrentNode.PreviousSibling.Url Hyperlink3.Text = SiteMap.CurrentNode.NextSibling.ToString() Hyperlink3.NavigateUrl = SiteMap.CurrentNode.NextSibling.Url End Sub <html xmlns=”http://www.w3.org/1999/xhtml” > <head runat=”server”> <title>SiteMapDataSource</title> </head> <body> <form id=”form1” runat=”server”> Move Up: <asp:Hyperlink ID=”Hyperlink1” Runat=”server”></asp:Hyperlink><br /> <-- <asp:Hyperlink ID=”Hyperlink2” Runat=”server”></asp:Hyperlink> | <asp:Hyperlink ID=”Hyperlink3” Runat=”server”></asp:Hyperlink> --> </form> </body> </html>
  • 66.