It’s not that difficult to use Response.Write() in a .NET Framework WebForms class.
Classes in a WebForm application can’t use Response.Write() by default. The following steps will allow you to use this function along with other functions such as Server.MapPath().
- Include System.Web as a reference.
- Use HttpContext.Current.Response.Write ().