ASP Redirect

ASP Redirect

am 23.08.2007 00:24:34 von stroenni

Hi
I´m trying to redirect using asp and found these exemple on
Internet


Using
ASP Redirect

<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently";
Response.AddHeader("Location","http://mygoodstart.com/");
%>

I got this error:


Microsoft VBScript compilation error '800a0401'

Expected end of statement

/index.asp, line 3
Response.Status="301 Moved Permanently";
---------------------------------------^



Using

ASP .NET Redirect




I got this error


Active Server Pages error 'ASP 0124'

Missing Language attribute

/index.asp, line 1

The required Language attribute of the Script tag is missing.


Can somebody please help me to get one of them to work


Regards

Harald

Re: ASP Redirect

am 23.08.2007 13:11:56 von Anthony Jones

"Harald Rønning" wrote in message
news:op.txhe68u8w8vl1z@sten...
>
> Hi
> I´m trying to redirect using asp and found these exemple on
> Internet
>
>
> Using
> ASP Redirect
>
> <%@ Language=VBScript %>
> <%
> Response.Status="301 Moved Permanently";
> Response.AddHeader("Location","http://mygoodstart.com/");
> %>
>

Response.AddHeader "Location", "http://mygoodstart.com/"

Don't put ; on the end of VBScript lines and don't use parentheses on method
calls that are not returning a value.


--
Anthony Jones - MVP ASP/ASP.NET