SlideShare a Scribd company logo
1 of 15
adRotator.aspx 
(1 of 3) 
1 <%@ Page Language="JScript" 
2 Src="adRotator.aspx.js" Inherits="MyCodeBehind" %> 
3 
4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
5 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
6 
7 <!-- Fig. 23.34: adRotator.aspx --> 
8 <!-- ASP.NET AdRotator example --> 
9 
10 <html> 
11 <head> 
12 <title>Using An AdRotator</title> 
13 </head> 
14 
15 <body> 
16 <form action = "adRotator.aspx" method = "post" runat = "server"> 
17 
18 <asp:AdRotator AdvertisementFile = "ads.xml" 
19 BorderColor = "black" BorderWidth = "1" runat = "server"/> 
20 
21 <table> 
22 <tr> 
23 <td> 
24 Name: <asp:TextBox id = "name" runat = "server"/> 
25 </td>
adRotator.aspx 
(2 of 3) 
26 <td> 
27 <asp:RequiredFieldValidator id = "requiredCheck" 
28 ControlToValidate = "name" 
29 Display = "Static" 
30 runat = "server"> 
31 Please enter your name. 
32 </asp:RequiredFieldValidator> 
33 </td> 
34 </tr> 
35 </table> 
36 
37 <br /> 
38 Do you like ice cream? 
39 
40 <asp:RadioButtonList id = "iceCream" runat = "server"> 
41 <asp:ListItem>Yes</asp:ListItem> 
42 <asp:ListItem>No</asp:ListItem> 
43 </asp:RadioButtonList> 
44 
45 <br /> 
46 How many scoops would you like? (0-45) 
47 
48 <asp:TextBox id = "scoops" runat = "server" /> 
49 
50 <br />
adRotator.aspx 
(3 of 3) 
51 <asp:button text = "Submit" OnClick = "submitButton_Click" 
52 runat = "server"/> 
53 
54 <asp:RangeValidator id = "rangeCheck" 
55 ControlToValidate = "scoops" 
56 MinimumValue = "0" 
57 MaximumValue = "45" 
58 Type = "Integer" 
59 EnableClientScript = "false" 
60 Text = "We cannot give you that many scoops." 
61 runat = "server" /> 
62 
63 <center> 
64 <h1> <asp:label id = "message" runat = "server"/> </h1> 
65 </center> 
66 
67 </form> 
68 </body> 
69 </html>
adRotator.aspx.js 
(1 of 2) 
1 // Fig 23.35: adRotator.aspx.js 
2 // Code-behind for the adRotator.aspx 
3 // user interface. 
4 
5 import System; 
6 import System.Web.UI; 
7 import System.Web.UI.WebControls; 
8 
9 public class MyCodeBehind extends Page 
10 { 
11 protected var name : TextBox; 
12 protected var scoops : TextBox; 
13 protected var iceCream : RadioButtonList; 
14 protected var message : Label; 
15 
16 public function submitButton_Click( 
17 sender : Object, events : EventArgs ) : void 
18 { 
19 if ( IsPostBack ) 
20 { 
21 if ( iceCream.SelectedItem == "Yes" ) 
22 { 
23 message.Text = name.Text + " likes ice cream."; 
24 }
adRotator.aspx.js 
(2 of 2) 
25 else 
26 { 
27 message.Text = name.Text + " does not like ice cream."; 
28 } 
29 } 
30 } // end submitButton_Click 
31 } // end class MyCodeBehind
23.11 Code-Behind Approach 
Fig. 23.36 Using the command prompt to compile the code-behind.
23.11 Code-Behind Approach 
Fig. 23.37 Output of AdRotator.aspx using the code-behind method.
23.12 ASP.NET Web Services 
• Enables distributed computing by allowing 
one machine to call methods on other 
machines 
• Defining the Web Service 
– Remote machine 
• Store Web service 
• Web-service methods 
– Remote Procedure Call (RPC) 
– Business-to-business (B2B) transactions 
• Viewing the Web Service 
– Service Description 
• Web Service Description Language (WSDL)
number.asmx 
(1 of 2) 
1 <%@ WebService Language="JScript" Class="NumberService" %> 
2 
3 // Fig. 23.38: number.asmx 
4 // A simple Web Service 
5 
6 import System; 
7 import System.Web.Services; 
8 
9 public class NumberService extends WebService 
10 { 
11 // Determines whether all the characters in a String are digits 
12 WebMethod public function isNum( number : String ) : Boolean 
13 { 
14 var digitArray : char[]; 
15 digitArray = number.ToCharArray(); 
16 
17 for ( var i : int = 0; i < digitArray.Length ; i++ ) 
18 { 
19 if ( !Char.IsDigit( digitArray[ i ] ) ) 
20 { 
21 return false; 
22 } 
23 } 
24
number.asmx 
(2 of 2) 
25 return true; 
26 } // end isNum 
27 
28 WebMethod public function Add( a : float, b : float) : float { 
29 return a + b; 
30 } 
31 } // end class NumberService
23.12 ASP.NET Web Services 
Links to 
Web 
service 
methods 
Link to 
service 
description 
Fig. 23.39 ASMX file rendered in Internet Explorer.
23.12 ASP.NET Web Services 
Fig. 23.40 Service description for a Web service.
23.12 ASP.NET Web Services 
Fig. 23.41 Invoking a method of a Web service from a Web browser.
23.12 ASP.NET Web Services 
Fig. 23.42 Results of invoking a Web-service method from a Web browser.
23.13 Web Resources 
• www.asp.net 
• www.asp101.com/aspdotnet/aspplus/index.asp 
• www.411asp.net 
• www.aspfree.com 
• www.aspng.com 
• www.aspnetfaq.com 
• www.123aspx.com 
• msdn.microsoft.com/netframework 
• www.xmlforasp.net 
• www.ondotnet.com/topics/dotnet/asp.net

More Related Content

Similar to Synapse india reviews sharing chapter 23 – asp.net-part2

Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome Massimiliano Dessì
 
Synapse india dotnet development web approch part 2
Synapse india dotnet development web approch part 2Synapse india dotnet development web approch part 2
Synapse india dotnet development web approch part 2Synapseindiappsdevelopment
 
Применение шаблона проектирования MVVM при разработке архитектуры Windows Pho...
Применение шаблона проектирования MVVM при разработке архитектуры Windows Pho...Применение шаблона проектирования MVVM при разработке архитектуры Windows Pho...
Применение шаблона проектирования MVVM при разработке архитектуры Windows Pho...Nikolay Rumyantsev
 
Csphtp1 20
Csphtp1 20Csphtp1 20
Csphtp1 20HUST
 
Dynamic HTML Event Model
Dynamic HTML Event ModelDynamic HTML Event Model
Dynamic HTML Event ModelReem Alattas
 
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)Domenic Denicola
 
Mobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMohammad Shaker
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXIMC Institute
 
JavaScript Functions
JavaScript Functions JavaScript Functions
JavaScript Functions Reem Alattas
 
.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core
.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core
.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET CoreNETFest
 
Chromium Embedded Framework + Go at Brooklyn JS
Chromium Embedded Framework + Go at Brooklyn JSChromium Embedded Framework + Go at Brooklyn JS
Chromium Embedded Framework + Go at Brooklyn JSquirkey
 
Gmaps Railscamp2008
Gmaps Railscamp2008Gmaps Railscamp2008
Gmaps Railscamp2008xilinus
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the WorldJonathan Snook
 
Taking Apache Camel For a Ride
Taking Apache Camel For a RideTaking Apache Camel For a Ride
Taking Apache Camel For a RideBruce Snyder
 
Sapo GIS Hands-On
Sapo GIS Hands-OnSapo GIS Hands-On
Sapo GIS Hands-Oncodebits
 
Gis SAPO Hands On
Gis SAPO Hands OnGis SAPO Hands On
Gis SAPO Hands Oncodebits
 
Forge - DevCon 2016: Visual Reporting with Connected Design Data
Forge - DevCon 2016: Visual Reporting with Connected Design DataForge - DevCon 2016: Visual Reporting with Connected Design Data
Forge - DevCon 2016: Visual Reporting with Connected Design DataAutodesk
 

Similar to Synapse india reviews sharing chapter 23 – asp.net-part2 (20)

Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
 
Synapse india dotnet development web approch part 2
Synapse india dotnet development web approch part 2Synapse india dotnet development web approch part 2
Synapse india dotnet development web approch part 2
 
Java script
Java scriptJava script
Java script
 
AngularJS in large applications - AE NV
AngularJS in large applications - AE NVAngularJS in large applications - AE NV
AngularJS in large applications - AE NV
 
Применение шаблона проектирования MVVM при разработке архитектуры Windows Pho...
Применение шаблона проектирования MVVM при разработке архитектуры Windows Pho...Применение шаблона проектирования MVVM при разработке архитектуры Windows Pho...
Применение шаблона проектирования MVVM при разработке архитектуры Windows Pho...
 
Csphtp1 20
Csphtp1 20Csphtp1 20
Csphtp1 20
 
Dynamic HTML Event Model
Dynamic HTML Event ModelDynamic HTML Event Model
Dynamic HTML Event Model
 
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)
 
Mobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhone
 
Java script
Java scriptJava script
Java script
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX
 
JavaScript Functions
JavaScript Functions JavaScript Functions
JavaScript Functions
 
.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core
.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core
.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core
 
Chromium Embedded Framework + Go at Brooklyn JS
Chromium Embedded Framework + Go at Brooklyn JSChromium Embedded Framework + Go at Brooklyn JS
Chromium Embedded Framework + Go at Brooklyn JS
 
Gmaps Railscamp2008
Gmaps Railscamp2008Gmaps Railscamp2008
Gmaps Railscamp2008
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
 
Taking Apache Camel For a Ride
Taking Apache Camel For a RideTaking Apache Camel For a Ride
Taking Apache Camel For a Ride
 
Sapo GIS Hands-On
Sapo GIS Hands-OnSapo GIS Hands-On
Sapo GIS Hands-On
 
Gis SAPO Hands On
Gis SAPO Hands OnGis SAPO Hands On
Gis SAPO Hands On
 
Forge - DevCon 2016: Visual Reporting with Connected Design Data
Forge - DevCon 2016: Visual Reporting with Connected Design DataForge - DevCon 2016: Visual Reporting with Connected Design Data
Forge - DevCon 2016: Visual Reporting with Connected Design Data
 

More from Synapseindiappsdevelopment

Synapse india elance top in demand in it skills
Synapse india elance top in demand in it skillsSynapse india elance top in demand in it skills
Synapse india elance top in demand in it skillsSynapseindiappsdevelopment
 
SynapseIndia dotnet web development architecture module
SynapseIndia dotnet web development architecture moduleSynapseIndia dotnet web development architecture module
SynapseIndia dotnet web development architecture moduleSynapseindiappsdevelopment
 
SynapseIndia dotnet development platform overview
SynapseIndia  dotnet development platform overviewSynapseIndia  dotnet development platform overview
SynapseIndia dotnet development platform overviewSynapseindiappsdevelopment
 
SynapseIndia dotnet web applications development
SynapseIndia  dotnet web applications developmentSynapseIndia  dotnet web applications development
SynapseIndia dotnet web applications developmentSynapseindiappsdevelopment
 
SynapseIndia dotnet website security development
SynapseIndia  dotnet website security developmentSynapseIndia  dotnet website security development
SynapseIndia dotnet website security developmentSynapseindiappsdevelopment
 
SynapseIndia mobile apps deployment framework internal architecture
SynapseIndia mobile apps deployment framework internal architectureSynapseIndia mobile apps deployment framework internal architecture
SynapseIndia mobile apps deployment framework internal architectureSynapseindiappsdevelopment
 
SynapseIndia dotnet development ajax client library
SynapseIndia dotnet development ajax client librarySynapseIndia dotnet development ajax client library
SynapseIndia dotnet development ajax client librarySynapseindiappsdevelopment
 
SynapseIndia mobile apps deployment framework architecture
SynapseIndia mobile apps deployment framework architectureSynapseIndia mobile apps deployment framework architecture
SynapseIndia mobile apps deployment framework architectureSynapseindiappsdevelopment
 
SynapseIndia dotnet client library Development
SynapseIndia dotnet client library DevelopmentSynapseIndia dotnet client library Development
SynapseIndia dotnet client library DevelopmentSynapseindiappsdevelopment
 
SynapseIndia creating asp controls programatically development
SynapseIndia creating asp controls programatically developmentSynapseIndia creating asp controls programatically development
SynapseIndia creating asp controls programatically developmentSynapseindiappsdevelopment
 

More from Synapseindiappsdevelopment (20)

Synapse india elance top in demand in it skills
Synapse india elance top in demand in it skillsSynapse india elance top in demand in it skills
Synapse india elance top in demand in it skills
 
SynapseIndia dotnet web development architecture module
SynapseIndia dotnet web development architecture moduleSynapseIndia dotnet web development architecture module
SynapseIndia dotnet web development architecture module
 
SynapseIndia dotnet module development part 1
SynapseIndia  dotnet module development part 1SynapseIndia  dotnet module development part 1
SynapseIndia dotnet module development part 1
 
SynapseIndia dotnet framework library
SynapseIndia  dotnet framework librarySynapseIndia  dotnet framework library
SynapseIndia dotnet framework library
 
SynapseIndia dotnet development platform overview
SynapseIndia  dotnet development platform overviewSynapseIndia  dotnet development platform overview
SynapseIndia dotnet development platform overview
 
SynapseIndia dotnet development framework
SynapseIndia  dotnet development frameworkSynapseIndia  dotnet development framework
SynapseIndia dotnet development framework
 
SynapseIndia dotnet web applications development
SynapseIndia  dotnet web applications developmentSynapseIndia  dotnet web applications development
SynapseIndia dotnet web applications development
 
SynapseIndia dotnet website security development
SynapseIndia  dotnet website security developmentSynapseIndia  dotnet website security development
SynapseIndia dotnet website security development
 
SynapseIndia mobile build apps management
SynapseIndia mobile build apps managementSynapseIndia mobile build apps management
SynapseIndia mobile build apps management
 
SynapseIndia mobile apps deployment framework internal architecture
SynapseIndia mobile apps deployment framework internal architectureSynapseIndia mobile apps deployment framework internal architecture
SynapseIndia mobile apps deployment framework internal architecture
 
SynapseIndia java and .net development
SynapseIndia java and .net developmentSynapseIndia java and .net development
SynapseIndia java and .net development
 
SynapseIndia dotnet development panel control
SynapseIndia dotnet development panel controlSynapseIndia dotnet development panel control
SynapseIndia dotnet development panel control
 
SynapseIndia dotnet development ajax client library
SynapseIndia dotnet development ajax client librarySynapseIndia dotnet development ajax client library
SynapseIndia dotnet development ajax client library
 
SynapseIndia php web development
SynapseIndia php web developmentSynapseIndia php web development
SynapseIndia php web development
 
SynapseIndia mobile apps architecture
SynapseIndia mobile apps architectureSynapseIndia mobile apps architecture
SynapseIndia mobile apps architecture
 
SynapseIndia mobile apps deployment framework architecture
SynapseIndia mobile apps deployment framework architectureSynapseIndia mobile apps deployment framework architecture
SynapseIndia mobile apps deployment framework architecture
 
SynapseIndia mobile apps
SynapseIndia mobile appsSynapseIndia mobile apps
SynapseIndia mobile apps
 
SynapseIndia dotnet development
SynapseIndia dotnet developmentSynapseIndia dotnet development
SynapseIndia dotnet development
 
SynapseIndia dotnet client library Development
SynapseIndia dotnet client library DevelopmentSynapseIndia dotnet client library Development
SynapseIndia dotnet client library Development
 
SynapseIndia creating asp controls programatically development
SynapseIndia creating asp controls programatically developmentSynapseIndia creating asp controls programatically development
SynapseIndia creating asp controls programatically development
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 

Synapse india reviews sharing chapter 23 – asp.net-part2

  • 1. adRotator.aspx (1 of 3) 1 <%@ Page Language="JScript" 2 Src="adRotator.aspx.js" Inherits="MyCodeBehind" %> 3 4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 5 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 6 7 <!-- Fig. 23.34: adRotator.aspx --> 8 <!-- ASP.NET AdRotator example --> 9 10 <html> 11 <head> 12 <title>Using An AdRotator</title> 13 </head> 14 15 <body> 16 <form action = "adRotator.aspx" method = "post" runat = "server"> 17 18 <asp:AdRotator AdvertisementFile = "ads.xml" 19 BorderColor = "black" BorderWidth = "1" runat = "server"/> 20 21 <table> 22 <tr> 23 <td> 24 Name: <asp:TextBox id = "name" runat = "server"/> 25 </td>
  • 2. adRotator.aspx (2 of 3) 26 <td> 27 <asp:RequiredFieldValidator id = "requiredCheck" 28 ControlToValidate = "name" 29 Display = "Static" 30 runat = "server"> 31 Please enter your name. 32 </asp:RequiredFieldValidator> 33 </td> 34 </tr> 35 </table> 36 37 <br /> 38 Do you like ice cream? 39 40 <asp:RadioButtonList id = "iceCream" runat = "server"> 41 <asp:ListItem>Yes</asp:ListItem> 42 <asp:ListItem>No</asp:ListItem> 43 </asp:RadioButtonList> 44 45 <br /> 46 How many scoops would you like? (0-45) 47 48 <asp:TextBox id = "scoops" runat = "server" /> 49 50 <br />
  • 3. adRotator.aspx (3 of 3) 51 <asp:button text = "Submit" OnClick = "submitButton_Click" 52 runat = "server"/> 53 54 <asp:RangeValidator id = "rangeCheck" 55 ControlToValidate = "scoops" 56 MinimumValue = "0" 57 MaximumValue = "45" 58 Type = "Integer" 59 EnableClientScript = "false" 60 Text = "We cannot give you that many scoops." 61 runat = "server" /> 62 63 <center> 64 <h1> <asp:label id = "message" runat = "server"/> </h1> 65 </center> 66 67 </form> 68 </body> 69 </html>
  • 4. adRotator.aspx.js (1 of 2) 1 // Fig 23.35: adRotator.aspx.js 2 // Code-behind for the adRotator.aspx 3 // user interface. 4 5 import System; 6 import System.Web.UI; 7 import System.Web.UI.WebControls; 8 9 public class MyCodeBehind extends Page 10 { 11 protected var name : TextBox; 12 protected var scoops : TextBox; 13 protected var iceCream : RadioButtonList; 14 protected var message : Label; 15 16 public function submitButton_Click( 17 sender : Object, events : EventArgs ) : void 18 { 19 if ( IsPostBack ) 20 { 21 if ( iceCream.SelectedItem == "Yes" ) 22 { 23 message.Text = name.Text + " likes ice cream."; 24 }
  • 5. adRotator.aspx.js (2 of 2) 25 else 26 { 27 message.Text = name.Text + " does not like ice cream."; 28 } 29 } 30 } // end submitButton_Click 31 } // end class MyCodeBehind
  • 6. 23.11 Code-Behind Approach Fig. 23.36 Using the command prompt to compile the code-behind.
  • 7. 23.11 Code-Behind Approach Fig. 23.37 Output of AdRotator.aspx using the code-behind method.
  • 8. 23.12 ASP.NET Web Services • Enables distributed computing by allowing one machine to call methods on other machines • Defining the Web Service – Remote machine • Store Web service • Web-service methods – Remote Procedure Call (RPC) – Business-to-business (B2B) transactions • Viewing the Web Service – Service Description • Web Service Description Language (WSDL)
  • 9. number.asmx (1 of 2) 1 <%@ WebService Language="JScript" Class="NumberService" %> 2 3 // Fig. 23.38: number.asmx 4 // A simple Web Service 5 6 import System; 7 import System.Web.Services; 8 9 public class NumberService extends WebService 10 { 11 // Determines whether all the characters in a String are digits 12 WebMethod public function isNum( number : String ) : Boolean 13 { 14 var digitArray : char[]; 15 digitArray = number.ToCharArray(); 16 17 for ( var i : int = 0; i < digitArray.Length ; i++ ) 18 { 19 if ( !Char.IsDigit( digitArray[ i ] ) ) 20 { 21 return false; 22 } 23 } 24
  • 10. number.asmx (2 of 2) 25 return true; 26 } // end isNum 27 28 WebMethod public function Add( a : float, b : float) : float { 29 return a + b; 30 } 31 } // end class NumberService
  • 11. 23.12 ASP.NET Web Services Links to Web service methods Link to service description Fig. 23.39 ASMX file rendered in Internet Explorer.
  • 12. 23.12 ASP.NET Web Services Fig. 23.40 Service description for a Web service.
  • 13. 23.12 ASP.NET Web Services Fig. 23.41 Invoking a method of a Web service from a Web browser.
  • 14. 23.12 ASP.NET Web Services Fig. 23.42 Results of invoking a Web-service method from a Web browser.
  • 15. 23.13 Web Resources • www.asp.net • www.asp101.com/aspdotnet/aspplus/index.asp • www.411asp.net • www.aspfree.com • www.aspng.com • www.aspnetfaq.com • www.123aspx.com • msdn.microsoft.com/netframework • www.xmlforasp.net • www.ondotnet.com/topics/dotnet/asp.net