ASP.NET

1. ASP.NET Introduction 2. Comp of .Net Framework 3.5 3. Sys.Req for VS 2008 4. ASP.NET Envrmnt Setup 5. VS2010 Ultimate Sys.Req 6. Installing VS 2010 7. VS 2012 Sys.Req 8. Installing VS Exp 2012 9. Start the VS 2008 10. Application Life Cycle 11. Page Life Cycle 12. Page Life Cycle Events 13. ASP.NET Example 14. Event Handling 15. Default Events 16. Server Side 17. Request Object 18. Response Object 19. Server Controls 20. Server Controls Properties 21. Server Controls Methods 22. HTML Server Controls 23. Client Side 24. ASP.NET Basic Controls 25. TextBox Control 26. CheckBox Controls 27. RadioButton Controls 28. ListBox Control 29. HyperLink Control 30. Image Control 31. BulletedList Control 32. ASP.NET Directives 33. Implements Directive 34. Master Type Directive 35. Page Directive 36. PreviousPage Type 37. Managing State 38. Control State 39. Cookies 40. Query Strings 41. Server-Side State 42. Session State 43. Validation Controls 44. Required FieldValidator 45. Range Validator 46. Compare Validator 47. RegularExpressionValidator 48. Custom Validator 49. Validation Summary 50. Data Source Control 51. AdRotator Control 52. Calendar Control 53. Calendar Control Example 54. Panel Control 55. Panel Control Example 56. Multi Views Control 57. MultiView & View controls 58. MultiView Control Example 59. FileUpload Control 60. FileUpload Control Eg 61. AJAX Control 62. UpdatePanel control 63. UpdateProgress Control 64. Custom Controls 65. Custom Control Eg 66. Personalization 67. Create Simple Profile 68. ADO.NET 69. ADO.NET Objects 70. DataTable 71. DataRow 72. DataColumn 73. Object Example 74. Error Handling 75. Tracing Errors 76. Debugger 77. Security 78. Authentication 79. Authorization 80. LINQ 81. LINQ Query Operators 82. LINQ Example 83. Caching 84. Data Caching 85. Output Caching 86. Object Caching 87. Web Services 88. Create Web Services Eg 89. Web & Machine.config 90. Settings Schema 91. ASP.NET Deployment 92. XCopy Deployment 93. Web Setup Project 94. ASP Interview Part 1 95. ASP Interview Part 2 96. ASP Interview Part 3 97. ASP Interview Part 4 98. ASP Interview Part 5 99. ASP Interview Part 6
Pr.Pg Next Pg

The Response Object tutorials

  • The ASP.NET provides a class called HttpResponse which is defined in the namespace System.Web. This class provides various methods and properties which help you use various information related to a web response.

  • You can use the Response object to send output to the client.

 

Syntax:

public sealed class HttpResponse

Methods:

  • The Response object defines the following methods.

 

Method

Description

Response.AddHeader

Sets the HTML header name to value

Response.AppendToLog

Adds a string to the end of the Web server log entry for this request

Response.BinaryWrite

Writes a string of binary characters to the HTTP output stream

Response.Clear

Erases any buffered HTML output.

Response.End

Sends all currently buffered output to the client, stops execution of the page, and raises the EndRequest event.

Response.Flush

Sends all currently buffered output to the client

Response.Redirect(String)

Redirects a request to a new URL and specifies the new URL.

Response.write

Writes a variable or text to the current HTTP output as a string

 

Properties of the Response Object

  • The following table provides some noteworthy properties of the Response object:

 

Properties

Description

Response.Buffer

Indicates whether page output is buffered

Response.CacheControl

Sets a header to notify proxy servers or other cache mechanisms whether they can cache the output generated by ASP.

Response.BufferOutput

Gets or sets a value indicating whether to buffer output and send it after the complete page is finished processing.

Response.Charset

Appends the name of the character set to the content-type header. The character set specifies for the browser how to display characters.

Response.ContentEncoding

Gets or sets the HTTP character set of the output stream.

Response.ContentType

Gets or sets the HTTP MIME type of the output stream.

Response.Cookies

Gets the response cookie collection

Response.Expires

Specifies the length of time before a page cached on a browser expires.

Response.ExpiresAbsolute

Specifies the date and time on which a page cached on a browser expires.

Response.HeaderEncoding

Gets or sets an Encoding object that represents the encoding for the current header output stream.

Response.Headers

Gets the collection of response headers

Response.IsClientConnected

Indicates whether the client has reset the connection to the server

Response.Output

Enables output of text to the outgoing HTTP response stream.

Response.OutputStream

Enables binary output to the outgoing HTTP content body

Response.RedirectLocation

Gets or sets the value of the Http Location header.

Response.LCID

Sets the LCID for data for one response The LCID refers to how dates, times, and currency are formatted for a specific geographical locale.

Response.PICS

Set the value for the pics-label response header to indicate the PICS content rating.

Response.Status

Sets the Status line that is returned to the client

Response.StatusCode

Gets or sets the HTTP status code of the output returned to the client

Response.StatusDescription

Gets or sets the HTTP status string of the output returned to the client.

Response.SubStatusCode

Gets or sets a value qualifying the status code of the response.

Response.SuppressContent

Gets or sets a indicating whether to send HTTP content to the client.value


Pr.Pg border                                              Next Pg