Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
4
Answers
supress open/save dialog in c# web broser control while down
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Mai Hu Na
11y
2.1k
1
Reply
here is my code i used web client and pass my link to load file but file created in
folder contain htmlscript tag instead file content whats the wrong.see attach file
foreach (HtmlElement link in row.GetElementsByTagName("A"))
{
bool isFound = false;
string url = "";
isFound = true;
mshtml.HTMLAnchorElement anchor = link.DomElement as HTMLAnchorElement;
if (anchor != null)
{
url = anchor.href;
}
if (isFound && url != "")
{
WebClient client = new WebClient();
client.UseDefaultCredentials = true;
var fileName = @"C:\DownLoads\070813.GACT";
client.DownloadFile(url, fileName);
}
}
Attachment:
070813.rar
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
How to Control Thread in C#
what was problem in my code?