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
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How To Set User-Agent In Web Client In ASP.NET
Nikhil Sangani
Aug 07
2016
Code
8.1
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
using
(WebClient web =
new
WebClient())
{
web.Headers[
"User-Agent"
] =
"Mozilla/4.0 (Compatible; Windows NT 5.1; MSIE 6.0) "
+
" (compatible; MSIE 6.0; Windows NT 5.1; "
+
".NET CLR 1.1.4322; .NET CLR 2.0.50727)"
;
}
Set User-Agent
Web Client
ASP.NET