SlideShare a Scribd company logo
25
WEB DEVELOPMENT AND ASP.NET(UNIT - V)
Web applications and web servers
 A web application can be understood as a collection of files (*.htm, *.asp, *.aspx, image
files, etc.) and related components (such as a .NET code library) stored within a
particular set of directories on a given web server.
 A web server is a software product in charge of hosting your web applications, and it
typically provides a number of related services such as integrated security
 File Transfer Protocol (FTP) support, mail exchange services, and so forth. Internet
Information Server (IIS) is Microsoft’s enterprise-level web server product, and it has
necessary support for classic ASP as well as ASP.NET web applications.
Working with IIS Virtual Directories
A single IIS installation is able to host numerous web applications, each of which resides in a
virtual directory. Each virtual directory is mapped to a physical directory on the local hard
drive. Therefore, if you create a new virtual directory named CarsRUs, the outside world can
navigate to this site using a URL such as http://www.CarsRUs.com (assuming your site’s IP
address has been registered with the world at large). Under the hood, the virtual directory
maps to a physical root directory such as C:inetpubwwwrootAspNetCarsSite, which
contains the content of the web application.
HTML form Development
 The real action of an *.htm file occurs within the scope of the <form> elements.
An HTML form is simply a named group of related UI elements used to gather user input,
which is then transmitted to the web application via HTTP
 Typically, the opening <form> tag supplies an action attribute that specifies the URL to
which to submit the form data, as well as the method of transmitting that data itself
(POST or GET).
<html>
<head>
<title>My Site</title>
</head>
<body>
<form action=”success.html” method=”POST”>
<!-- Insert web content here ->
</form>
</body>
</html>
26
GET and POST (Submitting the Form Data)
Used to submit form data to the web server for processing.
<form name="defaultPage" id="defaultPage"
action="ClassicAspPage.asp" method = "GET">
...
</form>
GET:
When you specify method = "GET" as the mode of transmission, the form data is appended to the
query string as a set of name/value pairs separated by ampersands:
http://localhost/Cars/ClassicAspPage.asp?txtUserName=Andrew&txtPassword=abcd123
POST:
The other method of transmitting form data to the web server is to specify method = "POST".
In this case, the form data is not appended to the query string, but instead is written to a separate
line within the HTTP header. Using POST, the form data is not directly visible to the outside world.
More important, POST data does not have a character-length limitation (many browsers
have a limit for GET queries).
ASP.NET application
Below is the simple asp.net application using VBScript.
Index.asp
<html>
<body>
<form action=”process.asp” method=”GET” >
Username: <input type=”text” name=”txtUserName” />
Password: <input type=”text” name=”txtPassword” />
<input type=”submit” name=”btnSubmit” />
</form>
</body>
</html>
process.asp
<%@ language="VBScript" %>
<html>
<head>
<title>Demo </title>
</head>
<body>
<h1> Here is what you sent me:</h1>
<%= Dim name = Request.QueryString("txtUserName ")
<%= Dim pwd = Request.QueryString("txtPassword") %>
User Name: <%=Response.Write(name) %> <br>
Password: <%=Response.Write(pwd) %>
</body>
</html>
27
ASP.NET namespaces
As of .NET 2.0, there are no fewer than 34 web-centric namespaces in the base class
libraries.
These namespaces can be grouped into four major categories:
1. Core functionality (e.g., types that allow you to interact with the HTTP request and response)
2. Web Form and HTML controls
3. Mobile web development
4. XML web services
Below table describes several of the core ASP.NET 2.0 namespaces.
Creating sample C# web Applications
<%
HelloWorldLabel.Text = "Hello, world!";
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>MyPage</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label runat="server" id="HelloWorldLabel"></asp:Label>
</div>
</form>
</body>
</html>
28
ASP.NET Website Directory Structure
Life Cycle of an ASP.NET Web Page
29
Introduction to web Form controls
 Web Forms are compiled and executed on the server, which generates the HTML that
displays the web pages.
 Web Forms comes with hundreds of different web controls and web components to
build user-driven web sites with data access.
The types in System.Web.UI.WebControls can be broken down into several broad
categories:
 Simple controls
- The simple controls are so named because they are ASP.NET web controls that map to
standard HTML widgets (buttons, lists, hyperlinks, image holders, tables, etc.).
 Rich controls
- Rich controls are those for which there is no direct HTML equivalent (such as the
Calendar, TreeView, Wizard, etc.)
 Data-centric controls
- Data-centric controls are widgets that are typically populated via a given data
connection. (eg, GridView)
 Input validation controls
- Validation controls are server-side widgets that automatically emit client-side
JavaScript, for the purpose of form field validation
 Login controls
- These UI elements completely encapsulate the details of logging into a site, providing
password-retrieval services and managing user roles
Building Web Services
The term "web service" refers to a form of a component that can be used remotely
Microsoft offers two types of web services in their .NET framework, XML web services and
.NET remoting.
Web services are invoked remotely using SOAP(Simple Object Access Protocol) or HTTP-GET
and HTTP-POST protocols .
The file extension for a web service is .asmx.
Benefits of XML Web Services:
Language and platform independence: XML web services provide a way for unrelated platforms, operating
systems, and programming languages to exchange information in harmony.
Automatic upgrade: Unlike components, if a web service requires an update, that update is propagated to all
applications consuming that web service immediately
The following code shows the most basic web service:
HelloWorld.asmx
<%@ WebService Language="C#" class="HelloWorld"%>
using System.Web.Services;
public class HelloWorld : WebService{ // HelloWorld class inherits from the WebService base class
[WebMethod] // indicates to IIS and the .NET compiler that the following method is to be exposed and web callable.
public string HelloWorldMethod() {
return "Hello World";
} }
30
Web Service Namespace
The base class libraries define a number of namespaces that allow you to interact with each
web service technology

More Related Content

What's hot

VB.net
VB.netVB.net
VB.net
PallaviKadam
 
Application package
Application packageApplication package
Application packageJAYAARC
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NET
salonityagi
 
Namespaces in C#
Namespaces in C#Namespaces in C#
Namespaces in C#
yogita kachve
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.net
Jaya Kumari
 
Programming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) EnvironmentProgramming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) Environment
Mahmoud Samir Fayed
 
Java swing 1
Java swing 1Java swing 1
Java swing 1
Mukesh Tekwani
 
VB.NET:An introduction to Namespaces in .NET framework
VB.NET:An introduction to  Namespaces in .NET frameworkVB.NET:An introduction to  Namespaces in .NET framework
VB.NET:An introduction to Namespaces in .NET framework
Richa Handa
 
BCA IPU VB.NET UNIT-II
BCA IPU VB.NET UNIT-IIBCA IPU VB.NET UNIT-II
BCA IPU VB.NET UNIT-II
Vaibhavj1234
 
BCA IPU VB.NET UNIT-IV
BCA IPU VB.NET UNIT-IVBCA IPU VB.NET UNIT-IV
BCA IPU VB.NET UNIT-IV
Vaibhavj1234
 
Java chapter 1
Java   chapter 1Java   chapter 1
Java chapter 1
Mukesh Tekwani
 
Intake 37 ef1
Intake 37 ef1Intake 37 ef1
Intake 37 ef1
Mahmoud Ouf
 
Component object model and
Component object model andComponent object model and
Component object model andSaransh Garg
 
Ppt chapter08
Ppt chapter08Ppt chapter08
Ppt chapter08
Richard Styner
 
Mule soft meetup_4_mty_online_oct_2020
Mule soft meetup_4_mty_online_oct_2020Mule soft meetup_4_mty_online_oct_2020
Mule soft meetup_4_mty_online_oct_2020
Veyra Celina
 
Ur/Web Programing Language: a brief overview
Ur/Web Programing Language: a brief overviewUr/Web Programing Language: a brief overview
Ur/Web Programing Language: a brief overview
AM Publications
 

What's hot (20)

.Net assembly
.Net assembly.Net assembly
.Net assembly
 
VB.net
VB.netVB.net
VB.net
 
Application package
Application packageApplication package
Application package
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NET
 
Namespaces in C#
Namespaces in C#Namespaces in C#
Namespaces in C#
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.net
 
Programming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) EnvironmentProgramming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) Environment
 
Java swing 1
Java swing 1Java swing 1
Java swing 1
 
Intro.net
Intro.netIntro.net
Intro.net
 
VB.NET:An introduction to Namespaces in .NET framework
VB.NET:An introduction to  Namespaces in .NET frameworkVB.NET:An introduction to  Namespaces in .NET framework
VB.NET:An introduction to Namespaces in .NET framework
 
Java chapter 3
Java   chapter 3Java   chapter 3
Java chapter 3
 
BCA IPU VB.NET UNIT-II
BCA IPU VB.NET UNIT-IIBCA IPU VB.NET UNIT-II
BCA IPU VB.NET UNIT-II
 
BCA IPU VB.NET UNIT-IV
BCA IPU VB.NET UNIT-IVBCA IPU VB.NET UNIT-IV
BCA IPU VB.NET UNIT-IV
 
Java chapter 1
Java   chapter 1Java   chapter 1
Java chapter 1
 
Intake 37 ef1
Intake 37 ef1Intake 37 ef1
Intake 37 ef1
 
Component object model and
Component object model andComponent object model and
Component object model and
 
Ppt chapter08
Ppt chapter08Ppt chapter08
Ppt chapter08
 
ANSI C Macros
ANSI C MacrosANSI C Macros
ANSI C Macros
 
Mule soft meetup_4_mty_online_oct_2020
Mule soft meetup_4_mty_online_oct_2020Mule soft meetup_4_mty_online_oct_2020
Mule soft meetup_4_mty_online_oct_2020
 
Ur/Web Programing Language: a brief overview
Ur/Web Programing Language: a brief overviewUr/Web Programing Language: a brief overview
Ur/Web Programing Language: a brief overview
 

Similar to C# Unit5 Notes

Overview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company indiaOverview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company india
Jignesh Aakoliya
 
Xml web services
Xml web servicesXml web services
Xml web servicesRaghu nath
 
Asp.net
Asp.netAsp.net
Asp.net
vijilakshmi51
 
Active server pages
Active server pagesActive server pages
Active server pages
mcatahir947
 
Wss Object Model
Wss Object ModelWss Object Model
Wss Object Modelmaddinapudi
 
SharePoint 2007 Presentation
SharePoint 2007 PresentationSharePoint 2007 Presentation
SharePoint 2007 PresentationAjay Jain
 
Internet Environment
Internet  EnvironmentInternet  Environment
Internet Environmentguest8fdbdd
 
.Net course-in-mumbai-ppt
.Net course-in-mumbai-ppt.Net course-in-mumbai-ppt
.Net course-in-mumbai-ppt
vibrantuser
 
Aspnet architecture
Aspnet architectureAspnet architecture
Aspnet architecturephantrithuc
 
Share Point Object Model
Share Point Object ModelShare Point Object Model
Share Point Object Model
SharePoint Experts
 
Asp.net architecture
Asp.net architectureAsp.net architecture
Asp.net architectureIblesoft
 
C sharp and asp.net interview questions
C sharp and asp.net interview questionsC sharp and asp.net interview questions
C sharp and asp.net interview questions
Akhil Mittal
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1Neeraj Mathur
 
Asp.netrole
Asp.netroleAsp.netrole
Asp.netrole
mani bhushan
 
Html intake 38 lect1
Html intake 38 lect1Html intake 38 lect1
Html intake 38 lect1
ghkadous
 

Similar to C# Unit5 Notes (20)

Overview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company indiaOverview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company india
 
Xml web services
Xml web servicesXml web services
Xml web services
 
Asp.net
Asp.netAsp.net
Asp.net
 
Active server pages
Active server pagesActive server pages
Active server pages
 
Asp
AspAsp
Asp
 
Wss Object Model
Wss Object ModelWss Object Model
Wss Object Model
 
SharePoint 2007 Presentation
SharePoint 2007 PresentationSharePoint 2007 Presentation
SharePoint 2007 Presentation
 
Internet Environment
Internet  EnvironmentInternet  Environment
Internet Environment
 
.Net course-in-mumbai-ppt
.Net course-in-mumbai-ppt.Net course-in-mumbai-ppt
.Net course-in-mumbai-ppt
 
Aspnet architecture
Aspnet architectureAspnet architecture
Aspnet architecture
 
Share Point Object Model
Share Point Object ModelShare Point Object Model
Share Point Object Model
 
Asp.net architecture
Asp.net architectureAsp.net architecture
Asp.net architecture
 
C sharp and asp.net interview questions
C sharp and asp.net interview questionsC sharp and asp.net interview questions
C sharp and asp.net interview questions
 
Atlas Php
Atlas PhpAtlas Php
Atlas Php
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Asp.netrole
Asp.netroleAsp.netrole
Asp.netrole
 
Web servers
Web serversWeb servers
Web servers
 
Html intake 38 lect1
Html intake 38 lect1Html intake 38 lect1
Html intake 38 lect1
 
5-WebServers.ppt
5-WebServers.ppt5-WebServers.ppt
5-WebServers.ppt
 

More from Sudarshan Dhondaley

Storage Area Networks Unit 1 Notes
Storage Area Networks Unit 1 NotesStorage Area Networks Unit 1 Notes
Storage Area Networks Unit 1 Notes
Sudarshan Dhondaley
 
Storage Area Networks Unit 4 Notes
Storage Area Networks Unit 4 NotesStorage Area Networks Unit 4 Notes
Storage Area Networks Unit 4 Notes
Sudarshan Dhondaley
 
Storage Area Networks Unit 3 Notes
Storage Area Networks Unit 3 NotesStorage Area Networks Unit 3 Notes
Storage Area Networks Unit 3 Notes
Sudarshan Dhondaley
 
Storage Area Networks Unit 2 Notes
Storage Area Networks Unit 2 NotesStorage Area Networks Unit 2 Notes
Storage Area Networks Unit 2 Notes
Sudarshan Dhondaley
 
Architectural Styles and Case Studies, Software architecture ,unit–2
Architectural Styles and Case Studies, Software architecture ,unit–2Architectural Styles and Case Studies, Software architecture ,unit–2
Architectural Styles and Case Studies, Software architecture ,unit–2
Sudarshan Dhondaley
 
Designing and documenting software architecture unit 5
Designing and documenting software architecture unit 5Designing and documenting software architecture unit 5
Designing and documenting software architecture unit 5Sudarshan Dhondaley
 
Software architecture Unit 1 notes
Software architecture Unit 1 notesSoftware architecture Unit 1 notes
Software architecture Unit 1 notesSudarshan Dhondaley
 

More from Sudarshan Dhondaley (7)

Storage Area Networks Unit 1 Notes
Storage Area Networks Unit 1 NotesStorage Area Networks Unit 1 Notes
Storage Area Networks Unit 1 Notes
 
Storage Area Networks Unit 4 Notes
Storage Area Networks Unit 4 NotesStorage Area Networks Unit 4 Notes
Storage Area Networks Unit 4 Notes
 
Storage Area Networks Unit 3 Notes
Storage Area Networks Unit 3 NotesStorage Area Networks Unit 3 Notes
Storage Area Networks Unit 3 Notes
 
Storage Area Networks Unit 2 Notes
Storage Area Networks Unit 2 NotesStorage Area Networks Unit 2 Notes
Storage Area Networks Unit 2 Notes
 
Architectural Styles and Case Studies, Software architecture ,unit–2
Architectural Styles and Case Studies, Software architecture ,unit–2Architectural Styles and Case Studies, Software architecture ,unit–2
Architectural Styles and Case Studies, Software architecture ,unit–2
 
Designing and documenting software architecture unit 5
Designing and documenting software architecture unit 5Designing and documenting software architecture unit 5
Designing and documenting software architecture unit 5
 
Software architecture Unit 1 notes
Software architecture Unit 1 notesSoftware architecture Unit 1 notes
Software architecture Unit 1 notes
 

Recently uploaded

The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 

Recently uploaded (20)

The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 

C# Unit5 Notes

  • 1. 25 WEB DEVELOPMENT AND ASP.NET(UNIT - V) Web applications and web servers  A web application can be understood as a collection of files (*.htm, *.asp, *.aspx, image files, etc.) and related components (such as a .NET code library) stored within a particular set of directories on a given web server.  A web server is a software product in charge of hosting your web applications, and it typically provides a number of related services such as integrated security  File Transfer Protocol (FTP) support, mail exchange services, and so forth. Internet Information Server (IIS) is Microsoft’s enterprise-level web server product, and it has necessary support for classic ASP as well as ASP.NET web applications. Working with IIS Virtual Directories A single IIS installation is able to host numerous web applications, each of which resides in a virtual directory. Each virtual directory is mapped to a physical directory on the local hard drive. Therefore, if you create a new virtual directory named CarsRUs, the outside world can navigate to this site using a URL such as http://www.CarsRUs.com (assuming your site’s IP address has been registered with the world at large). Under the hood, the virtual directory maps to a physical root directory such as C:inetpubwwwrootAspNetCarsSite, which contains the content of the web application. HTML form Development  The real action of an *.htm file occurs within the scope of the <form> elements. An HTML form is simply a named group of related UI elements used to gather user input, which is then transmitted to the web application via HTTP  Typically, the opening <form> tag supplies an action attribute that specifies the URL to which to submit the form data, as well as the method of transmitting that data itself (POST or GET). <html> <head> <title>My Site</title> </head> <body> <form action=”success.html” method=”POST”> <!-- Insert web content here -> </form> </body> </html>
  • 2. 26 GET and POST (Submitting the Form Data) Used to submit form data to the web server for processing. <form name="defaultPage" id="defaultPage" action="ClassicAspPage.asp" method = "GET"> ... </form> GET: When you specify method = "GET" as the mode of transmission, the form data is appended to the query string as a set of name/value pairs separated by ampersands: http://localhost/Cars/ClassicAspPage.asp?txtUserName=Andrew&txtPassword=abcd123 POST: The other method of transmitting form data to the web server is to specify method = "POST". In this case, the form data is not appended to the query string, but instead is written to a separate line within the HTTP header. Using POST, the form data is not directly visible to the outside world. More important, POST data does not have a character-length limitation (many browsers have a limit for GET queries). ASP.NET application Below is the simple asp.net application using VBScript. Index.asp <html> <body> <form action=”process.asp” method=”GET” > Username: <input type=”text” name=”txtUserName” /> Password: <input type=”text” name=”txtPassword” /> <input type=”submit” name=”btnSubmit” /> </form> </body> </html> process.asp <%@ language="VBScript" %> <html> <head> <title>Demo </title> </head> <body> <h1> Here is what you sent me:</h1> <%= Dim name = Request.QueryString("txtUserName ") <%= Dim pwd = Request.QueryString("txtPassword") %> User Name: <%=Response.Write(name) %> <br> Password: <%=Response.Write(pwd) %> </body> </html>
  • 3. 27 ASP.NET namespaces As of .NET 2.0, there are no fewer than 34 web-centric namespaces in the base class libraries. These namespaces can be grouped into four major categories: 1. Core functionality (e.g., types that allow you to interact with the HTTP request and response) 2. Web Form and HTML controls 3. Mobile web development 4. XML web services Below table describes several of the core ASP.NET 2.0 namespaces. Creating sample C# web Applications <% HelloWorldLabel.Text = "Hello, world!"; %> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>MyPage</title> </head> <body> <form id="form1" runat="server"> <div> <asp:Label runat="server" id="HelloWorldLabel"></asp:Label> </div> </form> </body> </html>
  • 4. 28 ASP.NET Website Directory Structure Life Cycle of an ASP.NET Web Page
  • 5. 29 Introduction to web Form controls  Web Forms are compiled and executed on the server, which generates the HTML that displays the web pages.  Web Forms comes with hundreds of different web controls and web components to build user-driven web sites with data access. The types in System.Web.UI.WebControls can be broken down into several broad categories:  Simple controls - The simple controls are so named because they are ASP.NET web controls that map to standard HTML widgets (buttons, lists, hyperlinks, image holders, tables, etc.).  Rich controls - Rich controls are those for which there is no direct HTML equivalent (such as the Calendar, TreeView, Wizard, etc.)  Data-centric controls - Data-centric controls are widgets that are typically populated via a given data connection. (eg, GridView)  Input validation controls - Validation controls are server-side widgets that automatically emit client-side JavaScript, for the purpose of form field validation  Login controls - These UI elements completely encapsulate the details of logging into a site, providing password-retrieval services and managing user roles Building Web Services The term "web service" refers to a form of a component that can be used remotely Microsoft offers two types of web services in their .NET framework, XML web services and .NET remoting. Web services are invoked remotely using SOAP(Simple Object Access Protocol) or HTTP-GET and HTTP-POST protocols . The file extension for a web service is .asmx. Benefits of XML Web Services: Language and platform independence: XML web services provide a way for unrelated platforms, operating systems, and programming languages to exchange information in harmony. Automatic upgrade: Unlike components, if a web service requires an update, that update is propagated to all applications consuming that web service immediately The following code shows the most basic web service: HelloWorld.asmx <%@ WebService Language="C#" class="HelloWorld"%> using System.Web.Services; public class HelloWorld : WebService{ // HelloWorld class inherits from the WebService base class [WebMethod] // indicates to IIS and the .NET compiler that the following method is to be exposed and web callable. public string HelloWorldMethod() { return "Hello World"; } }
  • 6. 30 Web Service Namespace The base class libraries define a number of namespaces that allow you to interact with each web service technology