SlideShare a Scribd company logo
Home.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="home.aspx.cs"
Inherits="home" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
font-size: xx-large;
}
</style></head><body>
<form id="form1" runat="server">
<div class="auto-style1" style="text-align: center">
<strong>HTTP REQUEST &amp; RESPONSE CLASS</strong></div>
<p style="text-align: center">
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl="~/query.aspx">QueryString Collections</asp:HyperLink>
</p>
<p style="text-align: center">
<asp:HyperLink ID="HyperLink2" runat="server"
NavigateUrl="~/browser.aspx">Browser Object</asp:HyperLink>
</p>
<p style="text-align: center">
<asp:HyperLink ID="HyperLink3" runat="server"
NavigateUrl="~/cookies.aspx">Cookies</asp:HyperLink>
</p>
</form></body></html>
Query.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="query.aspx.cs"
Inherits="query" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
font-size: large;
}
</style></head>
<body style="text-align: center">
<form id="form1" runat="server">
<div>
HTTP REQUEST CLASS - QUERY STRING COLLECTION</div>
<p style="text-align: left">
Enter EmpId &amp; Emp.Name in Address bar as given below to process the
QueryString</p>
<p style="text-align: left">
<span style="font-size: 12.0pt; line-height: 115%; font-family: &quot;Times New
Roman&quot;,&quot;serif&quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font:
minor-latin; background: white; mso-highlight: white; mso-ansi-language: EN-US; mso-
fareast-language: EN-US; mso-bidi-language: AR-SA">Example:
http://LocalHost/***/query.aspx</span><span class="auto-style1" style="line-height: 115%;
font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; mso-fareast-font-family:
Calibri; mso-fareast-theme-font: minor-latin; background: white; mso-highlight: white; mso-
ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-
SA"><strong><em>?EmpId=10&amp;EmpName=Priya</em></strong></span><asp:Label
ID="EmpId" runat="server" style="z-index: 1; left: 45px; top: 168px; position: absolute;
right: 830px"></asp:Label>
<asp:Label ID="EmpName" runat="server" style="z-index: 1; left: 42px; top: 216px;
position: absolute"></asp:Label>
</p> <p style="text-align: left"> &nbsp;</p>
<p style="text-align: left"> &nbsp;</p>
<p style="text-align: left"> &nbsp;</p>
<p style="text-align: left"> &nbsp;</p>
<p style="text-align: left"> &nbsp;</p>
<p style="text-align: left">
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/home.aspx">Go
Home</asp:HyperLink>
</p>
</form></body></html>
Browser.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="browser.aspx.cs"
Inherits="browser" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body style="text-align: center">
<form id="form1" runat="server">
<div>
HTTP REQUEST CLASS - BROWSER OBJECT</div>
<p style="text-align: left">
<strong>BROWSER DETAILS :</strong></p>
<asp:Label ID="BrowserDetails" runat="server" style="z-index: 1; left: 16px; top:
100px; position: absolute"></asp:Label>
<p>
&nbsp;</p>
<p>
&nbsp;</p>
<p>
&nbsp;</p>
<p>
&nbsp;</p>
<p>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/home.aspx"
style="text-align: left; z-index: 1; left: 30px; top: 270px; position: absolute">Go
Home</asp:HyperLink>
</p>
<p>
&nbsp;</p>
</form>
</body>
</html>
Cookies
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="cookies.aspx.cs"
Inherits="cookies" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"> <title></title>
<style type="text/css">
#BodyTag {
text-align: center;
}
</style></head><body runat="server" id="BodyTag">
<form id="form1" runat="server">
<div>
HTTP RESPONSE CLASS - COOKIES</div>
<p style="text-align: left">
Select any color from Dropdown to set as BG color for the next 10 sec.</p>
<p style="text-align: left">
<asp:DropDownList ID="ColorSelector" runat="server" AutoPostBack="True"
OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem>Select</asp:ListItem>
<asp:ListItem>Red</asp:ListItem>
<asp:ListItem>Blue</asp:ListItem>
<asp:ListItem>Green</asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:DropDownList>
</p> <p style="text-align: left">
&nbsp;</p> <p style="text-align: left">
&nbsp;</p> <p style="text-align: left">
&nbsp;</p>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/home.aspx">Go
Home</asp:HyperLink>
</form></body></html>
Query.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class query : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
EmpId.Text ="Emp.Id :"+ Request.QueryString["EmpId"];
EmpName.Text ="Emp.Name : "+ Request.QueryString["EmpName"];
}
}
Browser.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class browser : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
HttpBrowserCapabilities Bcaps;
Bcaps = Request.Browser;
BrowserDetails.Text = "Browser Name : " + Bcaps.Browser + "<br>" +
"Browser Version: " + Bcaps.MajorVersion + "<br>" +
"Support Cookies: " + Bcaps.Cookies + "<br>" +
"Platform : " + Bcaps.Platform + "<br>";
}
}
Cookies.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class cookies : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Cookies["BackgroundColor"] != null)
{
ColorSelector.SelectedValue = Request.Cookies["BackgroundColor"].Value;
BodyTag.Style["background-color"] = ColorSelector.SelectedValue;
} }
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
BodyTag.Style["background-color"] = ColorSelector.SelectedValue;
HttpCookie cookie = new HttpCookie("BackgroundColor");
cookie.Value = ColorSelector.SelectedValue;
// cookie.Expires = DateTime.Now.AddHours(1);
cookie.Expires = DateTime.Now.AddSeconds(10);
Response.SetCookie(cookie);
}
}
HTTP REQUEST RESPONSE OBJECT - WEB APPLICATION USING C# LAB
HTTP REQUEST RESPONSE OBJECT - WEB APPLICATION USING C# LAB
HTTP REQUEST RESPONSE OBJECT - WEB APPLICATION USING C# LAB

More Related Content

What's hot

Asp #1
Asp #1Asp #1
Asp #1
Joni
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
Jainul Musani
 
JavaScript - Part-1
JavaScript - Part-1JavaScript - Part-1
JavaScript - Part-1
Jainul Musani
 
Deliverance talk at plone meetup
Deliverance talk at plone meetupDeliverance talk at plone meetup
Deliverance talk at plone meetup
Jazkarta, Inc.
 
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example   Jan Leth-KjaerPractical PHP by example   Jan Leth-Kjaer
Practical PHP by example Jan Leth-Kjaer
COMMON Europe
 
01. 02. html web engineering html &amp; introduction
01. 02. html   web engineering html &amp; introduction01. 02. html   web engineering html &amp; introduction
01. 02. html web engineering html &amp; introduction
N Gull
 
Integrating External APIs with WordPress
Integrating External APIs with WordPressIntegrating External APIs with WordPress
Integrating External APIs with WordPress
Marty Thornley
 
Consuming & embedding external content in WordPress
Consuming & embedding external content in WordPressConsuming & embedding external content in WordPress
Consuming & embedding external content in WordPress
Akshay Raje
 
Turbogears Presentation
Turbogears PresentationTurbogears Presentation
Turbogears Presentation
didip
 
A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...
A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...
A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...
Ho Chi Minh City Software Testing Club
 
Integrating WordPress With Web APIs
Integrating WordPress With Web APIsIntegrating WordPress With Web APIs
Integrating WordPress With Web APIs
randyhoyt
 
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
Michaela Lehr
 
oik-plugins: WordUp Pompey! Nov 2011
oik-plugins: WordUp Pompey! Nov 2011oik-plugins: WordUp Pompey! Nov 2011
oik-plugins: WordUp Pompey! Nov 2011
Herb Miller
 
BDD with cucumber
BDD with cucumberBDD with cucumber
BDD with cucumber
Kerry Buckley
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshowsblackman
 

What's hot (20)

Asp #1
Asp #1Asp #1
Asp #1
 
Ip lab
Ip labIp lab
Ip lab
 
Pp checker
Pp checkerPp checker
Pp checker
 
Vb.Net Web Forms
Vb.Net  Web FormsVb.Net  Web Forms
Vb.Net Web Forms
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
 
JavaScript - Part-1
JavaScript - Part-1JavaScript - Part-1
JavaScript - Part-1
 
Deliverance talk at plone meetup
Deliverance talk at plone meetupDeliverance talk at plone meetup
Deliverance talk at plone meetup
 
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example   Jan Leth-KjaerPractical PHP by example   Jan Leth-Kjaer
Practical PHP by example Jan Leth-Kjaer
 
01. 02. html web engineering html &amp; introduction
01. 02. html   web engineering html &amp; introduction01. 02. html   web engineering html &amp; introduction
01. 02. html web engineering html &amp; introduction
 
Integrating External APIs with WordPress
Integrating External APIs with WordPressIntegrating External APIs with WordPress
Integrating External APIs with WordPress
 
Consuming & embedding external content in WordPress
Consuming & embedding external content in WordPressConsuming & embedding external content in WordPress
Consuming & embedding external content in WordPress
 
Turbogears Presentation
Turbogears PresentationTurbogears Presentation
Turbogears Presentation
 
Web technology
Web technologyWeb technology
Web technology
 
A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...
A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...
A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...
 
Integrating WordPress With Web APIs
Integrating WordPress With Web APIsIntegrating WordPress With Web APIs
Integrating WordPress With Web APIs
 
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
HTML und CSS für Designer / HTML & CSS for designers (PUBKON 2014)
 
Makezine
MakezineMakezine
Makezine
 
oik-plugins: WordUp Pompey! Nov 2011
oik-plugins: WordUp Pompey! Nov 2011oik-plugins: WordUp Pompey! Nov 2011
oik-plugins: WordUp Pompey! Nov 2011
 
BDD with cucumber
BDD with cucumberBDD with cucumber
BDD with cucumber
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshow
 

Similar to HTTP REQUEST RESPONSE OBJECT - WEB APPLICATION USING C# LAB

Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Joao Lucas Santana
 
Html server control - ASP. NET with c#
Html server control - ASP. NET with c#Html server control - ASP. NET with c#
Html server control - ASP. NET with c#
priya Nithya
 
Tercer trabajo de drapi 02
Tercer trabajo de drapi 02Tercer trabajo de drapi 02
Tercer trabajo de drapi 02
Jhon Silva Penekita
 
Los Estados De La Materia
Los Estados De La MateriaLos Estados De La Materia
Los Estados De La MateriaMayritalinda
 
QuickConnect
QuickConnectQuickConnect
QuickConnectAnnu G
 
El Tiempo Nos Ensea 214392
El Tiempo Nos Ensea 214392El Tiempo Nos Ensea 214392
El Tiempo Nos Ensea 214392guestc65f09
 
JavaServer Pages
JavaServer Pages JavaServer Pages
JavaServer Pages
profbnk
 
Fronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateFronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateInventis Web Architects
 
Ss 36932418[1]
Ss 36932418[1]Ss 36932418[1]
Ss 36932418[1]Ya Jinda
 
Mobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLsMobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLs
Harvard Web Working Group
 
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!Coulawrence
 
An Introduction To HTML5
An Introduction To HTML5An Introduction To HTML5
An Introduction To HTML5
Robert Nyman
 
Apex & jQuery Mobile
Apex & jQuery MobileApex & jQuery Mobile
Apex & jQuery Mobile
Christian Rokitta
 
Django Templates
Django TemplatesDjango Templates
Django Templates
Willy Liu
 
HTML5, The Open Web, and what it means for you - Altran
HTML5, The Open Web, and what it means for you - AltranHTML5, The Open Web, and what it means for you - Altran
HTML5, The Open Web, and what it means for you - AltranRobert Nyman
 
Seo Cheat Sheet
Seo Cheat SheetSeo Cheat Sheet
Seo Cheat Sheet
Anchal Thakur
 

Similar to HTTP REQUEST RESPONSE OBJECT - WEB APPLICATION USING C# LAB (20)

Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)
 
Html server control - ASP. NET with c#
Html server control - ASP. NET with c#Html server control - ASP. NET with c#
Html server control - ASP. NET with c#
 
smoke1272528461
smoke1272528461smoke1272528461
smoke1272528461
 
Tercer trabajo de drapi 02
Tercer trabajo de drapi 02Tercer trabajo de drapi 02
Tercer trabajo de drapi 02
 
Los Estados De La Materia
Los Estados De La MateriaLos Estados De La Materia
Los Estados De La Materia
 
QuickConnect
QuickConnectQuickConnect
QuickConnect
 
El Tiempo Nos Ensea 214392
El Tiempo Nos Ensea 214392El Tiempo Nos Ensea 214392
El Tiempo Nos Ensea 214392
 
JavaServer Pages
JavaServer Pages JavaServer Pages
JavaServer Pages
 
Fronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateFronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-template
 
Ss 36932418[1]
Ss 36932418[1]Ss 36932418[1]
Ss 36932418[1]
 
Mobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLsMobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLs
 
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
 
Frfrfrf
FrfrfrfFrfrfrf
Frfrfrf
 
An Introduction To HTML5
An Introduction To HTML5An Introduction To HTML5
An Introduction To HTML5
 
Apex & jQuery Mobile
Apex & jQuery MobileApex & jQuery Mobile
Apex & jQuery Mobile
 
Schoology tutorial[1]
Schoology tutorial[1]Schoology tutorial[1]
Schoology tutorial[1]
 
Django Templates
Django TemplatesDjango Templates
Django Templates
 
HTML5, The Open Web, and what it means for you - Altran
HTML5, The Open Web, and what it means for you - AltranHTML5, The Open Web, and what it means for you - Altran
HTML5, The Open Web, and what it means for you - Altran
 
Seo Cheat Sheet
Seo Cheat SheetSeo Cheat Sheet
Seo Cheat Sheet
 
Seo cheat-sheet
Seo cheat-sheetSeo cheat-sheet
Seo cheat-sheet
 

More from priya Nithya

Android Architecture.pptx
Android Architecture.pptxAndroid Architecture.pptx
Android Architecture.pptx
priya Nithya
 
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
priya Nithya
 
Asynchronous data transfer
Asynchronous data transferAsynchronous data transfer
Asynchronous data transfer
priya Nithya
 
Asp.net state management
Asp.net state managementAsp.net state management
Asp.net state management
priya Nithya
 
Android LAb - Creating an android app with Radio button
Android LAb - Creating an android app with Radio buttonAndroid LAb - Creating an android app with Radio button
Android LAb - Creating an android app with Radio button
priya Nithya
 
ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asp
priya Nithya
 
Web application using c# Lab - Web Configuration file
Web application using c# Lab - Web Configuration fileWeb application using c# Lab - Web Configuration file
Web application using c# Lab - Web Configuration file
priya Nithya
 
Creation of simple application using - step by step
Creation of simple application using - step by stepCreation of simple application using - step by step
Creation of simple application using - step by step
priya Nithya
 
Adaptation of tcp window
Adaptation of tcp windowAdaptation of tcp window
Adaptation of tcp window
priya Nithya
 
Asp.net Overview
Asp.net OverviewAsp.net Overview
Asp.net Overview
priya Nithya
 
Key mechanism of mobile ip
Key mechanism of mobile ip Key mechanism of mobile ip
Key mechanism of mobile ip
priya Nithya
 
Mobile ip overview
Mobile ip overviewMobile ip overview
Mobile ip overview
priya Nithya
 
Features of mobile ip
Features of mobile ipFeatures of mobile ip
Features of mobile ip
priya Nithya
 
Creating a Name seperator Custom Control using C#
Creating a Name seperator Custom Control using C#Creating a Name seperator Custom Control using C#
Creating a Name seperator Custom Control using C#
priya Nithya
 
How to Create Database component -Enterprise Application Using C# Lab
How to Create Database component -Enterprise Application Using C# Lab  How to Create Database component -Enterprise Application Using C# Lab
How to Create Database component -Enterprise Application Using C# Lab
priya Nithya
 
Creating simple component
Creating simple componentCreating simple component
Creating simple component
priya Nithya
 
Internet (i mcom)
Internet (i mcom)Internet (i mcom)
Internet (i mcom)
priya Nithya
 

More from priya Nithya (17)

Android Architecture.pptx
Android Architecture.pptxAndroid Architecture.pptx
Android Architecture.pptx
 
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
 
Asynchronous data transfer
Asynchronous data transferAsynchronous data transfer
Asynchronous data transfer
 
Asp.net state management
Asp.net state managementAsp.net state management
Asp.net state management
 
Android LAb - Creating an android app with Radio button
Android LAb - Creating an android app with Radio buttonAndroid LAb - Creating an android app with Radio button
Android LAb - Creating an android app with Radio button
 
ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asp
 
Web application using c# Lab - Web Configuration file
Web application using c# Lab - Web Configuration fileWeb application using c# Lab - Web Configuration file
Web application using c# Lab - Web Configuration file
 
Creation of simple application using - step by step
Creation of simple application using - step by stepCreation of simple application using - step by step
Creation of simple application using - step by step
 
Adaptation of tcp window
Adaptation of tcp windowAdaptation of tcp window
Adaptation of tcp window
 
Asp.net Overview
Asp.net OverviewAsp.net Overview
Asp.net Overview
 
Key mechanism of mobile ip
Key mechanism of mobile ip Key mechanism of mobile ip
Key mechanism of mobile ip
 
Mobile ip overview
Mobile ip overviewMobile ip overview
Mobile ip overview
 
Features of mobile ip
Features of mobile ipFeatures of mobile ip
Features of mobile ip
 
Creating a Name seperator Custom Control using C#
Creating a Name seperator Custom Control using C#Creating a Name seperator Custom Control using C#
Creating a Name seperator Custom Control using C#
 
How to Create Database component -Enterprise Application Using C# Lab
How to Create Database component -Enterprise Application Using C# Lab  How to Create Database component -Enterprise Application Using C# Lab
How to Create Database component -Enterprise Application Using C# Lab
 
Creating simple component
Creating simple componentCreating simple component
Creating simple component
 
Internet (i mcom)
Internet (i mcom)Internet (i mcom)
Internet (i mcom)
 

Recently uploaded

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
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
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
 
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
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
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)
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
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
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
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
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
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
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
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
 
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)

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...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
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
 
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
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
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
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .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
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
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
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
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
 
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
 

HTTP REQUEST RESPONSE OBJECT - WEB APPLICATION USING C# LAB

  • 1. Home.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="home.aspx.cs" Inherits="home" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> .auto-style1 { font-size: xx-large; } </style></head><body> <form id="form1" runat="server"> <div class="auto-style1" style="text-align: center"> <strong>HTTP REQUEST &amp; RESPONSE CLASS</strong></div> <p style="text-align: center"> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/query.aspx">QueryString Collections</asp:HyperLink> </p> <p style="text-align: center"> <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/browser.aspx">Browser Object</asp:HyperLink> </p> <p style="text-align: center"> <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="~/cookies.aspx">Cookies</asp:HyperLink> </p> </form></body></html>
  • 2. Query.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="query.aspx.cs" Inherits="query" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> .auto-style1 { font-size: large; } </style></head> <body style="text-align: center"> <form id="form1" runat="server"> <div> HTTP REQUEST CLASS - QUERY STRING COLLECTION</div> <p style="text-align: left"> Enter EmpId &amp; Emp.Name in Address bar as given below to process the QueryString</p> <p style="text-align: left"> <span style="font-size: 12.0pt; line-height: 115%; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; background: white; mso-highlight: white; mso-ansi-language: EN-US; mso- fareast-language: EN-US; mso-bidi-language: AR-SA">Example: http://LocalHost/***/query.aspx</span><span class="auto-style1" style="line-height: 115%; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; background: white; mso-highlight: white; mso- ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR- SA"><strong><em>?EmpId=10&amp;EmpName=Priya</em></strong></span><asp:Label ID="EmpId" runat="server" style="z-index: 1; left: 45px; top: 168px; position: absolute; right: 830px"></asp:Label> <asp:Label ID="EmpName" runat="server" style="z-index: 1; left: 42px; top: 216px; position: absolute"></asp:Label> </p> <p style="text-align: left"> &nbsp;</p> <p style="text-align: left"> &nbsp;</p> <p style="text-align: left"> &nbsp;</p> <p style="text-align: left"> &nbsp;</p> <p style="text-align: left"> &nbsp;</p> <p style="text-align: left"> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/home.aspx">Go Home</asp:HyperLink> </p> </form></body></html>
  • 3. Browser.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="browser.aspx.cs" Inherits="browser" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body style="text-align: center"> <form id="form1" runat="server"> <div> HTTP REQUEST CLASS - BROWSER OBJECT</div> <p style="text-align: left"> <strong>BROWSER DETAILS :</strong></p> <asp:Label ID="BrowserDetails" runat="server" style="z-index: 1; left: 16px; top: 100px; position: absolute"></asp:Label> <p> &nbsp;</p> <p> &nbsp;</p> <p> &nbsp;</p> <p> &nbsp;</p> <p>
  • 4. <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/home.aspx" style="text-align: left; z-index: 1; left: 30px; top: 270px; position: absolute">Go Home</asp:HyperLink> </p> <p> &nbsp;</p> </form> </body> </html> Cookies <%@ Page Language="C#" AutoEventWireup="true" CodeFile="cookies.aspx.cs" Inherits="cookies" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> #BodyTag { text-align: center; } </style></head><body runat="server" id="BodyTag"> <form id="form1" runat="server"> <div> HTTP RESPONSE CLASS - COOKIES</div> <p style="text-align: left"> Select any color from Dropdown to set as BG color for the next 10 sec.</p> <p style="text-align: left"> <asp:DropDownList ID="ColorSelector" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"> <asp:ListItem>Select</asp:ListItem>
  • 5. <asp:ListItem>Red</asp:ListItem> <asp:ListItem>Blue</asp:ListItem> <asp:ListItem>Green</asp:ListItem> <asp:ListItem></asp:ListItem> </asp:DropDownList> </p> <p style="text-align: left"> &nbsp;</p> <p style="text-align: left"> &nbsp;</p> <p style="text-align: left"> &nbsp;</p> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/home.aspx">Go Home</asp:HyperLink> </form></body></html> Query.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class query : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { EmpId.Text ="Emp.Id :"+ Request.QueryString["EmpId"]; EmpName.Text ="Emp.Name : "+ Request.QueryString["EmpName"]; } } Browser.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI;
  • 6. using System.Web.UI.WebControls; public partial class browser : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { HttpBrowserCapabilities Bcaps; Bcaps = Request.Browser; BrowserDetails.Text = "Browser Name : " + Bcaps.Browser + "<br>" + "Browser Version: " + Bcaps.MajorVersion + "<br>" + "Support Cookies: " + Bcaps.Cookies + "<br>" + "Platform : " + Bcaps.Platform + "<br>"; } } Cookies.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class cookies : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Request.Cookies["BackgroundColor"] != null) { ColorSelector.SelectedValue = Request.Cookies["BackgroundColor"].Value; BodyTag.Style["background-color"] = ColorSelector.SelectedValue; } } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { BodyTag.Style["background-color"] = ColorSelector.SelectedValue; HttpCookie cookie = new HttpCookie("BackgroundColor"); cookie.Value = ColorSelector.SelectedValue; // cookie.Expires = DateTime.Now.AddHours(1); cookie.Expires = DateTime.Now.AddSeconds(10); Response.SetCookie(cookie); } }