Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi Which namespace is response o

Status
Not open for further replies.

chebbi

Programmer
Feb 6, 2002
98
IN
Hi

Which namespace is response object in? Iam tryoing to use response.redirect("somepage.aspx") but it keeps on giving the error

The type or namespace name 'response' could not be found (are you missing a using directive or an assembly reference?)

which namspace do i have to import to make this work?



Badrinath Chebbi
 
I'm successfully using Response.Redirect in the current project I'm working on and the namespaces I'm importing are:


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


You definitley don't need all of these, so I guess you will have to use trial and error. I would suspect that it would be System.Web or System.Web.SessionState, but I'm not entirely sure.
 
Take a look at:

which is the Redirect method of the HttpResponse object. If you look at the top of the window, you'll see a navigation path going horizontally across the screen (starts with MSDN Home, ends with Redirect method). This will tell you what namespace it's in (System.Web).

Chip H.
 
I tried all I keep getting an error

Response.Redirect("Mymainpage.aspx")
 
If you're using C#, be aware that it's a case-sensitive language.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
No .... actually the only time it seems to work is if I add the 2nd parameter =False.... .. when I make it =True .. it does not work

Response.Redirect("Mymainpage.aspx",False)
 
No .. i got a problem with it.... if the user does not logout properly ... I am not able to log back on again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top