Sideway
output.to from Sideway
Draft for Information Only

Content

Request Object
 Constructor
 Properties
 Methods
 Remarks
 Source/Reference

Request Object

The Request object is an instance of the System.Web.HttpRequest class. Request object of ASP.NET is related to retrieving data by the server from the client.

Tthe Request property of the Page class can be use to access the HttpRequest instance for the current request. For example, Request["key"] can be used for accessing data from the QueryString, Form, Cookies, or ServerVariables collections.

The methods and properties of the HttpRequest class are exposed through the Request properties of the HttpApplication, HttpContext, Page, and UserControl classes.

Note: Unicode support for HttpRequest class members requires IIS version 6.0 or later.

Constructor

Constructor Description
HttpRequest(String, String, String) Initializes an HttpRequest object.

Properties

Property Description
AcceptTypes Gets a string array of client-supported MIME accept types.
AnonymousID Gets the anonymous identifier for the user, if present.
ApplicationPath Gets the ASP.NET application's virtual application root path on the server.
AppRelativeCurrentExecutionFilePath Gets the virtual path of the application root and makes it relative by using the tilde (~) notation for the application root (as in "~/page.aspx").
Browser Gets or sets information about the requesting client's browser capabilities.
ClientCertificate (collection) Gets the current request's client security certificate.
ContentEncoding Gets or sets the character set of the entity-body.
ContentLength Specifies the length, in bytes, of content sent by the client.
ContentType Gets or sets the MIME content type of the incoming request.
Cookies (collection) Gets a collection of cookies sent by the client.
CurrentExecutionFilePath Gets the virtual path of the current request.
FilePath Gets the virtual path of the current request.
Files Gets the collection of files uploaded by the client, in multipart MIME format.
Filter Gets or sets the filter to use when reading the current input stream.
Form (collection) Gets a collection of form variables.
Headers Gets a collection of HTTP headers.
HttpChannelBinding Gets the ChannelBinding object of the current HttpWorkerRequest instance.
HttpMethod Gets the HTTP data transfer method (such as GET, POST, or HEAD) used by the client.
InputStream Gets the contents of the incoming HTTP entity body.
IsAuthenticated Gets a value indicating whether the request has been authenticated.
IsLocal Gets a value indicating whether the request is from the local computer.
IsSecureConnection Gets a value indicating whether the HTTP connection uses secure sockets (that is, HTTPS).
Item[String] Gets the specified object from the QueryString, Form, Cookies, or ServerVariables collections.
LogonUserIdentity Gets the WindowsIdentity type for the current user.
Params Gets a combined collection of QueryString, Form, Cookies, and ServerVariables items.
Path Gets the virtual path of the current request.
PathInfo Gets the additional path information for a resource with a URL extension.
PhysicalApplicationPath

Gets the physical file system path of the currently executing server application's root directory.

PhysicalPath Gets the physical file system path corresponding to the requested URL.
QueryString (collection) Gets the collection of HTTP query string variables.
RawUrl Gets the raw URL of the current request.
RequestType Gets or sets the HTTP data transfer method (GET or POST) used by the client.
ServerVariables(collection) Gets a collection of Web server variables.
TotalBytes Gets the number of bytes in the current input stream.
Url Gets information about the URL of the current request.
UrlReferrer Gets information about the URL of the client's previous request that linked to the current URL.
UserAgent Gets the raw user agent string of the client browser that has been provided. Please note it may be null.
UserHostAddress Gets the IP host address of the remote client.
UserHostName Gets the DNS name of the remote client.
UserLanguages Gets a sorted string array of client language preferences.

Methods

Method Description
BinaryRead(Int32) Performs a binary read of a specified number of bytes from the current input stream.
Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object)
GetHashCode() Serves as the default hash function. (Inherited from Object)
GetType() Gets the Type of the current instance. (Inherited from Object)
MapImageCoordinates(String) Maps an incoming image-field form parameter to appropriate x-coordinate and y-coordinate values.
MapPath(String) Maps the specified virtual path to a physical path.
MapPath(String, String, Boolean) Maps the specified virtual path to a physical path.
MemberwiseClone() Creates a shallow copy of the current Object. (Inherited from Object)
SaveAs(String, Boolean) Saves an HTTP request to disk.
ToString() Returns a string that represents the current object. (Inherited from Object)
ValidateInput() Causes validation to occur for the collections accessed through the Cookies, Form, and QueryString properties.

Remarks

  • For an unknown variable of collection of a Request, The Request object returens EMPTY
  • The collection name can be omitted by directly calling the variable as the variable of the function. i.e. Request(variable)
  • If no collection name is specified, the web server searches the variable name in the collections in the order of: QueryString, Form, Cookies, ClientCertificate and ServerVariables and only the value of first instance will be returned
  • The methods and properties of ASP request object can be grouped into
    • ReadOnly property: TotalBytes;
    • Data Stream: BinaryRead;
    • Data Field/Collection: QueryString; Form; Cookies; ClientCertificate; ServerVariables.

Source/Reference

  • https://docs.microsoft.com/en-us/dotnet/api/system.web.httprequest?view=netframework-2.0
  • https://www.go4expert.com/articles/aspnet-server-side-t34114/
  • https://www.tutorialspoint.com/asp.net/asp.net_server_side.htm

 


©sideway

ID: 190500029 Last Updated: 5/29/2019 Revision: 0 Ref:

close

References

  1. Active Server Pages,  , http://msdn.microsoft.com/en-us/library/aa286483.aspx
  2. ASP Overview,  , http://msdn.microsoft.com/en-us/library/ms524929%28v=vs.90%29.aspx
  3. ASP Best Practices,  , http://technet.microsoft.com/en-us/library/cc939157.aspx
  4. ASP Built-in Objects,  , http://msdn.microsoft.com/en-us/library/ie/ms524716(v=vs.90).aspx
  5. Response Object,  , http://msdn.microsoft.com/en-us/library/ms525405(v=vs.90).aspx
  6. Request Object,  , http://msdn.microsoft.com/en-us/library/ms524948(v=vs.90).aspx
  7. Server Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525541(v=vs.90).aspx
  8. Application Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525360(v=vs.90).aspx
  9. Session Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms524319(8v=vs.90).aspx
  10. ASPError Object,  , http://msdn.microsoft.com/en-us/library/ms524942(v=vs.90).aspx
  11. ObjectContext Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525667(v=vs.90).aspx
  12. Debugging Global.asa Files,  , http://msdn.microsoft.com/en-us/library/aa291249(v=vs.71).aspx
  13. How to: Debug Global.asa files,  , http://msdn.microsoft.com/en-us/library/ms241868(v=vs.80).aspx
  14. Calling COM Components from ASP Pages,  , http://msdn.microsoft.com/en-us/library/ms524620(v=VS.90).aspx
  15. IIS ASP Scripting Reference,  , http://msdn.microsoft.com/en-us/library/ms524664(v=vs.90).aspx
  16. ASP Keywords,  , http://msdn.microsoft.com/en-us/library/ms524672(v=vs.90).aspx
  17. Creating Simple ASP Pages,  , http://msdn.microsoft.com/en-us/library/ms524741(v=vs.90).aspx
  18. Including Files in ASP Applications,  , http://msdn.microsoft.com/en-us/library/ms524876(v=vs.90).aspx
  19. ASP Overview,  , http://msdn.microsoft.com/en-us/library/ms524929(v=vs.90).aspx
  20. FileSystemObject Object,  , http://msdn.microsoft.com/en-us/library/z9ty6h50(v=vs.84).aspx
  21. http://msdn.microsoft.com/en-us/library/windows/desktop/ms675944(v=vs.85).aspx,  , ADO Object Model
  22. ADO Fundamentals,  , http://msdn.microsoft.com/en-us/library/windows/desktop/ms680928(v=vs.85).aspx
close

Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Reference 79

Computer

Hardware 249

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019