how to clean the whole asp.net page in code behind?

asp.net

Solution

Like this:

Response.Clear();
Response.ClearHeaders();

Probably you will want to combine it with a:

Response.End(); 

Problem

Suppose I have a aspx page with UI and code behind. I have code in event Page_Load like: ``` Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Me.Response.Write("Clean the page") '..... End Sub ``` but the page still render out with whole thing in aspx(all those markup). What I want is the only display "Clean the page" in browser for user. How to do it?

Original source