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. 11 9895
"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.
"diablo" <di****@noplace.com> wrote in message
news:Wg***************@newsfe4-gui.ntli.net... Response.Redirect = "<%strUrlName>"
Shouldn't it be something like:
<%=strUrlName%>
?
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
> 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?
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.
"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:11*************@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!
"Griff" <Ho*****@The.Moon> wrote in message
news:#w**************@TK2MSFTNGP14.phx.gbl... "Dave Anderson" <GT**********@spammotel.com> wrote in message news:11*************@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/
On Mon, 11 Jul 2005 12:16:08 -0500, "McKirahan" <Ne**@McKirahan.com> wrote: "Griff" <Ho*****@The.Moon> wrote in message news:#w**************@TK2MSFTNGP14.phx.gbl... "Dave Anderson" <GT**********@spammotel.com> wrote in message news:11*************@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 .
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
by: tshad |
last post by:
I have a function:
function SalaryDisplay(me)
{
var salaryMinLabel = document.getElementById("SalaryMin");
salaryMinLabel.value = 200;
alert("after setting salaryMinLabel = " +...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
|
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 ...
| |