Click here to Skip to main content
15,888,521 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Problem with file path Pin
Christian Graus11-Nov-09 15:59
protectorChristian Graus11-Nov-09 15:59 
GeneralRe: Problem with file path Pin
Maxdd 711-Nov-09 16:02
Maxdd 711-Nov-09 16:02 
GeneralRe: Problem with file path Pin
Christian Graus11-Nov-09 16:08
protectorChristian Graus11-Nov-09 16:08 
GeneralRe: Problem with file path Pin
Maxdd 711-Nov-09 16:16
Maxdd 711-Nov-09 16:16 
GeneralRe: Problem with file path Pin
Christian Graus11-Nov-09 16:20
protectorChristian Graus11-Nov-09 16:20 
GeneralRe: Problem with file path Pin
Maxdd 711-Nov-09 17:11
Maxdd 711-Nov-09 17:11 
GeneralRe: Problem with file path Pin
Christian Graus11-Nov-09 20:08
protectorChristian Graus11-Nov-09 20:08 
GeneralRe: Problem with file path [modified] Pin
Maxdd 712-Nov-09 6:57
Maxdd 712-Nov-09 6:57 
You are right.

I found this.

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.postedfile.aspx[^]

I've adapted to my program, but having the problem I tought. If I use streams to read the file, I will not have text data.

So I'm trying convert that stream data using:

StreamReader reader = new StreamReader( myStream );
string text = reader.ReadToEnd();


and

byte[] bytes = new byte[myStream.Length];
        string data = Encoding.ASCII.GetString(bytes);


But its not working Sniff | :^)

EDIT:

I did this and its finally working Big Grin | :-D

byte[] bytes = new byte[myStream.Length];
    myStream.Position = 0;
    myStream.Read(bytes, 0, (int)myStream.Length);
    string data = Encoding.ASCII.GetString(bytes);


modified on Thursday, November 12, 2009 1:05 PM

QuestionSame page, different access - use Sessions? Pin
Maxdd 711-Nov-09 9:28
Maxdd 711-Nov-09 9:28 
AnswerRe: Same page, different access - use Sessions? Pin
Christian Graus11-Nov-09 9:30
protectorChristian Graus11-Nov-09 9:30 
GeneralRe: Same page, different access - use Sessions? Pin
Maxdd 711-Nov-09 9:45
Maxdd 711-Nov-09 9:45 
GeneralRe: Same page, different access - use Sessions? Pin
Christian Graus11-Nov-09 9:49
protectorChristian Graus11-Nov-09 9:49 
GeneralRe: Same page, different access - use Sessions? Pin
Maxdd 711-Nov-09 9:55
Maxdd 711-Nov-09 9:55 
GeneralRe: Same page, different access - use Sessions? Pin
Christian Graus11-Nov-09 10:12
protectorChristian Graus11-Nov-09 10:12 
GeneralCode behind .aspx.cs Pin
David Mujica11-Nov-09 9:53
David Mujica11-Nov-09 9:53 
AnswerRe: Same page, different access - use Sessions? Pin
David Mujica11-Nov-09 9:34
David Mujica11-Nov-09 9:34 
GeneralRe: Same page, different access - use Sessions? Pin
Maxdd 711-Nov-09 9:58
Maxdd 711-Nov-09 9:58 
GeneralRe: Same page, different access - use Sessions? Pin
Petr Pechovic11-Nov-09 10:14
professionalPetr Pechovic11-Nov-09 10:14 
GeneralRe: Same page, different access - use Sessions? Pin
Maxdd 711-Nov-09 16:28
Maxdd 711-Nov-09 16:28 
Question.txt to SQL (MS SQL Server) [modified] Pin
Maxdd 711-Nov-09 8:53
Maxdd 711-Nov-09 8:53 
AnswerRe: .txt to SQL (MS SQL Server) Pin
Christian Graus11-Nov-09 9:29
protectorChristian Graus11-Nov-09 9:29 
GeneralRe: .txt to tSQL (MS SQL Server) Pin
Maxdd 711-Nov-09 9:44
Maxdd 711-Nov-09 9:44 
GeneralRe: .txt to tSQL (MS SQL Server) Pin
Christian Graus11-Nov-09 9:49
protectorChristian Graus11-Nov-09 9:49 
GeneralRe: .txt to tSQL (MS SQL Server) Pin
Maxdd 711-Nov-09 9:56
Maxdd 711-Nov-09 9:56 
GeneralRe: .txt to tSQL (MS SQL Server) Pin
Christian Graus11-Nov-09 10:10
protectorChristian Graus11-Nov-09 10:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.