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

Discussion in 'ASP .Net' started by Simon Prince, Jul 14, 2004.

  1. Simon Prince

    Simon Prince Guest

    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
    Simon Prince, Jul 14, 2004
    #1
    1. Advertising

  2. Simon Prince

    Bobby Ryzhy Guest

    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




    On Wed, 14 Jul 2004 17:00:11 +0100, "Simon Prince" <> wrote:

    >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
    Bobby Ryzhy, Jul 14, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RayAll

    Reponse.Redirect ()

    RayAll, Apr 18, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    2,940
    Gabriel Lozano-MorĂ¡n
    Apr 18, 2005
  2. =?Utf-8?B?SklNLkgu?=

    Q: Reponse.Redirect

    =?Utf-8?B?SklNLkgu?=, Jun 23, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    618
    Kevin Spencer
    Jun 23, 2005
  3. Samuel Shulman

    Reponse.Redirect Using the POST Method

    Samuel Shulman, Nov 28, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    529
    Cowboy \(Gregory A. Beamer\)
    Nov 28, 2006
  4. Replies:
    1
    Views:
    281
    Cowboy \(Gregory A. Beamer\)
    Sep 2, 2008
  5. Luis Esteban Valencia
    Replies:
    1
    Views:
    129
    Eliyahu Goldin
    Nov 25, 2004
Loading...

Share This Page