The name ‘Response’ does not exist in the current context

If the following line does not work:

Response.Redirect(“Oops.aspx”)

or this line:

Response.Write(“Oops.aspx”)

and get the error like: The name ‘Response’ does not exist in the current context

Try to use:

HttpContext.Current.Response.Write("Oops.aspx")
Advertisements
By simplemsexchange Posted in ASP.NET

One comment on “The name ‘Response’ does not exist in the current context

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s