By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,972 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,972 IT Pros & Developers. It's quick & easy.

Request.ServerVariables("HTTP_USER_AGENT")

P: 5
I am wondering what is the equivalent of Request.ServerVariables("HTTP_USER_AGENT") in C#?

Thanks
Dec 23 '08 #1
Share this Question
Share on Google+
1 Reply


Curtis Rutland
Expert 2.5K+
P: 3,256
That would be:
Expand|Select|Wrap|Line Numbers
  1. Request.ServerVariables["HTTP_USER_AGENT"];
C# uses square brackets [ ] for array indexes rather than the parenthesis ( ) that VB.NET uses.

But an easier way to do the same (in either language) is:
Expand|Select|Wrap|Line Numbers
  1. Request.UserAgent;
Dec 23 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.