473,810 Members | 3,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Object doesn't support this property or method: 'Response.Redir ect

I wanted to add this method to my .asp page in order to dynamically choose a
page based upon some selection criteria. It's in my .asp book and in the
online reference. Yet when I use this object, the following error returns
in the browser:

Error Type:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'Response.Redir ect'
/testwebs/choose.asp, line 22

What is missing from my IIS libraries in order to use have this method
supported?

Thanks for any info

/peter d.
Jul 22 '05 #1
11 9954
"Peter D" <Pe****@discuss ions.microsoft. com> wrote in message
news:89******** *************** ***********@mic rosoft.com...
I wanted to add this method to my .asp page in order to dynamically choose a page based upon some selection criteria. It's in my .asp book and in the
online reference. Yet when I use this object, the following error returns in the browser:

Error Type:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'Response.Redir ect'
/testwebs/choose.asp, line 22

What is missing from my IIS libraries in order to use have this method
supported?

Thanks for any info

/peter d.


What follows "Response.Redir ect "?

If it's a variable then what is it's value?
Jul 22 '05 #2
Here it is:

<%
dim strUrlName, strUrlValue
strUrlValue = Request.Form("p ickUrl")
strUrlName = Left(strUrlValu e,8)
if strUrlName = "" then
Response.Redire ct = "index.asp"
else
Response.Redire ct = "<%strUrlNa me>"
end if %>

PickUrl is a form in a previous page (index.asp) that is a select-list.
Based upon that selection, I want to url to the selected page. The value in
strUrlName is the 'page.asp' name, which shows in the post data just fine.
Neither works because for some reason the server thinks the method of that
reponse object is not valid ?

regards, Peter D.

------------------
"McKirahan" wrote:
"Peter D" <Pe****@discuss ions.microsoft. com> wrote in message
news:89******** *************** ***********@mic rosoft.com...
I wanted to add this method to my .asp page in order to dynamically choose

a
page based upon some selection criteria. It's in my .asp book and in the
online reference. Yet when I use this object, the following error

returns
in the browser:

Error Type:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'Response.Redir ect'
/testwebs/choose.asp, line 22

What is missing from my IIS libraries in order to use have this method
supported?

Thanks for any info

/peter d.


What follows "Response.Redir ect "?

If it's a variable then what is it's value?

Jul 22 '05 #3
<%
dim strUrlName, strUrlValue
strUrlValue = Request.Form("p ickUrl")
strUrlName = Left(strUrlValu e,8)
if strUrlName = "" then
Response.Redire ct = "index.asp"
else
Response.Redire ct = "<%strUrlNa me>"
end if %>

From the above code
Response.Redire ct = "index.asp"
Response.Redire ct = "<%strUrlNa me>"

are incorrect. it should be

Response.Redire ct "index.asp"
Response.Redire ct strUrlName
Response.Redire ct is a function/method call not a variable assignment.

Jul 22 '05 #4

"diablo" <di****@noplace .com> wrote in message
news:Wg******** *******@newsfe4-gui.ntli.net...
Response.Redire ct = "<%strUrlNa me>"

Shouldn't it be something like:

<%=strUrlName %>

?
Jul 22 '05 #5
Actually, having just re-read it...

There are two methods for redirecting (one may be IIS specific, I don't
know).

One (if you can get it to work is better in my opinion) is to do a server
redirect. Here, the server redirects from one page to another without
having to go back to the client's browser with a lengthly round trip.

The second is the response redirect which goes back to the client's browser
and effectively says "you really don't want that page, you want this one..."
I've not tried this, but my guess is that the response redirect will
required a fully formed URL (http://www.yourdomain.org/page.asp)

hth

Griff
Jul 22 '05 #6
> Shouldn't it be something like:

<%=strUrlName %>


No, did you try that?

<%
Response.Redire ct "<%=strUrlName% >"
%>

Yields

Microsoft VBScript compilation error '800a0409'
Unterminated string constant

You're already inside an ASP block, why would you want to start another?
Jul 22 '05 #7
Griff wrote:
There are two methods for redirecting (one may be IIS specific, I
don't know).

One (if you can get it to work is better in my opinion) is to do a
server redirect. Here, the server redirects from one page to another
without having to go back to the client's browser with a lengthly
round trip.
1. You mean SCRIPT, not PAGE.
2. 302 responses are not lengthy.
3. A transfer is not a redirection.

The second is the response redirect which goes back to the client's
browser and effectively says "you really don't want that page, you
want this one..." I've not tried this, but my guess is that the
response redirect will required a fully formed URL


Then perhaps you should have tried, or at least read up on it before
posting.

"This can be an full URL beginning with "http://", a virtual path
to a location on the same IIS server, or the name of a file
contained in the same location as the original URL."

http://msdn.microsoft.com/library/en...7f38f37ab3.asp

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #8
"Dave Anderson" <GT**********@s pammotel.com> wrote in message
news:11******** *****@corp.supe rnews.com...
One (if you can get it to work is better in my opinion) is to do a
server redirect. Here, the server redirects from one page to another
without having to go back to the client's browser with a lengthly
round trip. 1. You mean SCRIPT, not PAGE.


Do I? ASP stands for Active Server Page. This is a PAGE that contains
SCRIPT. I can see one being transferred to a PAGE that contains SCRIPT, but
how can one be transferred to a SCRIPT that exists within a page? Even if I
am wrong, I believe PAGE was not a misunderstood term.
2. 302 responses are not lengthy.
It requires one extra round-trip which may well be perceived as slower by
the client if they are on a slow modem. Surely it's good practive to avoid
expensive network round-trips if at all possible?

3. A transfer is not a redirection.
Technically not, but often provides the same functionality if coded
properly.
The second is the response redirect which goes back to the client's
browser and effectively says "you really don't want that page, you
want this one..." I've not tried this, but my guess is that the
response redirect will required a fully formed URL


Then perhaps you should have tried, or at least read up on it before
posting.


Ah, but whilst I didn't have the time to test it or read up on it before
posting it I knew that the incomplete answer I had should help point the
original poster in the correct direction to solving their problem.
Dave Anderson Unsolicited commercial email will be read at a cost of $500 per message.
Use of this email address implies consent to these terms. Please do not
contact me directly or ask me to contact you directly for assistance. If
your question is worth asking, it's worth posting.


Now that paragraph really was worth reading!
Jul 22 '05 #9
"Griff" <Ho*****@The.Mo on> wrote in message
news:#w******** ******@TK2MSFTN GP14.phx.gbl...
"Dave Anderson" <GT**********@s pammotel.com> wrote in message
news:11******** *****@corp.supe rnews.com...
One (if you can get it to work is better in my opinion) is to do a
server redirect. Here, the server redirects from one page to another
without having to go back to the client's browser with a lengthly
round trip.

1. You mean SCRIPT, not PAGE.


Do I? ASP stands for Active Server Page. This is a PAGE that contains


[snip]

It's plural:

ASP stands for Active Server Pages. ASP is a server-side scripting language
that allows you to add interactivity to your Web sites.

-- http://webdesign.about.com/od/asp/
Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1483
by: Lichunlin | last post by:
Dear all, Sorry for cross posting. I have one page, create an object and save it in session scope, and then redirect to another page.In the new page, the object existed in session object, but can not access its property. The code of page one is : <% Class SiteInfo dim SiteID, SiteName end class
14
1822
by: Dubh | last post by:
I'm a beginner with .NET so this is probably a very simple problem that will be immediately obvious to someone hopefully. I'm using J#.NET The following contains the code caused the error Line 385: String link = "http://10.4.190.120/config/lconfig.aspx" ; Line 386: GtLink.Redirect(link); Line 387: //NLine.set_Text(Selection); STACK TRACE
3
11478
by: news.onetel.net.uk | last post by:
I and my friend Karl have spent literally all day trying to find out what is causing my error but we are zapped of any further functionality :) I have a form that adds news records. You select 'City' then you select 'Business Category' - now when you select 'Business Category' the next drop-down menu (business sub category) should populate with 'Business Sub-categories' related to the 'Business Category' but once 'Business Category' is...
54
4625
by: tshad | last post by:
I have a function: function SalaryDisplay(me) { var salaryMinLabel = document.getElementById("SalaryMin"); salaryMinLabel.value = 200; alert("after setting salaryMinLabel = " + salaryMinLabel.value); } I also have an asp.net object:
12
8708
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press update after making changes, but I don't want that update button. How can I get the updated object when the user presses one of my other action buttons?
7
29799
by: stellstarin | last post by:
hi all, I have a HTML page with two forms. While trying to add a hidden element in a first form by the default javascript function, the error message 'object does not support this property or method 2146827850' Does any one know why this problem occurs?
13
2002
by: TS | last post by:
Say i have a class car with properties: Color, Make, Model, Year, DriverID And a Driver class with properties: DriverID, Name The driverID PRIVATE property is the id of the driver from say a driver table (t_driver). This has a PUBLIC property accessor called Driver My understanding of OO using the composition model is that when you want to load up a car class, you would access the DB to get Color, make, Model, Year, DriverID and load...
5
550
by: John Olbert | last post by:
Subject: Error is Object doesn't support this property or method I am trying to pass a C# string under Vs2005 (Net2) to an Vb6 ActiveX Control. I get the following runtime error-- "Object doesn't support this property or method" Yet the Intellisense shows the following-- axMainViewJ1Obj1.AddFileJ1(ref string str);
8
4199
by: Kevin Blount | last post by:
I'm tyring to access an object created by using a method from a third party API. The documentation tells me what object should be return, and the properties of that object, but when I try and access one of those properties I've shown an error message saying that the Object doesn't support this property or method. Here's the code I'm using (edited to protect the third party NDA) 1: <% 2: dim siteApi, userApi
0
9722
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10644
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10393
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10124
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4334
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.