Click here to Skip to main content
15,917,652 members
Home / Discussions / C#
   

C#

 
GeneralRe: Add the RegularExpressionValidator on the server side Pin
Not Active13-Jun-11 8:37
mentorNot Active13-Jun-11 8:37 
QuestionBasic Insert Row Question Pin
AmbiguousName13-Jun-11 1:46
AmbiguousName13-Jun-11 1:46 
AnswerRe: Basic Insert Row Question Pin
Pete O'Hanlon13-Jun-11 2:07
mvePete O'Hanlon13-Jun-11 2:07 
GeneralRe: Basic Insert Row Question Pin
AmbiguousName13-Jun-11 2:30
AmbiguousName13-Jun-11 2:30 
GeneralRe: Basic Insert Row Question Pin
Pete O'Hanlon13-Jun-11 2:51
mvePete O'Hanlon13-Jun-11 2:51 
AnswerRe: Basic Insert Row Question Pin
phil.o13-Jun-11 2:16
professionalphil.o13-Jun-11 2:16 
GeneralRe: Basic Insert Row Question Pin
AmbiguousName13-Jun-11 2:29
AmbiguousName13-Jun-11 2:29 
GeneralRe: Basic Insert Row Question Pin
phil.o13-Jun-11 2:35
professionalphil.o13-Jun-11 2:35 
GeneralRe: Basic Insert Row Question Pin
AmbiguousName13-Jun-11 2:42
AmbiguousName13-Jun-11 2:42 
GeneralRe: Basic Insert Row Question Pin
phil.o13-Jun-11 2:49
professionalphil.o13-Jun-11 2:49 
AnswerRe: Basic Insert Row Question Pin
RaviRanjanKr13-Jun-11 2:48
professionalRaviRanjanKr13-Jun-11 2:48 
AnswerRe: Basic Insert Row Question Pin
BobJanova13-Jun-11 3:25
BobJanova13-Jun-11 3:25 
AnswerRe: Basic Insert Row Question Pin
AmbiguousName13-Jun-11 18:34
AmbiguousName13-Jun-11 18:34 
Questionhow to monitor downloaded and uploaded data Pin
Aisha sharma12-Jun-11 22:17
Aisha sharma12-Jun-11 22:17 
QuestionHow to create xml file in disk location using SQL Server 2005 & C#...? Pin
Manish_Kumar_Nayak12-Jun-11 21:03
Manish_Kumar_Nayak12-Jun-11 21:03 
AnswerRe: How to create xml file in disk location using SQL Server 2005 & C#...? Pin
Richard MacCutchan12-Jun-11 23:46
mveRichard MacCutchan12-Jun-11 23:46 
AnswerRe: How to create xml file in disk location using SQL Server 2005 & C#...? Pin
jschell13-Jun-11 8:43
jschell13-Jun-11 8:43 
QuestionGetting data from host, convert to string and then to bytes again. Pin
krosty478212-Jun-11 13:06
krosty478212-Jun-11 13:06 
AnswerRe: Getting data from host, convert to string and then to bytes again. Pin
Luc Pattyn12-Jun-11 13:42
sitebuilderLuc Pattyn12-Jun-11 13:42 
GeneralRe: Getting data from host, convert to string and then to bytes again. Pin
krosty478212-Jun-11 15:07
krosty478212-Jun-11 15:07 
Thanks for your answer.
I've tried another way to do this, not looking for a data pattern, and i ve found the NetworkStream class.
This is what i have:

NetworkStream nStream = new NetworkStream(getSocket(numsock).getSocket(),true);
            byte[] myReadBuffer = new byte[1024];          
            FileStream fs = new FileStream("C:\\Users\\Mauri\\Desktop\\" + item.Name, FileMode.Append, FileAccess.Write);
            BinaryWriter writer = new BinaryWriter(fs);           
            do
            {
                nStream.Read(myReadBuffer, 0, myReadBuffer.Length);

                writer.Write(myReadBuffer);

            }
            while (nStream.DataAvailable);
                
            writer.Close();
            fs.Close();


When the program makes the first archive, it is ok, rar, zip, pdf, any extension works well, but when i try to download a second file, it is corrupted.
Any idea what is going wrong ?

Thanks
AnswerRe: Getting data from host, convert to string and then to bytes again. Pin
Luc Pattyn12-Jun-11 15:21
sitebuilderLuc Pattyn12-Jun-11 15:21 
GeneralRe: Getting data from host, convert to string and then to bytes again. Pin
krosty478215-Jun-11 12:53
krosty478215-Jun-11 12:53 
AnswerRe: Getting data from host, convert to string and then to bytes again. Pin
Luc Pattyn12-Jun-11 15:34
sitebuilderLuc Pattyn12-Jun-11 15:34 
GeneralRe: Getting data from host, convert to string and then to bytes again. Pin
BobJanova13-Jun-11 0:05
BobJanova13-Jun-11 0:05 
QuestionUsing Cobol Copy Books Pin
MumbleB11-Jun-11 0:53
MumbleB11-Jun-11 0:53 

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.