Solved

Reading the Accept-Language header in the code behind

Posted on 2012-03-21
3
391 Views
Last Modified: 2012-03-21
Does anyone have a code snippet for reading the Accept-Language from the HTTP header in the code behind file?
0
Comment
Question by:LarsNess
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 37746541
Does this article help you further ?
ASP.NET Request.Headers
http://www.dotnetperls.com/request-headers
0
 
LVL 20

Expert Comment

by:BuggyCoder
ID: 37746638
use this inside your code behind file:-
Request.Headers["Accept-Language"].ToString();
0
 

Author Closing Comment

by:LarsNess
ID: 37746642
Brilliant!

For those of you who are interested, I found the Accept-Language like this:

            NameValueCollection headers = base.Request.Headers;
            string acceptLanguage = headers.Get("Accept-Language");
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question