Question: Response.write (squiggly line)

  • Thread starter Thread starter VB Programmer
  • Start date Start date
V

VB Programmer

I can use response.write in any one of my webforms. But when I try to use it
in a Module's public sub there is a squiggly blue line under response.
Hovering over it says 'Name response is not declared.' Do I have to import
something?

Any ideas?

Thanks in advance.
 
You simply need to refer to the current context.
You can do this by specifying the full namespace like this:

System.Web.HttpContext.Current.Response.Write("...")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top