Jump to content

C# Response.Write


BryanHood

Recommended Posts

I am trying to write to the Response Stream using the command "Response.Write".I was able to do this with VB .NET (2005). I need to port this over to C# .Net (2005), but I can not find the proper NameSpace to use.Help!Any help will be greatly appreciated.Thanks, Bryan Clauss

Link to comment
Share on other sites

Are you trying to use this in a class or just in a regualr form?If it is in a class you will need to use HttpContext.Current.Response.Write or you can make a HttpContex variable to be reused with in the class

HttpContext c = HttpContext.Current;c.Response.Write();

Link to comment
Share on other sites

Are you trying to use this in a class or just in a regualr form?I am creating a class that I would like to call/instantiate from within a form.If it is in a class you will need to use HttpContext.Current.Response.Write or you can make a HttpContex variable to be reused with in the class

HttpContext c = HttpContext.Current;c.Response.Write();

Question: What NameSpace will I need for the HttpContext object?That may work for me. I did get the class to compile by inheriting from System.Web.UI.Page (see below), but I really did not want to do this.public class Utilities : System.Web.UI.Page

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...