Using Response.Write in a C# Class

By on April 22, 2021

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().

  1. Include System.Web as a reference.
  2. Use HttpContext.Current.Response.Write ().

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: