Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Resource Cultue question (ASP.NET 2.0)

Reply
Thread Tools

Resource Cultue question (ASP.NET 2.0)

 
 
Griff
Guest
Posts: n/a
 
      02-01-2006
I have attempted to replicate an example of using resource strings in a test
application and I can't get it to work - I wonder whether someone could
kindly point out where I've gone wrong...

DEFAULT.ASPX
This contains the following line:

<%@ Page Culture="Auto" UICulture="Auto" Language="VB" Explicit="true"
Strict="true" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default" %>

DEFAULT.ASPX.VB
This contains the following event:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

Page.Title = Resources.defaultResource.Hello & " Griff"

End Sub

In the \APP_GLOBALRESOURCES folder I have two files:
defaultResource.resx
defaultResource.fi-FI.resx

INTERNET EXPLORER 6 > LANGUAGES
The top one is: "Finnish [fi]"

IIS
The web project is set to run under IIS, rather than the web server built
into VS2005

WHAT I'M EXPECTING TO HAPPEN
When the default.aspx page loads, it uses the Culture="Auto" attribute (or
the UICulture="Auto" attribute, not sure which) to auto-detect the language
of my browser. Because I have the language set to Finnish it would use the
"defaultResource.fi-FI.resx" file.

WHAT HAPPENS
It's getting the value from the defaultResource.resx file instead



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resource expression to access resource located in library Heinrich Moser ASP .Net 1 03-27-2008 04:25 PM
Very annoying error: Access to the path is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity Jay ASP .Net 2 08-20-2007 07:38 PM
Resource manager problem: naming for embedded resource. Dirc Khan-Evans ASP .Net 1 10-17-2005 12:52 PM
The system cannot locate the resource specified. Error processing resource avishosh XML 2 08-08-2004 06:28 AM
Question Re: WIN2K Server Resource Kit SWE MCSE 2 12-03-2003 08:43 PM



Advertisments