B
blackg
Input string not in correct format
--------------------------------------------------------------------------------
I am trying to view a picture from a table. I am getting this error
Input string not in the correct format.
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:
Line 45: cmdGetFile.Parameters("@AttachmentID").Value =
Request("AttachmentID").ToString
Line 46: dbconn.Open()
Line 47: dr = cmdGetFile.ExecuteReader
Line 48: If dr.Read Then
Line 49: Response.ContentType = dr("ContentType").ToString
Source File: d:\inetpub\wwwroot\viewpictures\ViewAttachment.aspx.vb
Line: 47
Stack Trace:
[FormatException: Input string was not in a correct format.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
System.Data.SqlClient.SqlCommand.ExecuteReader()
Computers_Net.ViewAttachment.Page_Load(Object sender, EventArgs e)
in d:\inetpub\wwwroot\viewpicturest\ViewAttachment.aspx.vb:47
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
Any help will be appreciated
Thanks in advance
--------------------------------------------------------------------------------
I am trying to view a picture from a table. I am getting this error
Input string not in the correct format.
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:
Line 45: cmdGetFile.Parameters("@AttachmentID").Value =
Request("AttachmentID").ToString
Line 46: dbconn.Open()
Line 47: dr = cmdGetFile.ExecuteReader
Line 48: If dr.Read Then
Line 49: Response.ContentType = dr("ContentType").ToString
Source File: d:\inetpub\wwwroot\viewpictures\ViewAttachment.aspx.vb
Line: 47
Stack Trace:
[FormatException: Input string was not in a correct format.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
System.Data.SqlClient.SqlCommand.ExecuteReader()
Computers_Net.ViewAttachment.Page_Load(Object sender, EventArgs e)
in d:\inetpub\wwwroot\viewpicturest\ViewAttachment.aspx.vb:47
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
Any help will be appreciated
Thanks in advance