Hola compañeros tododnn
El problema es el siguiente estoy creando un modulo para DNN 5.2.2 donde el usuario puede subir un archivo al servidor, pero al momento de guardar el archivo en un directorio dentro de mi proyecto me sale un error de excepcion que me deja totalmente perdido.
El codigo que uso es:
If (fupl_archivo.HasFile) Then
Try
Label1.Text = "NomArcAdj: " + fupl_archivo.FileName + "<br/>" + "Tamaño: " + fupl_archivo.PostedFile.ContentLength + "<br/>"+ "Tipo: " + fupl_archivo.PostedFile.ContentType
fupl_archivo.SaveAs(MapPath("~\ArchivosSubidos\" + fupl_archivo.FileName))
Catch ex As Exception
Label1.Text = "Error al subir el archivo." + ex.ToString
End Try
End If
Y me arroja el siguiente error:
Error al subir el archivo.System.InvalidCastException: Conversion from string "NomArcAdj: tomcat_logo.jpg
T" to type 'Double' is not valid. ---> System.FormatException: Input string was not in a correct format. at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat) at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat) --- End of inner exception stack trace --- at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat) at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value) at YourCompany.Modules.PQRSModulo.EnvioMensajes.btn_enviar_Click(Object sender, EventArgs e)
Gracias por la colaboración, Saludos.