Visualizzazione dei risultati da 1 a 3 su 3

Discussione: messaggio di errore

  1. #1

    messaggio di errore

    codice:
     ver Error in '/' Application.
    Specified cast is not valid.
    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.InvalidCastException: Specified cast is not valid.
    
    Source Error:
    
    Line 147:    
    Line 148:        {
    Line 149:           if ((int)riga["n_pos"]==1)
    Line 150:    
    Line 151:             riga["cart"]="  [img]image/icone/new.gif[/img]  ";
    
    
    Source File: D:\Inetpub\webs\xenteamit\forum\diskuteo.aspx    Line: 149
    
    Stack Trace:
    
    [InvalidCastException: Specified cast is not valid.]
       ASP.diskuteo_aspx.makeforum() in D:\Inetpub\webs\xenteamit\forum\diskuteo.aspx:149
       ASP.diskuteo_aspx.Page_Load(Object sender, EventArgs e) in D:\Inetpub\webs\xenteamit\forum\diskuteo.aspx:71
       System.Web.UI.Control.OnLoad(EventArgs e) +67
       System.Web.UI.Control.LoadRecursive() +35
       System.Web.UI.Page.ProcessRequestMain() +750
    Mi viene mostrato questo messaggio di errore. Mi date una mano? [scusate, è ASP.net. mi spostate nella sezione giusta?]

  2. #2
    Utente di HTML.it L'avatar di geko
    Registrato dal
    Dec 2004
    Messaggi
    104
    Evidentemente non puoi effettuare il cast di riga["n_pos"] in int.. prova con Convert.ToInt32(riga["n_pos"])

  3. #3

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.