Object不支持此属性或方法:'Response.Redirect [英] Object doesn't support this property or method: 'Response.Redirect

查看:97
本文介绍了Object不支持此属性或方法:'Response.Redirect的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将此方法添加到我的.asp页面,以便根据某些选择条件动态选择

页面。这是我的.asp书和

在线参考。然而,当我使用此对象时,以下错误在浏览器中返回



错误类型:

Microsoft VBScript运行时( 0x800A01B6)

对象不支持此属性或方法:''Response.Redirect''

/testwebs/choose.asp,line 22


我的IIS库中缺少什么才能使用此方法

支持?


感谢您的任何信息


/ peter d。

解决方案

" Peter D" < Pe的**** @ discussions.microsoft.com>在留言中写道

news:89 ********************************** @ microsof t.com ...

我想将此方法添加到我的.asp页面,以便根据一些选择标准动态选择
a页面。这是我的.asp书和
在线参考。然而,当我使用此对象时,以下错误
在浏览器中返回:

错误类型:
Microsoft VBScript运行时(0x800A01B6)
对象不支持这个属性或方法:''Response.Redirect''
/testwebs/choose.asp,第22行

我的IIS库中缺少什么才能使用此方法
支持?

感谢您提供任何信息

/ peter d。




后面的内容Response.Redirect ?


如果它是变量那么它的价值是什么?


这里是:


<%

dim strUrlName,strUrlValue

strUrlValue = Request.Form(" pickUrl")

strUrlName = Left(strUrlValue,8)

if strUrlName =""然后

Response.Redirect =" index.asp"

else

Response.Redirect ="<%strUrlName>"

结束如果%>


PickUrl是上一页(index.asp)中的一个表格,是一个选择列表。

根据该选择,我想要url到所选页面。

strUrlName中的值是''page.asp''名称,它在帖子数据中显示得很好。

两者都不起作用,因为某些原因服务器认为那个方法

响应对象无效?


问候,彼得D.


---- --------------

" McKirahan"写道:

" Peter D" < Pe的**** @ discussions.microsoft.com>在消息中写道
新闻:89 ********************************** @ microsof t.com。 ..

我想将这个方法添加到我的.asp页面,以便根据一些选择标准动态选择


一个

页面。这是我的.asp书和
在线参考。然而,当我使用此对象时,以下错误


在浏览器中返回



错误类型:
Microsoft VBScript运行时( 0x800A01B6)
对象不支持这个属性或方法:''Response.Redirect''
/testwebs/choose.asp,第22行

我的遗漏是什么要使用的IIS库是否支持此方法?

感谢您提供的任何信息

/ peter d。


接下来的内容Response.Redirect?

如果它是变量那么它的价值是什么?



<%
dim strUrlName,strUrlValue
strUrlValue = Request.Form(" pickUrl")
strUrlName = Left(strUrlValue ,8)
如果strUrlName =""然后
Response.Redirect =" index.asp"

Response.Redirect ="<%strUrlName>"
结束如果%>


来自上面的代码

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


不正确。它应该是


Response.Redirect" index.asp"

Response.Redirect strUrlName

Response.Redirect是一个函数/方法调用不是变量赋值。


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.

解决方案

"Peter D" <Pe****@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.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?


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" <Pe****@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.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?



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


这篇关于Object不支持此属性或方法:'Response.Redirect的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆