T_im Posted November 20, 2005 Posted November 20, 2005 When I try reading a one line file code I get an error with this code: Dim sr As New System.IO.StreamReader(File1.PostedFile.InputStream) Dim rtf As String rtf = sr.ReadLine() rtf = rtf & sr.ReadToEnd sr.Close() How can I avoid this? For some reason I would also get the error with this too: Dim sr As New System.IO.StreamReader(File1.PostedFile.InputStream) Dim rtf As String rtf = sr.sr.ReadToEnd sr.Close() Quote
T_im Posted November 20, 2005 Author Posted November 20, 2005 woops i mean Dim sr As New System.IO.StreamReader(File1.PostedFile.InputStream) Dim rtf As String rtf = sr.ReadToEnd sr.Close() Quote
Administrators PlausiblyDamp Posted November 20, 2005 Administrators Posted November 20, 2005 Any chance you could tell us the error you are getting? Also does File1.PostedFile.InputStream point to a valid stream? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
T_im Posted November 21, 2005 Author Posted November 21, 2005 Any chance you could tell us the error you are getting? Also does File1.PostedFile.InputStream point to a valid stream? mmm, it seems to have sorted itself out now - can't remember doing anything to fix it lol Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.