ASP.NET: ERROR: The name 'Request' does not exist in the current context
This article shows you have to resolve the following error: The name 'Request' does not exist in the current context

0 Comments   Posted by retroman80s on May 29, 2009   1735 Views   Report Abuse
Tags: error, request, context

Bookmark and Share
If you're receiving the following error:

     The name 'Request' does not exist in the current context

     The name 'Response' does not exist in the current context

on code like this:

     Response.Redirect("default.aspx")

     or

     Request.QueryString["id"]


Solution:




     HttpContext.Current.Request.QueryString["id"]

     HttpContext.Current.Response.Redirect("default.aspx");

Comments

Login or Register to add a comment.