SlideShare ist ein Scribd-Unternehmen logo
1 von 31
ASP .NET 2.0 and ASP .NET AJAX 5108100011	– Hapsoro Adi P. 5108100053	– Thaufan Ardi A. 5108100099	– Jun Riandri
DEFINISI Web application framework buatan MS ASP -> Active Server Pages
KELEBIHAN Mudah digunakan Lebih cepat dari PHP Language support (VB.NET, C#, etc) User friendly Murah (free installation package)
How Active Server Pages Work Client sends request Server receives request and directs it to ASP ASP processes, then returns result to client HTTP request types Request methods GET Gets (retrieves) information from server Retrieve HTML document or image POST Posts (sends) data to server Send info from HTML form Client-entered data Info to search Internet Query for a database Authentication info
How Active Server Pages Work Browsers often cache Web pages Cache: save on disk Typically do not cache POST response Next POST request may not return same result Client requests ASP file Parsed (top to bottom) by ActiveX component asp.dll ActiveX component: server-side ActiveX control that usually does not have GUI Code executed as encountered @LANGUAGE statement Specifies scripting language If not used, VBScript assumed As interpreted, HTML (plus client-side scripts) sent to client Parsed each time requested Web server must support ASP by providing component such as asp.dll
ASP .NET 2.0 & AJAX Server-side ActiveX Components Web controls Session tracking Case study AJAX
Server-side ActiveX Components Server-side ActiveX components Typically do not have GUI If scripting language for ASP not support certain feature, create ActiveX Server component Visual C++, Visual Basic, Delphi, etc. Usually execute faster than scripting language equivalents Executed on server Client does not need to support ActiveX technologies
WEB CONTROLS Text controls AdRotator controls Validation controls
Text Control (1) <html><body><form runat="server">A basic TextBox:<asp:TextBox id="tb1" runat="server" /><br /><br />A password TextBox:<asp:TextBox id="tb2" TextMode="password" runat="server" /><br /><br />A TextBox with text:<asp:TextBox id="tb4" Text="Hello World!" runat="server" /><br /><br />A multiline TextBox:<asp:TextBox id="tb3" TextMode="multiline" runat="server" /><br /><br />A TextBox with height:<asp:TextBox id="tb6" rows="5" TextMode="multiline"runat="server" /><br /><br />A TextBox with width:<asp:TextBox id="tb5" columns="30" runat="server" /></form></body></html>
Text Controls (1)
Text Controls (2)
Text Controls (2) <script  runat="server">Sub submit(sender As Object, e As EventArgs)   lbl1.Text="Your name is " & txt1.TextEnd Sub</script><html><body><form runat="server">Enter your name:<asp:TextBox id="txt1" runat="server" /><asp:Button OnClick="submit" Text="Submit" runat="server" /><p><asp:Label id="lbl1" runat="server" /></p></form></body></html>
Image Controls
adRotator
Validation Controls (1) <script  runat="server">sub check_operator(sender As Object, e As EventArgs)    compval.Operator=CType(list.SelectedIndex,ValidationCompareOperator)   compval.Validate()end sub</script><html><body><form runat="server"><table border="0" bgcolor="#b0c4de">   <tr valign="top">     <td colspan="4"><h4>Compare two values</h4></td>   </tr>
Validation Controls (1)    <tr valign="top">     <td><asp:TextBox id="txt1" runat="server" /></td>     <td>     <asp:ListBox id="list" rows="2" OnSelectedIndexChanged="check_operator" runat="server">           <asp:ListItem value="Equal" selected>=</asp:ListItem>           <asp:ListItem value="NotEqual"><></asp:ListItem>     </asp:ListBox>     </td>     <td><asp:TextBox id="txt2" runat="server" /></td>     <td><asp:Button Text="Validate" runat="server" /></td>   </tr></table><br /><asp:CompareValidatorid="compval" Display="dynamic"ControlToValidate="txt1" ControlToCompare="txt2" ForeColor="red" BackColor="yellow" Type="String"EnableClientScript="false" Text="Validation Failed!" runat="server" /></form></body></html>
Validation Controls (1)
Session Tracking Cookies
What is a Cookie? A cookie is often used to identify a user.  A cookie is a small file that the server embeds on the user's computer.  Each time the same computer requests a page with a browser, it will send the cookie too.  With ASP, you can both create and retrieve cookie values.
Accessing a Database from an Active Server Page ASP can communicate with databases Via ADO (ActiveX Data Objects) Three-tier distributed applications User interface Often created using HTML, Dynamic HTML or XML Business logic Use Web servers Database access All three tiers may reside on separate computers connected to a network
With database
	1	<% @LANGUAGE = VBScript %> 	2	<%Option Explicit%> 	3	 	4	<%' Fig. 26.16 : login.asp%> 	5	 	6	<% 	7	   ' Set up the variables for this page 	8	Dim dbConn, dbQuery, loginRS, loginFound 	9	 	10	   ' Check to see if there is an existing connection to 	11	   ' the Database. If not, create one 	12	IfIsObject( Session( "mothergoose_dbConn" ) ) Then 	13	      Set dbConn = Session( "mothergoose_dbConn" ) 	14	Else 	15	      Set dbConn = Server.CreateObject( "ADODB.Connection" ) 	16	      Call dbConn.Open( "mothergoose", "", "" ) 	17	      Set Session( "mothergoose_dbConn" ) = dbConn 	18	End If 	19	 	20	   ' Create the SQL query 	21	   dbQuery = "SELECT * FROM users" 	22	 	23	   ' Create the recordset 	24	Set loginRS = Server.CreateObject( "ADODB.Recordset" ) 	25	Call loginRS.Open( dbQuery, dbConn ) 	26	 	27	 On Error Resume Next' If an error occurs, ignore it 	28	 	29	   ' Move to the first record in the recordset 	30	Call loginRS.MoveFirst() 	31	%> 	32	 ,[object Object]
1.2	 If not, create an ADODB.Connection object to open a connection
1.3	 Create SQL query
1.4	 Create recordset,[object Object]
1.6	 Create dropdown menu from recordset,[object Object],[object Object]
AJAX AJAX = Asynchronous JavaScript and XML. AJAX is based on JavaScript and HTTP requests. AJAX is not a new programming language, but a new way to use existing standards. AJAX is the art of trading data with a web server, and changing parts of a web page, without reloading the whole page.
Sejarah AJAX Padaawalnya ASP.NET AJAX diberinama Atlas. Dirilispadatahun 2005 dalambentuk CTPs (Community Tkenis Previews) ASP.NET AJAX 1.0 RTM dirilis 23 januari 2007 sebagaitembahan ASP.NET 2.0
Browser support IE (>= 6.0) Mozilla Firefox (>= 1.5) Opera (>= 9.0) Apple Safari (>= 2.0) Google Chrome
Arsitektur ASP.NET AJAX ASP.NET AJAX merupakan framework ygterdiridaripusaka script client dankomponen server ygterintegrasi. Komponen server ASP.NET AJAX terdiridarikontrol – kontrol web server ASP.NET dan komponen2 untungmengatur UI danaluraplikasi, validasi, control server, dansebagainya.
Control server Contoh control server ASP.NET AJAX ygseringdigunakan : - ScriptManager - UpdatePanel - UpdateProgress - Timer

Weitere ähnliche Inhalte

Was ist angesagt?

Cancer de-prostata-40601330[1]
Cancer de-prostata-40601330[1]Cancer de-prostata-40601330[1]
Cancer de-prostata-40601330[1]
Ludwing007
 
49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)
Kritika910
 
計算機概論20161205
計算機概論20161205計算機概論20161205
計算機概論20161205
志宇 許
 

Was ist angesagt? (9)

TYCS Ajax practicals sem VI
TYCS Ajax practicals sem VI TYCS Ajax practicals sem VI
TYCS Ajax practicals sem VI
 
HTML_HHC
HTML_HHCHTML_HHC
HTML_HHC
 
Synapse india basic php development part 2
Synapse india basic php development part 2Synapse india basic php development part 2
Synapse india basic php development part 2
 
Cancer de-prostata-40601330[1]
Cancer de-prostata-40601330[1]Cancer de-prostata-40601330[1]
Cancer de-prostata-40601330[1]
 
49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)
 
Ubi comp27nov04
Ubi comp27nov04Ubi comp27nov04
Ubi comp27nov04
 
Javascript
JavascriptJavascript
Javascript
 
Database connectivity in PHP
Database connectivity in PHPDatabase connectivity in PHP
Database connectivity in PHP
 
計算機概論20161205
計算機概論20161205計算機概論20161205
計算機概論20161205
 

Andere mochten auch

Módulo 1 : ¿Qué es el Aprendizaje y Servicio? Introducción a la conceptualiz...
Módulo 1 : ¿Qué es el Aprendizaje y Servicio?  Introducción a la conceptualiz...Módulo 1 : ¿Qué es el Aprendizaje y Servicio?  Introducción a la conceptualiz...
Módulo 1 : ¿Qué es el Aprendizaje y Servicio? Introducción a la conceptualiz...
Ciiet UdeSantiago
 

Andere mochten auch (19)

инд план обновленный
инд план обновленныйинд план обновленный
инд план обновленный
 
Экспертиза ООП
Экспертиза ООПЭкспертиза ООП
Экспертиза ООП
 
Ale15 recap
Ale15 recapAle15 recap
Ale15 recap
 
Mandy t v tran. cv
Mandy t v tran. cvMandy t v tran. cv
Mandy t v tran. cv
 
ODD and Project Control v0.957
ODD and Project Control v0.957ODD and Project Control v0.957
ODD and Project Control v0.957
 
Searchmetrics ranking factors 2015
Searchmetrics ranking factors 2015Searchmetrics ranking factors 2015
Searchmetrics ranking factors 2015
 
Adecuacion curricular-a-partir-de-las-necesidades-educativas-especiales
Adecuacion curricular-a-partir-de-las-necesidades-educativas-especialesAdecuacion curricular-a-partir-de-las-necesidades-educativas-especiales
Adecuacion curricular-a-partir-de-las-necesidades-educativas-especiales
 
образовательное право
образовательное правообразовательное право
образовательное право
 
Крашенинникова О.В. кейс анализ данных
Крашенинникова О.В. кейс анализ данных Крашенинникова О.В. кейс анализ данных
Крашенинникова О.В. кейс анализ данных
 
Как создавать онлайн-анкеты
Как создавать онлайн-анкетыКак создавать онлайн-анкеты
Как создавать онлайн-анкеты
 
инд план обновленный наумкина
инд план обновленный наумкинаинд план обновленный наумкина
инд план обновленный наумкина
 
Guión Presentación en Powtoon
Guión Presentación en Powtoon Guión Presentación en Powtoon
Guión Presentación en Powtoon
 
Agile Embedded Software
Agile Embedded SoftwareAgile Embedded Software
Agile Embedded Software
 
Gfk / Yandex: исследование аудитории онлайн-покупателей в России
Gfk / Yandex: исследование аудитории онлайн-покупателей в РоссииGfk / Yandex: исследование аудитории онлайн-покупателей в России
Gfk / Yandex: исследование аудитории онлайн-покупателей в России
 
Embedded Software Development
Embedded Software DevelopmentEmbedded Software Development
Embedded Software Development
 
Módulo 1 : ¿Qué es el Aprendizaje y Servicio? Introducción a la conceptualiz...
Módulo 1 : ¿Qué es el Aprendizaje y Servicio?  Introducción a la conceptualiz...Módulo 1 : ¿Qué es el Aprendizaje y Servicio?  Introducción a la conceptualiz...
Módulo 1 : ¿Qué es el Aprendizaje y Servicio? Introducción a la conceptualiz...
 
Módulo 2 Mooc A+S Universidad de Santiago de Chile
Módulo 2 Mooc A+S  Universidad de Santiago de Chile Módulo 2 Mooc A+S  Universidad de Santiago de Chile
Módulo 2 Mooc A+S Universidad de Santiago de Chile
 
Presentation
PresentationPresentation
Presentation
 
Catálogo interactivo de recursos didácticos
Catálogo interactivo de  recursos didácticosCatálogo interactivo de  recursos didácticos
Catálogo interactivo de recursos didácticos
 

Ähnlich wie Presentasi Kelompok 25 PW A+B

Web Developement Workshop (Oct 2009) Slides
Web Developement Workshop (Oct 2009) SlidesWeb Developement Workshop (Oct 2009) Slides
Web Developement Workshop (Oct 2009) Slides
Manish Sinha
 
CIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETCIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NET
webhostingguy
 
5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter
nicdev
 
Apache Camel - WJax 2008
Apache Camel - WJax 2008Apache Camel - WJax 2008
Apache Camel - WJax 2008
inovex GmbH
 
Php Sessoins N Cookies
Php Sessoins N CookiesPhp Sessoins N Cookies
Php Sessoins N Cookies
mussawir20
 
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8
Tatsuhiko Miyagawa
 

Ähnlich wie Presentasi Kelompok 25 PW A+B (20)

Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on Rails
 
Vb.Net Web Forms
Vb.Net  Web FormsVb.Net  Web Forms
Vb.Net Web Forms
 
Web Developement Workshop (Oct 2009) Slides
Web Developement Workshop (Oct 2009) SlidesWeb Developement Workshop (Oct 2009) Slides
Web Developement Workshop (Oct 2009) Slides
 
Component and Event-Driven Architectures in PHP
Component and Event-Driven Architectures in PHPComponent and Event-Driven Architectures in PHP
Component and Event-Driven Architectures in PHP
 
Struts2
Struts2Struts2
Struts2
 
More Asp
More AspMore Asp
More Asp
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3
 
Lecture3
Lecture3Lecture3
Lecture3
 
CIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETCIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NET
 
Sencha Touch Intro
Sencha Touch IntroSencha Touch Intro
Sencha Touch Intro
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To Lamp
 
5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter
 
Jsp
JspJsp
Jsp
 
ASP.NET MVC
ASP.NET MVCASP.NET MVC
ASP.NET MVC
 
Hacking with YUI
Hacking with YUIHacking with YUI
Hacking with YUI
 
Apache Camel - WJax 2008
Apache Camel - WJax 2008Apache Camel - WJax 2008
Apache Camel - WJax 2008
 
ASP.Net, move data to and from a SQL Server Database
ASP.Net, move data to and from a SQL Server DatabaseASP.Net, move data to and from a SQL Server Database
ASP.Net, move data to and from a SQL Server Database
 
Php Sessoins N Cookies
Php Sessoins N CookiesPhp Sessoins N Cookies
Php Sessoins N Cookies
 
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8
 
Aspdevice - Asp Fast Crud introdution
Aspdevice - Asp Fast Crud introdutionAspdevice - Asp Fast Crud introdution
Aspdevice - Asp Fast Crud introdution
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (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...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Presentasi Kelompok 25 PW A+B

  • 1. ASP .NET 2.0 and ASP .NET AJAX 5108100011 – Hapsoro Adi P. 5108100053 – Thaufan Ardi A. 5108100099 – Jun Riandri
  • 2. DEFINISI Web application framework buatan MS ASP -> Active Server Pages
  • 3. KELEBIHAN Mudah digunakan Lebih cepat dari PHP Language support (VB.NET, C#, etc) User friendly Murah (free installation package)
  • 4. How Active Server Pages Work Client sends request Server receives request and directs it to ASP ASP processes, then returns result to client HTTP request types Request methods GET Gets (retrieves) information from server Retrieve HTML document or image POST Posts (sends) data to server Send info from HTML form Client-entered data Info to search Internet Query for a database Authentication info
  • 5. How Active Server Pages Work Browsers often cache Web pages Cache: save on disk Typically do not cache POST response Next POST request may not return same result Client requests ASP file Parsed (top to bottom) by ActiveX component asp.dll ActiveX component: server-side ActiveX control that usually does not have GUI Code executed as encountered @LANGUAGE statement Specifies scripting language If not used, VBScript assumed As interpreted, HTML (plus client-side scripts) sent to client Parsed each time requested Web server must support ASP by providing component such as asp.dll
  • 6. ASP .NET 2.0 & AJAX Server-side ActiveX Components Web controls Session tracking Case study AJAX
  • 7. Server-side ActiveX Components Server-side ActiveX components Typically do not have GUI If scripting language for ASP not support certain feature, create ActiveX Server component Visual C++, Visual Basic, Delphi, etc. Usually execute faster than scripting language equivalents Executed on server Client does not need to support ActiveX technologies
  • 8. WEB CONTROLS Text controls AdRotator controls Validation controls
  • 9. Text Control (1) <html><body><form runat="server">A basic TextBox:<asp:TextBox id="tb1" runat="server" /><br /><br />A password TextBox:<asp:TextBox id="tb2" TextMode="password" runat="server" /><br /><br />A TextBox with text:<asp:TextBox id="tb4" Text="Hello World!" runat="server" /><br /><br />A multiline TextBox:<asp:TextBox id="tb3" TextMode="multiline" runat="server" /><br /><br />A TextBox with height:<asp:TextBox id="tb6" rows="5" TextMode="multiline"runat="server" /><br /><br />A TextBox with width:<asp:TextBox id="tb5" columns="30" runat="server" /></form></body></html>
  • 12. Text Controls (2) <script  runat="server">Sub submit(sender As Object, e As EventArgs)   lbl1.Text="Your name is " & txt1.TextEnd Sub</script><html><body><form runat="server">Enter your name:<asp:TextBox id="txt1" runat="server" /><asp:Button OnClick="submit" Text="Submit" runat="server" /><p><asp:Label id="lbl1" runat="server" /></p></form></body></html>
  • 15. Validation Controls (1) <script  runat="server">sub check_operator(sender As Object, e As EventArgs)    compval.Operator=CType(list.SelectedIndex,ValidationCompareOperator)   compval.Validate()end sub</script><html><body><form runat="server"><table border="0" bgcolor="#b0c4de">   <tr valign="top">     <td colspan="4"><h4>Compare two values</h4></td>   </tr>
  • 16. Validation Controls (1)    <tr valign="top">     <td><asp:TextBox id="txt1" runat="server" /></td>     <td>     <asp:ListBox id="list" rows="2" OnSelectedIndexChanged="check_operator" runat="server">           <asp:ListItem value="Equal" selected>=</asp:ListItem>           <asp:ListItem value="NotEqual"><></asp:ListItem>     </asp:ListBox>     </td>     <td><asp:TextBox id="txt2" runat="server" /></td>     <td><asp:Button Text="Validate" runat="server" /></td>   </tr></table><br /><asp:CompareValidatorid="compval" Display="dynamic"ControlToValidate="txt1" ControlToCompare="txt2" ForeColor="red" BackColor="yellow" Type="String"EnableClientScript="false" Text="Validation Failed!" runat="server" /></form></body></html>
  • 19. What is a Cookie? A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With ASP, you can both create and retrieve cookie values.
  • 20. Accessing a Database from an Active Server Page ASP can communicate with databases Via ADO (ActiveX Data Objects) Three-tier distributed applications User interface Often created using HTML, Dynamic HTML or XML Business logic Use Web servers Database access All three tiers may reside on separate computers connected to a network
  • 22.
  • 23. 1.2 If not, create an ADODB.Connection object to open a connection
  • 25.
  • 26.
  • 27. AJAX AJAX = Asynchronous JavaScript and XML. AJAX is based on JavaScript and HTTP requests. AJAX is not a new programming language, but a new way to use existing standards. AJAX is the art of trading data with a web server, and changing parts of a web page, without reloading the whole page.
  • 28. Sejarah AJAX Padaawalnya ASP.NET AJAX diberinama Atlas. Dirilispadatahun 2005 dalambentuk CTPs (Community Tkenis Previews) ASP.NET AJAX 1.0 RTM dirilis 23 januari 2007 sebagaitembahan ASP.NET 2.0
  • 29. Browser support IE (>= 6.0) Mozilla Firefox (>= 1.5) Opera (>= 9.0) Apple Safari (>= 2.0) Google Chrome
  • 30. Arsitektur ASP.NET AJAX ASP.NET AJAX merupakan framework ygterdiridaripusaka script client dankomponen server ygterintegrasi. Komponen server ASP.NET AJAX terdiridarikontrol – kontrol web server ASP.NET dan komponen2 untungmengatur UI danaluraplikasi, validasi, control server, dansebagainya.
  • 31. Control server Contoh control server ASP.NET AJAX ygseringdigunakan : - ScriptManager - UpdatePanel - UpdateProgress - Timer
  • 32. AJAX

Hinweis der Redaktion

  1. ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites, web applications and web services. It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft&apos;s Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET language. The ASP.NET SOAP extension framework allows ASP.NET components to process SOAP messages.
  2. ActiveX is a framework for defining reusable software components that perform a particular function or a set of functions in Microsoft Windows in a way that is independent of the programming language used to implement them. A software application can then be composed from one or more of these components in order to provide its functionality
  3. &lt;html&gt;&lt;body&gt;&lt;form runat=&quot;server&quot;&gt;A basic TextBox:&lt;asp:TextBox id=&quot;tb1&quot; runat=&quot;server&quot; /&gt;&lt;br /&gt;&lt;br /&gt;A password TextBox:&lt;asp:TextBox id=&quot;tb2&quot; TextMode=&quot;password&quot; runat=&quot;server&quot; /&gt;&lt;br /&gt;&lt;br /&gt;A TextBox with text:&lt;asp:TextBox id=&quot;tb4&quot; Text=&quot;Hello World!&quot; runat=&quot;server&quot; /&gt;&lt;br /&gt;&lt;br /&gt;A multiline TextBox:&lt;asp:TextBox id=&quot;tb3&quot; TextMode=&quot;multiline&quot; runat=&quot;server&quot; /&gt;&lt;br /&gt;&lt;br /&gt;A TextBox with height:&lt;asp:TextBox id=&quot;tb6&quot; rows=&quot;5&quot; TextMode=&quot;multiline&quot;runat=&quot;server&quot; /&gt;&lt;br /&gt;&lt;br /&gt;A TextBox with width:&lt;asp:TextBox id=&quot;tb5&quot; columns=&quot;30&quot; runat=&quot;server&quot; /&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;
  4. &lt;script  runat=&quot;server&quot;&gt;Sub submit(sender As Object, e As EventArgs)   lbl1.Text=&quot;Your name is &quot; &amp; txt1.TextEnd Sub&lt;/script&gt;&lt;html&gt;&lt;body&gt;&lt;form runat=&quot;server&quot;&gt;Enter your name:&lt;asp:TextBox id=&quot;txt1&quot; runat=&quot;server&quot; /&gt;&lt;asp:Button OnClick=&quot;submit&quot; Text=&quot;Submit&quot; runat=&quot;server&quot; /&gt;&lt;p&gt;&lt;asp:Label id=&quot;lbl1&quot; runat=&quot;server&quot; /&gt;&lt;/p&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;
  5. &lt;html&gt;&lt;body&gt;&lt;form runat=&quot;server&quot;&gt;&lt;asp:Imagerunat=&quot;server&quot;AlternateText=&quot;W3Schools&quot;ImageUrl=&quot;/banners/w6.gif&quot;/&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;
  6. &lt;script  runat=&quot;server&quot;&gt;   Sub change_url(sender As Object, e As AdCreatedEventArgs)      e.NavigateUrl=&quot;http://www.w3schools.com&quot;    End Sub &lt;/script&gt;&lt;html&gt;&lt;body&gt;&lt;form runat=&quot;server&quot;&gt;&lt;asp:AdRotator AdvertisementFile=&quot;Ad1.xml&quot;runat=&quot;server&quot; OnAdCreated=&quot;change_url&quot;target=&quot;_blank&quot; /&gt;&lt;/form&gt;&lt;p&gt;&lt;a href=&quot;ad1.xml&quot; target=&quot;_blank&quot;&gt;View XML file&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
  7. &lt;script  runat=&quot;server&quot;&gt;sub check_operator(sender As Object, e As EventArgs)    compval.Operator=CType(list.SelectedIndex,ValidationCompareOperator)   compval.Validate()end sub&lt;/script&gt;&lt;html&gt;&lt;body&gt;&lt;form runat=&quot;server&quot;&gt;&lt;table border=&quot;0&quot; bgcolor=&quot;#b0c4de&quot;&gt;   &lt;tr valign=&quot;top&quot;&gt;     &lt;td colspan=&quot;4&quot;&gt;&lt;h4&gt;Compare two values&lt;/h4&gt;&lt;/td&gt;   &lt;/tr&gt;    &lt;tr valign=&quot;top&quot;&gt;     &lt;td&gt;&lt;asp:TextBox id=&quot;txt1&quot; runat=&quot;server&quot; /&gt;&lt;/td&gt;     &lt;td&gt;     &lt;asp:ListBox id=&quot;list&quot; rows=&quot;2&quot; OnSelectedIndexChanged=&quot;check_operator&quot; runat=&quot;server&quot;&gt;           &lt;asp:ListItem value=&quot;Equal&quot; selected&gt;=&lt;/asp:ListItem&gt;           &lt;asp:ListItem value=&quot;NotEqual&quot;&gt;&lt;&gt;&lt;/asp:ListItem&gt;     &lt;/asp:ListBox&gt;     &lt;/td&gt;     &lt;td&gt;&lt;asp:TextBox id=&quot;txt2&quot; runat=&quot;server&quot; /&gt;&lt;/td&gt;     &lt;td&gt;&lt;asp:Button Text=&quot;Validate&quot; runat=&quot;server&quot; /&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;asp:CompareValidatorid=&quot;compval&quot; Display=&quot;dynamic&quot;ControlToValidate=&quot;txt1&quot; ControlToCompare=&quot;txt2&quot; ForeColor=&quot;red&quot; BackColor=&quot;yellow&quot; Type=&quot;String&quot;EnableClientScript=&quot;false&quot; Text=&quot;Validation Failed!&quot; runat=&quot;server&quot; /&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;
  8. &lt;%@ Import Namespace=&quot;System.Data.OleDb&quot; %&gt;&lt;script  runat=&quot;server&quot;&gt;sub Page_Loaddim dbconn,sql,dbcomm,dbreaddbconn=New OleDbConnection(&quot;Provider=Microsoft.Jet.OLEDB.4.0;data source=&quot; &amp; server.mappath(&quot;/db/northwind.mdb&quot;))dbconn.Open()sql=&quot;SELECT * FROM customers&quot;dbcomm=New OleDbCommand(sql,dbconn)dbread=dbcomm.ExecuteReader()customers.DataSource=dbreadcustomers.DataBind()dbread.Close()dbconn.Close()end sub&lt;/script&gt;&lt;html&gt;&lt;body&gt;&lt;form runat=&quot;server&quot;&gt;&lt;asp:DataListid=&quot;customers&quot;runat=&quot;server&quot;cellpadding=&quot;2&quot;cellspacing=&quot;2&quot;borderstyle=&quot;inset&quot;backcolor=&quot;#e8e8e8&quot;width=&quot;100%&quot;headerstyle-font-name=&quot;Verdana&quot;headerstyle-font-size=&quot;12pt&quot;headerstyle-horizontalalign=&quot;center&quot;headerstyle-font-bold=&quot;True&quot;itemstyle-backcolor=&quot;#778899&quot;itemstyle-forecolor=&quot;#ffffff&quot;footerstyle-font-size=&quot;9pt&quot;footerstyle-font-italic=&quot;True&quot;&gt;&lt;HeaderTemplate&gt;Customers Table&lt;/HeaderTemplate&gt;&lt;ItemTemplate&gt;&lt;%#Container.DataItem(&quot;companyname&quot;)%&gt;  in&lt;%#Container.DataItem(&quot;address&quot;)%&gt;, &lt;%#Container.DataItem(&quot;city&quot;)%&gt;&lt;/ItemTemplate&gt;&lt;FooterTemplate&gt;Source: Northwind Database&lt;/FooterTemplate&gt;&lt;/asp:DataList&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;
  9. ScriptManagerMengatursumberdaya script komponen-komponen client, merenderbagiandarihalaman, localization, globalization, dan custom user script. Script manager dibutuhkanolehUpdatePanel, UpdateProgressdankontrol Timer.UpdatePanelDigunakanuntukmembuat rendering sebagianhalaman (partial rendering), bukankeseluruhanhalaman.UpdateProgressMemberikaninformasimengenai status bagianhalaman yang ter-update dalamkontrolUpdatePanel.TimerMelakukanpostbackke server berdasarkan interval waktu yang telahditentukan. Kontrol Timer dapatdigunakanuntukmelakukanpostbackkeseluruhanhalamanatausebagaianhalaman yang adadalamUpdatePanel.
  10. &lt;html&gt;&lt;head&gt;&lt;script type=&quot;text/javascript&quot;&gt;function loadXMLDoc(url){if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;); }xmlhttp.open(&quot;GET&quot;,url,false);xmlhttp.send(null);document.getElementById(&apos;test&apos;).innerHTML=xmlhttp.responseText;}&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;div id=&quot;test&quot;&gt;&lt;h2&gt;Click to let AJAX change this text&lt;/h2&gt;&lt;/div&gt;&lt;button type=&quot;button&quot; onclick=&quot;loadXMLDoc(&apos;test1.txt&apos;)&quot;&gt;Click Me&lt;/button&gt;&lt;button type=&quot;button&quot; onclick=&quot;loadXMLDoc(&apos;test2.txt&apos;)&quot;&gt;Click Me&lt;/button&gt;&lt;/body&gt;&lt;/html&gt;