protected void Page_Load(object sender, EventArgs e) { Response.Write("This is a sample response."); Response.Clear(); Response.Write("The response has been cleared."); }In this example, the Page_Load event is used to write some content to the response and then clear it using the Clear method. This will remove the first content and then replace it with "The response has been cleared." message. Example 2: Clearing the response in an API request ``` public HttpResponseMessage Get(int id) { var person = GetPersonFromDatabase(id); if (person == null) { return Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with id " + id + " not found."); } else { var result = Request.CreateResponse(HttpStatusCode.OK, person); result.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); Response.Clear(); return result; } } ``` In this example, the Get method is an API request that gets a person object from the database. If the person object is not found, an error response will be returned. Otherwise, the person object is returned as the response content. In this case, we are also setting the content type of the response to application/json. Finally, the response is cleared using the Clear method. Package Library: System.Web.