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
Nageshwar Rao
NA
74
37.4k
How to add image from c#
Sep 1 2016 6:42 AM
Hi
How can i add image using c#
static void Main(string[] args)
{
try
{
String uriString = "http://******;
WebClient myWebClient = new WebClient();
string fileName = @"C:\Pictures\phone-icon.png";
Stream objStrm = myWebClient.OpenRead(fileName);
objStrm.Position = 0;
myWebClient.UploadFile(new Uri(uriString), "POST", objStrm.ToString());
Console.WriteLine("completed");
Console.Read();
}
catch (Exception ex)
{
Console.WriteLine("error");
}
but it is not working,image is not uploading at my destination
Reply
Answers (
2
)
Duplicate in Datatable
Boxing and Unboxing in .NET