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
abburi chowdary
NA
60
14.9k
how can we upload path using C# openfile dial/folder browser
Apr 27 2018 7:39 AM
i have written below code to upload path and get path name in the text box, but i am getting exception i.e occurred during a web client request..
WebClient wc =
new
WebClient();
Uri addy =
new
Uri(@
"http://192...../gethos_test.php?"
+fileName);
NetworkCredential nc =
new
NetworkCredential(
"name"
,
"passowrd"
);
wc.Credentials = nc;
byte
[] arrReturn = wc.UploadFile(addy, textBox1.Text);
wc.Dispose();
String directoryPath=Path.GetDirectoryName(fileName);
{
Uri url = ((WebBrowser)sender).Document.Url;
textBox1.Text = url.ToString();
}
MessageBox.Show(arrReturn.ToString());
}
catch
(Exception E)
{
MessageBox.Show(E.Message);
}
Reply
Answers (
1
)
Access Data and refresh chart in mile second data ?
Authorization in .net