I need help! please
-
I have been trying to read textfile from client side and get the data inside the file add into the table but I have this error all the time:( Anybody who know how to resolve this problem please help me. I am just new in ASP .NET and this is the first webApplication of mine. Thank you million for helps, =============================================================================================== Server Error in '/' Application. -------------------------------------------------------------------------------- Could not find a part of the path 'C:\Documents and Settings\aim\Desktop\DataFile.txt'. 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.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Documents and Settings\aim\Desktop\DataFile.txt'. Source Error: Line 36: Line 37: // fileInfo = Server.MapPath("TextFiles//mydata.txt"); //Testing Line 38: fs = new FileStream(fileInfo, FileMode.Open, FileAccess.Read); Line 39: sr = new StreamReader(fs); Line 40: Source File: d:\webhost\471463016\Table2.aspx Line: 38 ===============================================================================================
junior boy
-
I have been trying to read textfile from client side and get the data inside the file add into the table but I have this error all the time:( Anybody who know how to resolve this problem please help me. I am just new in ASP .NET and this is the first webApplication of mine. Thank you million for helps, =============================================================================================== Server Error in '/' Application. -------------------------------------------------------------------------------- Could not find a part of the path 'C:\Documents and Settings\aim\Desktop\DataFile.txt'. 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.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Documents and Settings\aim\Desktop\DataFile.txt'. Source Error: Line 36: Line 37: // fileInfo = Server.MapPath("TextFiles//mydata.txt"); //Testing Line 38: fs = new FileStream(fileInfo, FileMode.Open, FileAccess.Read); Line 39: sr = new StreamReader(fs); Line 40: Source File: d:\webhost\471463016\Table2.aspx Line: 38 ===============================================================================================
junior boy
-
I have been trying to read textfile from client side and get the data inside the file add into the table but I have this error all the time:( Anybody who know how to resolve this problem please help me. I am just new in ASP .NET and this is the first webApplication of mine. Thank you million for helps, =============================================================================================== Server Error in '/' Application. -------------------------------------------------------------------------------- Could not find a part of the path 'C:\Documents and Settings\aim\Desktop\DataFile.txt'. 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.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Documents and Settings\aim\Desktop\DataFile.txt'. Source Error: Line 36: Line 37: // fileInfo = Server.MapPath("TextFiles//mydata.txt"); //Testing Line 38: fs = new FileStream(fileInfo, FileMode.Open, FileAccess.Read); Line 39: sr = new StreamReader(fs); Line 40: Source File: d:\webhost\471463016\Table2.aspx Line: 38 ===============================================================================================
junior boy
what exactly you want to do... As i belive you are trying to read a file from your virtual dir. Provide correct relative path. because system is trying to pull the file from Desktop. I think there is no such file on the desktop.
Ravi Kant Srivastava (System Analyst) HandsOn Technology & Engineering Gurgaon (India) e-mail:ravikant@hte.co.in
-
what exactly you want to do... As i belive you are trying to read a file from your virtual dir. Provide correct relative path. because system is trying to pull the file from Desktop. I think there is no such file on the desktop.
Ravi Kant Srivastava (System Analyst) HandsOn Technology & Engineering Gurgaon (India) e-mail:ravikant@hte.co.in
Now I know I need to upload the text file [data file] to the server. Anybody know what article explain how to upload text file? Thank you very much again.
junior boy