You can try
protected void Button1_Click(object sender, EventArgs e)
{
string str = PopulateBody("Exception in this page");
this.Page.Controls.Clear();
Response.Write(str);
}
private string PopulateBody(string ErrorMsg)
{
string body = string.Empty;
using (StreamReader reader = new StreamReader(Server.MapPath("~/ErrorPage.htm")))
{
body = reader.ReadToEnd();
}
body = body.Replace("{MESSAGE}", ErrorMsg);
return body;
}