Visualizzazione dei risultati da 1 a 3 su 3

Discussione: Domandina sui cookies

  1. #1

    Domandina sui cookies

    ciao,

    io devo fare un controllo e se faccio cosi:
    if Request.Cookies("nome_cookie")("campo")="ok" then

    ricevo errore per ora ho risolto facendo cosi:
    if Request.Cookies("nome_cookie") Is Nothing then

    però mi piaerebbe capire come confrontare un singolo campo del cookie invece di vederne l'esistenza.


    grazie

  2. #2
    Utente di HTML.it L'avatar di pietro09
    Registrato dal
    Jan 2002
    Messaggi
    10,116
    codice:
    If Not Request.Cookies("nome_cookie") Is Nothing AndAlso Request.Cookies("nome_cookie")("campo") = "ok" Then

  3. #3
    se metto
    If Request.Cookies("nosilence")("Votato") = "" Then

    ricevo questo errore:

    Object reference not set to an instance of an object.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

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.