Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it L'avatar di Aki
    Registrato dal
    Dec 2002
    Messaggi
    2,206

    [VB.NET]Viewstate invalido?!?

    sto scrivendo questo codice:
    codice:
    ' RECUPERO DATO ULTIMO RECORD TABELLA ### STUDI ###
                    Dim SQL5 = "SELECT ISNULL(MAX(ID_STUD), 1) FROM STUDI"
                   Dim cmd5 as New SqlCommand(sql5, conn)
                    Dim dr5 as  SqlDataReader = cmd5.ExecuteReader()
    					While dr5.read()
    						Dim stu as integer = dr5.Item(0)
    						Dim id_stu as integer = stu + 1
    						Session("studi") = id_stu
    					end while
                   dr5.close()
        ' INSERIMENTO DATI NELLA TABELLA ### STUDI ###
                    Dim sql6 as string = "INSERT INTO STUDI (ID_STUD, LIC, VOTAZIONE, QUAL)"
                    sql6 &= " VALUES (@id, @lic, @vot, @qua)"
                    Dim cmd6 as new sqlcommand(sql6, conn)
                    cmd6.Parameters.add("@id", sqldbtype.int).value = Session("studi")		
                    cmd6.Parameters.add("@lic", SqlDbType.varchar).value = rl.selecteditem.value 
    				cmd6.Parameters.add("@vot", SqlDbType.varchar).value = vote.text 
    				cmd6.Parameters.add("@qua", SqlDbType.varchar).value = cbProfe.Checked
    ma mi dà sto errore:
    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    The viewstate is invalid for this page and might be corrupted.
    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.Web.HttpException: The viewstate is invalid for this page and might be corrupted.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [HttpException (0x80004005): The viewstate is invalid for this page and might be corrupted.]
    System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +140
    System.Web.UI.Page.LoadPageViewState() +17
    System.Web.UI.Page.ProcessRequestMain() +423




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
    che vuol dire?
    AIUTO!!!!!! VVoVe:

  2. #2
    Utente di HTML.it L'avatar di Aki
    Registrato dal
    Dec 2002
    Messaggi
    2,206
    risolto
    era xchè richiamavo tutto col server di webmatrix
    con IIS va tutto


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 © 2026 vBulletin Solutions, Inc. All rights reserved.