How to use Reponse.Redirect in ASP.NET Iin-line Code ?

S

Simon Prince

Hi

I have an classic ASP page that contains nothing else but the following
code...

<%@ Language=VBScript %>
<%
Response.clear
Response.redirect("/Intranet")
%>

I'm was trying to write an equivalent page in ASP.NET but am getting nowhere
fast !!!

My entire page is below (No Code Behind)...

<%@ Page Language="vb" AutoEventWireup="false" enableviewstate="False"%>
<script runat=server>
Public Sub Page_Load()
Response.Clear()
Response.Redirect("/Intranet")
End Sub
</script>


Presently this does return an error, but all I get is a blank page with the
HTML, BODY etc structure defined.

HELP PLEASE !!!!

Simon
 
B

Bobby Ryzhy

You can use a meta refresh instaed of code or put that same code in the code behind.

Response.Redirect("/Intranet");
Response.End();

Bobby Ryzhy
bobby@ domain below
http://weekendtech.net




Hi

I have an classic ASP page that contains nothing else but the following
code...

<%@ Language=VBScript %>
<%
Response.clear
Response.redirect("/Intranet")
%>

I'm was trying to write an equivalent page in ASP.NET but am getting nowhere
fast !!!

My entire page is below (No Code Behind)...

<%@ Page Language="vb" AutoEventWireup="false" enableviewstate="False"%>
<script runat=server>
Public Sub Page_Load()
Response.Clear()
Response.Redirect("/Intranet")
End Sub
</script>


Presently this does return an error, but all I get is a blank page with the
HTML, BODY etc structure defined.

HELP PLEASE !!!!

Simon

Bobby Ryzhy
bobby @ domain below
http://weekendtech.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top