Visualizzazione dei risultati da 1 a 2 su 2

Discussione: parametri asp.net

  1. #1
    Utente di HTML.it
    Registrato dal
    Sep 2001
    Messaggi
    589

    parametri asp.net

    ciao conosco asp ma asp .net no come facio a mantenere un lavole di una variabile di sessione anche in un altra pagina sempre aspx , qualche sempio ?

    default.aspx
    ....
    <script runat="server">
    'This variable specifies relative path to the folder, where the gallery with uploaded files is located.
    'Do not forget about the slash in the end of the folder name.
    ' Private galleryP1 As String = "../../../public/Gallery/"
    sub page_load(obj as object, e as eventArgs)
    session("galleryp1") = "../../../public/Gallery/"

    response.write(session("galleryp1"))

    end sub


    </script>

    ........... cè un form che va ad

    upload.aspx

    <%@ Page Language="VB" AutoEventWireup="false" Debug="true" ValidateRequest="false" %>

    <%@ Import Namespace="System.IO" %>
    <%@ Import Namespace="System.Xml" %>



    <script runat="server">
    'This variable specifies relative path to the folder, where the gallery with uploaded files is located.
    'Do not forget about the slash in the end of the folder name.

    Private galleryPath As String = "<%=request.form("galleryp")%>"

    ...........
    qui il valore della variabile galleryPath è vuoto perchè forse sbaglio proprio il ragionamento ?

    grazie

  2. #2
    Utente di HTML.it
    Registrato dal
    Sep 2001
    Messaggi
    589
    in pratica se lo metto cosi sul file upload.aspx

    Private galleryPath As String = "../../../public/Gallery/"


    funziona

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.