Visualizzazione dei risultati da 1 a 6 su 6

Discussione: semplice redirect

  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2002
    Messaggi
    687

    semplice redirect

    non ci capisco nulla di .net e non mi riesce manco una cazzata come un redirect....mah

    semplicemente ho una pagina di un sito che non è + utilizzata ma è indicizzata per cui non voglio cancellarla....

    mi basta un redirect normale ad un'altra area del sito

    ho fatto
    <%@ Page Language="vbscript" Debug="true" AutoEventWireup="True"%>
    <script Runat="Server">

    response.Redirect("http://www.xxx.it")

    </script>

    ma mi dà errore:
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: BC30188: Declaration expected.

    Source Error:



    Line 2: <script Runat="Server">
    Line 3:
    Line 4: response.Redirect("http://www.sitox.it")
    Line 5:
    Line 6: </script>






    boh...e scusate l'ignoranza

  2. #2
    Utente di HTML.it L'avatar di Franz78
    Registrato dal
    Sep 2004
    Messaggi
    730
    Prova cosi:

    void Page_Load(object sender, EventArgs e)
    {
    Response.Redirect("http://www.xxx.it");
    }


    ciao!

  3. #3
    Utente di HTML.it
    Registrato dal
    Jan 2002
    Messaggi
    687
    boh....da lo stesso errore:

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: BC30188: Declaration expected.

    Source Error:



    Line 1: <%@ Page Language="vbscript" Debug="true" AutoEventWireup="True"%>
    Line 2: <script Runat="Server">
    Line 3: void Page_Load(object sender, EventArgs e)
    Line 4: {
    Line 5: response.Redirect("http://www.libero.it");


    error Line: 3

  4. #4
    Utente di HTML.it L'avatar di Franz78
    Registrato dal
    Sep 2004
    Messaggi
    730
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ Page Language="C#" %>
    <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">

    <head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
    <title>Untitled 1</title>

    <script type="text/c#" language="C#" runat="server">
    void Page_Load(object sender, EventArgs e)
    {
    Response.Redirect("/default.aspx");
    }
    </script>


    </head>

    <body>

    <form id="form1" runat="server">
    </form>

    </body>

    </html>

  5. #5
    in VB.NET è

    <%@ Page Language="VB" %>
    <script Runat="Server">
    sub Page_Load
    response.Redirect("http://www.libero.it")
    end sub
    </script>
    "...non è detto che sia tardi se non guardi che ora è..."

  6. #6
    Utente di HTML.it
    Registrato dal
    Jan 2002
    Messaggi
    687
    Originariamente inviato da Raffa62
    in VB.NET è

    <%@ Page Language="VB" %>
    <script Runat="Server">
    sub Page_Load
    response.Redirect("http://www.libero.it")
    end sub
    </script>
    accendiamo un cero....funzona...

    grazie mille

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.