Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

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

$
0
0

I used the following code the get the url of privouse page/view. It works well in SharePoint 2010 with reference to the system.web namespace.

prePage = Request.QueryString["source"];
if (prePage == null)
         prePage = "/nbep";

Now, I am working in SharePoint 2013. I got an error "The name 'Request' does not exist in the current context". I know when I add a web part, the namespace is "webpart" vs "user control" in SharePoint 2010. I just wonder if anyone know how to accomplish the need in SharePoint 2013.

Many thanks.  


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>