BryanHood Posted April 4, 2006 Share Posted April 4, 2006 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 More sharing options...
aspnetguy Posted April 5, 2006 Share Posted April 5, 2006 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 More sharing options...
BryanHood Posted April 5, 2006 Author Share Posted April 5, 2006 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 More sharing options...
aspnetguy Posted April 5, 2006 Share Posted April 5, 2006 You will need the System.Web namespace Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now