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.Redirect'
/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.

Re: Object doesn't support this property or method: 'Response.Redirect by McKirahan

McKirahan
Thu Jul 07 22:48:47 CDT 2005

"Peter D" <PeterD@discussions.microsoft.com> wrote in message
news:89281ED1-4392-4678-B704-4A2429AE5564@microsoft.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.Redirect'
> /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.Redirect "?

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



Re: Object doesn't support this property or method: 'Response.Redi by PeterD

PeterD
Thu Jul 07 23:07:08 CDT 2005

Here it is:

<%
dim strUrlName, strUrlValue
strUrlValue = Request.Form("pickUrl")
strUrlName = Left(strUrlValue,8)
if strUrlName = "" then
Response.Redirect = "index.asp"
else
Response.Redirect = "<%strUrlName>"
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" <PeterD@discussions.microsoft.com> wrote in message
> news:89281ED1-4392-4678-B704-4A2429AE5564@microsoft.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.Redirect'
> > /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.Redirect "?
>
> If it's a variable then what is it's value?
>
>
>

Re: Object doesn't support this property or method: 'Response.Redi by diablo

diablo
Fri Jul 08 01:44:06 CDT 2005


> <%
> dim strUrlName, strUrlValue
> strUrlValue = Request.Form("pickUrl")
> strUrlName = Left(strUrlValue,8)
> if strUrlName = "" then
> Response.Redirect = "index.asp"
> else
> Response.Redirect = "<%strUrlName>"
> end if %>
>

From the above code

> Response.Redirect = "index.asp"
> Response.Redirect = "<%strUrlName>"


are incorrect. it should be

Response.Redirect "index.asp"
Response.Redirect strUrlName


Response.Redirect is a function/method call not a variable assignment.






Re: Object doesn't support this property or method: 'Response.Redi by Griff

Griff
Fri Jul 08 06:59:46 CDT 2005


"diablo" <diablo@noplace.com> wrote in message
news:Wgpze.2434$Rn1.64@newsfe4-gui.ntli.net...
>> Response.Redirect = "<%strUrlName>"


Shouldn't it be something like:

<%=strUrlName%>

?



Re: Object doesn't support this property or method: 'Response.Redi by Griff

Griff
Fri Jul 08 07:13:56 CDT 2005

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



Re: Object doesn't support this property or method: 'Response.Redi by Aaron

Aaron
Fri Jul 08 08:20:51 CDT 2005

> Shouldn't it be something like:
>
> <%=strUrlName%>

No, did you try that?

<%
Response.Redirect "<%=strUrlName%>"
%>

Yields

Microsoft VBScript compilation error '800a0409'
Unterminated string constant

You're already inside an ASP block, why would you want to start another?



Re: Object doesn't support this property or method: 'Response.Redi by Dave

Dave
Sat Jul 09 02:22:00 CDT 2005

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-us/iissdk/html/01d1962f-0d45-4a5b-a46c-1b7f38f37ab3.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.



Re: Object doesn't support this property or method: 'Response.Redi by Griff

Griff
Mon Jul 11 12:03:11 CDT 2005

"Dave Anderson" <GTSPXOESSGOQ@spammotel.com> wrote in message
news:11cuuolibkhoae2@corp.supernews.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!



Re: Object doesn't support this property or method: 'Response.Redi by McKirahan

McKirahan
Mon Jul 11 12:13:47 CDT 2005

"Griff" <Howling@The.Moon> wrote in message
news:#wpaCqjhFHA.1464@TK2MSFTNGP14.phx.gbl...
> "Dave Anderson" <GTSPXOESSGOQ@spammotel.com> wrote in message
> news:11cuuolibkhoae2@corp.supernews.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/



Re: Object doesn't support this property or method: 'Response.Redi by Turkbear

Turkbear
Mon Jul 11 12:34:58 CDT 2005

On Mon, 11 Jul 2005 12:16:08 -0500, "McKirahan" <News@McKirahan.com> wrote:

>"Griff" <Howling@The.Moon> wrote in message
>news:#wpaCqjhFHA.1464@TK2MSFTNGP14.phx.gbl...
>> "Dave Anderson" <GTSPXOESSGOQ@spammotel.com> wrote in message
>> news:11cuuolibkhoae2@corp.supernews.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/
>

Sorry, ASP is not a scripting language( in spite of what that page says - that site seems to confuse things between
scripts and the program that can execute them) , see:
http://www.w3schools.com/asp/asp_intro.asp)
, it is a program that runs under IIS.
Scripts within ASP pages can use JavaScript or VBScript .




Re: Object doesn't support this property or method: 'Response.Redi by Dave

Dave
Mon Jul 11 13:38:45 CDT 2005

Griff wrote:
>> 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?

302 responses are not expensive. They are very compact, in fact.



--
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.