Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    Input string was not in a correct format...

    Salve a tutti,
    è il mio primo messaggio su questo forum. Sono assolutamente profano dell'argomento che trattate e mi scuso se il mio quesito risultasse "fuori luogo".
    In sostanza, sto cercando di caricare delle immagini in un sito di fotografia al quale sono iscritto. Fatto l'upload del file si devono compilare dei campi per la descrizione dell'immagine. Sin qui non ho problemi. Alla fine si deve cliccare un tasto "submit" per caricare definitivamente il tutto. Ma nel mio caso appare soltanto un messaggio di errore che vorrei farvi vedere, nella speranza che qualcuno lo sappia interpretare:

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    Input string was not in a correct format.
    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.FormatException: Input string was not in a correct format.

    Source Error:

    The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

    1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

    <%@ Page Language="C#" Debug="true" %>

    or:

    2) Add the following section to the configuration file of your application:

    <configuration>
    <system.web>
    <compilation debug="true"/>
    </system.web>
    </configuration>

    Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

    Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

    Stack Trace:


    [FormatException: Input string was not in a correct format.]
    System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2751827
    System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +102
    FileEdit.populateImage(Image image) +600
    FileEdit.btnSubmit_Click(Object sender, EventArgs e) +466
    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
    System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +107
    System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
    System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42



    Il gestore del sito praticamente non sa cosa dirmi, anzi velatamente mi ha fatto capire che il problema può essere solo mio...

    In ogni caso vi ringrazio
    ciao
    cristiano

  2. #2
    Moderatore di Programmazione L'avatar di alka
    Registrato dal
    Oct 2001
    residenza
    Reggio Emilia
    Messaggi
    24,480
    Sembra che apparentemente fallisca una conversione in numero intero di uno dei dati da te inseriti che, probabilmente, non può essere convertito correttamente.

    E' ovvio che per sapere qual è, deve essere necessariamente chi ti ha fatto il sito a dirtelo, dopo che tu gli avrai fornito l'insieme dei dati introdotti nella pagina con la dovuta precisione.

    Ciao!
    MARCO BREVEGLIERI
    Software and Web Developer, Teacher and Consultant

    Home | Blog | Delphi Podcast | Twitch | Altro...

  3. #3
    Grazie mille
    andando per tentativi, ho scoperto che in una casella si potevano inserire solo numeri, e non anche lettere come facevo io... Sembra che il problema sia tutto qui.
    Grazie ancora, il tuo suggerimento mi ha portato sulla strada giusta.
    ciao
    cristiano

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.