Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing date format

Status
Not open for further replies.

arneweise77

Programmer
Apr 25, 2002
46
SE
Hi!

I´ve just finished an aspx application and went to my employer to install it on his server and I encountered a problem.

I changed the Regional Options to display Swedish date and currency and so forth, but the change didn´t affect my aspx app. I´ve checked in Ms Access that the regional options is changed and it is.

I guess these settings are to be made in web.config or machine.config. But how?

Regards
Arne
 
//----------------------------------------------------------------------------------------------
// Application_BeginRequest(sender:Object, e:EventArgs):void
//----------------------------------------------------------------------------------------------
protected function Application_BeginRequest(sender:Object, e:EventArgs):void{

// Set the Culture for this particular request.
var oLanguages = Request.UserLanguages;
var iLangCount:int = oLanguages.Length;

if(iLangCount >0){
try{
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(oLanguages[0]);
}
catch(argEx:ArgumentException){
// Ignore error
}
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top