以上是错误信息,为什么要把strFn "register.txt"转成integer?
这样写就是想弹出一个string的信息啊
MsgBox(Me, strfn)
[InvalidCastException: Cast from string "register.txt" to type 'Integer' is not valid.]
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 102: strfExt = UCase(Right(strfn, Len(strfn) - InStr(strfn, ".")))
Line 103: strActualFileName = strfn
Line 104: MsgBox(Me, strfn)
Line 105: Try
Line 106: inpFile.PostedFile.SaveAs(viewState("SaveLocation"))
[FormatException: Input string was not in a correct format.]
Microsoft.VisualBasic.CompilerServices.DoubleType.Parse(String Value, NumberFormatInfo NumberFormat)
Microsoft.VisualBasic.CompilerServices.DoubleType.Parse(String Value)
Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value)
[InvalidCastException: Cast from string "register.txt" to type 'Integer' is not valid.]
Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value)
vmind.section5.btnUpload_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\vmind\section5.aspx.vb:104
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()