What are the steps to follow to get user\'s culture at run time? ,Java, C ,C++, ASP, ASP.net C# ,Struts ,Questions & Answer, Struts2, Ajax, Hibernate, Swing ,JSP , Servlet, J2EE ,Core Java ,Stping, VC++, HTML, DHTML, JAVASCRIPT, VB ,CSS, interview ,questions, and answers, for,experienced, and fresher
What are the steps to follow to get user\'s culture at run time?

1. Get the Request objects UserLanguages property.

2. Use the returned value with the CultureInfo class to create an object representing the users current culture.

For example, the following code gets the users culture and displays the English name and the abbreviated name of the culture in a label the first time the page is displayed:

private void Page_Load(object sender, System.EventArgs e)


// Run the first time the page is displayed

if (!IsPostBack)


// Get the user\'s preferred language.

string sLang = Request.UserLanguages[0];

// Create a CultureInfo object from it.

CultureInfo CurrentCulture = new CultureInfo(sLang);

lblCulture.Text = CurrentCulture.EnglishName + \": \" +




More interview questions and answers

What do you mean by three-tier architecture?

What's REF Keyword?

What's Delegate?

Write the code that creates a cookie containing the user name R4R and the current date to the user computer. Set the cookie to remain on the user computer for 30 days?

Wat's feature of delegate?

Describe the property of cookie in Asp.Net ?

Wat's Property?

Differences between Web and Windows applications?

What is the main difference between the Button server control and the Button HTML control?

What is the difference between web.config and Machine.config files?

What is Method Overloading ?

How do you require authentication using the Web.config file?

What is Partial types?

What is Aliases?

What is Static classes?

What is Methods?

How to create Multivalued Cookie ?

Define Error Events in Asp.Net?

Why the exception handling is important for an application?

What is indexer?

Explain the aim of using EnableViewState property?

What are the two levels of variable supported by Asp.net?

Difference between Session object and Profile object in ASP.NET?

What is Event?

What is the Default Expiration Period For Session and Cookies,and maximum size of viewstate?

What is the use of Global.asax File in ASP.NET Application ?

Explain exception handling in C#?

What is the Purpose of System.Collections.Generic ?

What is GAC and name of the utility used to add an assembly into the GAC ?

Explain Exception handling

Whether we can use vbscript and javascript combination for validation?

What are the different states in ASP.NET?

Define State managment?

What is Authentication and Authorization ?

Discribe Client Side State Management?

Describe Server Side State Management ?

What is SessionID?

What is the Session Identifier?

Advantages of using Session State?

Disadvantages of using Session State ?

What are the Session State Modes? Define each Session State mode supported by ASP.NET.

What is a Master Page in Asp.Net?

What are the 2 important parts of a master page and file extension for a Master Page?

How do you identify a Master Page and how do you bind a Content Page to a Master Page?

Can you dynaimically assign a Master Page?

From the content page code how can you reference a control on the master page?

What is Globalization?

What are the 3 different ways to globalize web applications?

What are the steps to follow to get user\'s culture at run time?

What do you mean by neutral cultures?

What is the advantage of using Windows authentication in a Web application?

What is the default authentication method when you create a new Web application project?

How do you get a User Identity?

How do you determine, what is the role of the current user?

Can you specify authorization settings both in Web.config and in IIS?

What are the 2 Layouts supported by a Web form in ASP.NET?

What is the difference between Literal and Lable Control?

What is smart navigation?

Explain the difference between a database administrator and a data administrator.

Explain the difference between a database administrator and a data administrator.

What is a Database Transactions ?

What is ACID?

What is Concurrency?

What is a Deadlock?

Define rollback and roll forward ?

what is database?

Explain about object oriented databases?

Explain about XML databases?

Explain about the hierarchical model of database?

Explain about Network model?

Explain about relational database?

Disadvantage of File Processing System or Advantage of Database over File Processing System ?

Describe levels of Abstraction in Database?

What is extension and intension?

What is Data Independence in Database System?

What is a view in database system and how it is related to data independence?

What is E-R Model in Database system?

What is Object Oriented model in Database system?

What is Weak Entity and Weak Entity set?

What is an attribute?

What are a Relation Schema and a Relation in Database System?

What is Degree and Cardinality of a Relation in Database System?

What is DDL)?

What is DML (Data Manipulation Language) in Database system?

What is DML Compiler?

What is Query evaluation engine?

What is Relational Algebra in database System?

What is Relational Calculus?

What is Normalization in database?

What is Functional Dependency in Normalization?

What is 1 NF (Normal Form) in database?

What is Fully Functional dependency in database?

What is 2 NF (Normal Form) in database?

What is Transitive functional dependency?

What is 3 NF (Normal Form) in database?

What is BCNF (Boyce-Codd Normal Form) in database?

What is 4 NF (Normal Form) in database?

What is 5 NF (Normal Form) in database

What is key in Database?

What is Primary Keys ?

R4R provides free online tutolrails ,examples for Freshers and experts .We cover core java, tutorials, spring, Hibernate, python, struts, struts 2,c language, spring boot,PHP,MYSQL,C#,ASP.NET,WPF,WCF,Photoshop , JSP, programming, example, Interview questions and answer