TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kiran Suthar
NA
7
0
How to write data to HttpWebRequest using stream / stream writer
Dec 28 2005 5:39 AM
Hi All, I am using HttpWebRequest in my code. My problem is that I want to post some data using HttpWebRequest, I have also written some code for this, see the part of code below, HWReq.ContentLength = Buffer.Length; Stream PostData = HWReq.GetRequestStream(); // HWReq is the HttpWebRequest object. PostData.Write(Buffer, 0, Buffer.Length); // Buffer is the ByteArray. PostData.Close(); during execution, I am not receiving any error but there is no effect of the above code. I have also tried the following code, but it is also not working. HWReq.ContentLength = cData.Length; StreamWriter SW = new StreamWriter(HWReq.GetRequestStream()); // HWReq is the HttpWebRequest object. SW.Write(cData, 0, cData.Length); // cData is the charector Array SW.Close(); I am facing this proble since many days and still I have no solution, Can any body help me please? Any hint will also fine. Thanks, Kiran Suthar.
Reply
Answers (
0
)
Developing a Chat Application using C# in ASP.Net
Where to store huge number of strings