Add System.Web reference and use that namespace in your class file. Add below code:
namespace Default_Construtor
{
public class Class1
{
public void Show()
{
System.Web.HttpContext.Current.Response.Write("Hello World");
}
}
}
And call the Show() method from code-behind file file.