Request reference not found

T

tshad

I have the following error in VS 2003:

The type or namespace name 'Request' could not be found

But I have the following in my code:

using System;
using System.Data;
using System.IO;
using System.Text.RegularExpressions;
using System.Data.SqlClient;
using System.Web.Services;
using NewHires.RemoteUser;
using NewHires.NewHire;
using NewHires.EmployeeTax;
using NewHires.Employee;
using NewHires.ScorpeoUtility;
using MyFunctions;

using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

I also have the following references:

DBObject
System
System.Data
System.Web
System.Web.Services
System.XML

What else am I missing?

I have another project that has no problem with Request and it seems to have
the same stuff in it.

Thanks,

Tom
 
M

Mark Fitzpatrick

Is this a class by itself and not a codebehind file? If so then you have to
reference it by the full namespace,

HttpContext.Current.Request
 
T

tshad

Mark Fitzpatrick said:
Is this a class by itself and not a codebehind file? If so then you have
to reference it by the full namespace,

HttpContext.Current.Request

That was it.

And yes it was a Class by itself and the one that worked was a codebehind.

Thanks,

Tom
 

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

Top