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

what are aspx.resx files for?

P: n/a
Hi,

When I add a webform, VS generates three files:

WebForm1.aspx
WebForm1.aspx.cs (could also be "WebForm1.aspx.vb" I guess)
WebForm1.aspx.resx

What is that last file for? How can I use it?
I understand the use of (but haven't used yet..) the "stand alone" resource
files
but have not been able to find a reference to this webform-specific file.
Hans Kesting
Nov 18 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Hi Hans,

The most common use of resource files is to hold localization information
so that you can present different versions of your application depending on
the locale. However, there are other uses as well.

http://samples.gotdotnet.com/quickst...urcefiles.aspx

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Hans Kesting" <ne***********@spamgourmet.com>
Subject: what are aspx.resx files for?
Date: Mon, 9 Feb 2004 10:41:14 +0100
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#C**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 62.166.159.254
Path: cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP12.
phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:208516
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi,

When I add a webform, VS generates three files:

WebForm1.aspx
WebForm1.aspx.cs (could also be "WebForm1.aspx.vb" I guess)
WebForm1.aspx.resx

What is that last file for? How can I use it?
I understand the use of (but haven't used yet..) the "stand alone" resource
files
but have not been able to find a reference to this webform-specific file.
Hans Kesting


Nov 18 '05 #2

P: n/a
Yes, I know.

You can instantiate a ResourceManager, that you point to a set of resource
files,
(for the different supported cultures). Then it is possible te retrieve
texts and
binary information as specific as possible for the current culture.

However, the question was (or was supposed to be, might have been unclear):
how can I use specifically the aspx.resx files that are generated
automatically?
Just as "regular" resource files (add more of those files for the supported
cultures,
instantiate a ResourceManager, point it to the set of resource files, and
use it
for every text that is culture specific; in short: add a lot of coding)
or is there any direct support built-in, which requires (almost) no coding?
(I can imagine a feature where label-texts and so on are automatically
replaced by a text from the resource, if the label-text happens to be an
existing resource-label)
Hans Kesting
"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:l9**************@cpmsftngxa07.phx.gbl...
Hi Hans,

The most common use of resource files is to hold localization information
so that you can present different versions of your application depending on the locale. However, there are other uses as well.

http://samples.gotdotnet.com/quickst...urcefiles.aspx

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Hans Kesting" <ne***********@spamgourmet.com>
Subject: what are aspx.resx files for?
Date: Mon, 9 Feb 2004 10:41:14 +0100
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#C**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 62.166.159.254
Path:

cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP12. phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:208516X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi,

When I add a webform, VS generates three files:

WebForm1.aspx
WebForm1.aspx.cs (could also be "WebForm1.aspx.vb" I guess)
WebForm1.aspx.resx

What is that last file for? How can I use it?
I understand the use of (but haven't used yet..) the "stand alone" resourcefiles
but have not been able to find a reference to this webform-specific file.
Hans Kesting

Nov 18 '05 #3

P: n/a
Hans,

I am really not following you here. Can you explicitly indicate what you
mean by "use"?

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Hans Kesting" <ne***********@spamgourmet.com>
References: <#C**************@TK2MSFTNGP12.phx.gbl> <l9**************@cpmsftngxa07.phx.gbl>Subject: Re: what are aspx.resx files for?
Date: Tue, 10 Feb 2004 11:41:04 +0100
Lines: 85
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <uE*************@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 62.166.159.254
Path: cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08
..phx.gbl!tk2msftngp13.phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:208840
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Yes, I know.

You can instantiate a ResourceManager, that you point to a set of resource
files,
(for the different supported cultures). Then it is possible te retrieve
texts and
binary information as specific as possible for the current culture.

However, the question was (or was supposed to be, might have been unclear):
how can I use specifically the aspx.resx files that are generated
automatically?
Just as "regular" resource files (add more of those files for the supported
cultures,
instantiate a ResourceManager, point it to the set of resource files, and
use it
for every text that is culture specific; in short: add a lot of coding)
or is there any direct support built-in, which requires (almost) no coding?
(I can imagine a feature where label-texts and so on are automatically
replaced by a text from the resource, if the label-text happens to be an
existing resource-label)
Hans Kesting
"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:l9**************@cpmsftngxa07.phx.gbl...
Hi Hans,

The most common use of resource files is to hold localization information
so that you can present different versions of your application depending

on
the locale. However, there are other uses as well.

http://samples.gotdotnet.com/quickst...urcefiles.aspx

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
>From: "Hans Kesting" <ne***********@spamgourmet.com>
>Subject: what are aspx.resx files for?
>Date: Mon, 9 Feb 2004 10:41:14 +0100
>Lines: 17
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <#C**************@TK2MSFTNGP12.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: 62.166.159.254
>Path:

cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP12

Nov 18 '05 #4

P: n/a
I think the question really is "WHY are these files generated along with
aspx and ascx files?".
It's probably not just to take up space so there is a reason why they are
generated.
WHAT is that reason?
Does some component inside the asp.net system (or maybe the IDE, because
that's the one
generating these files) need these files?
If so, what components and for what use?

And along with the above questions there is "can *I* change anything there
to
do something usefull within my application"?

Hans Kesting
"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:04**************@cpmsftngxa07.phx.gbl...
Hans,

I am really not following you here. Can you explicitly indicate what you
mean by "use"?

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Hans Kesting" <ne***********@spamgourmet.com>
References: <#C**************@TK2MSFTNGP12.phx.gbl> <l9**************@cpmsftngxa07.phx.gbl>
Subject: Re: what are aspx.resx files for?
Date: Tue, 10 Feb 2004 11:41:04 +0100
Lines: 85
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <uE*************@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 62.166.159.254
Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08 phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:208840X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Yes, I know.

You can instantiate a ResourceManager, that you point to a set of resourcefiles,
(for the different supported cultures). Then it is possible te retrieve
texts and
binary information as specific as possible for the current culture.

However, the question was (or was supposed to be, might have been unclear):how can I use specifically the aspx.resx files that are generated
automatically?
Just as "regular" resource files (add more of those files for the supportedcultures,
instantiate a ResourceManager, point it to the set of resource files, and
use it
for every text that is culture specific; in short: add a lot of coding)
or is there any direct support built-in, which requires (almost) no coding?(I can imagine a feature where label-texts and so on are automatically
replaced by a text from the resource, if the label-text happens to be an
existing resource-label)
Hans Kesting
"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:l9**************@cpmsftngxa07.phx.gbl...
Hi Hans,

The most common use of resource files is to hold localization information so that you can present different versions of your application
dependingon
the locale. However, there are other uses as well.

http://samples.gotdotnet.com/quickst...urcefiles.aspx

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
>From: "Hans Kesting" <ne***********@spamgourmet.com>
>Subject: what are aspx.resx files for?
>Date: Mon, 9 Feb 2004 10:41:14 +0100
>Lines: 17
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <#C**************@TK2MSFTNGP12.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: 62.166.159.254
>Path:


cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP12

Nov 18 '05 #5

P: n/a
Hans,

The IDE uses the resource files to store internal information regarding the
Server Controls on the Web form. You should not add your own information
into the auto-generated resource files.

If you want to use resource files in your application, you should create
your own.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Hans Kesting" <ne***********@spamgourmet.com>
References: <#C**************@TK2MSFTNGP12.phx.gbl> <l9**************@cpmsftngxa07.phx.gbl>
<uE*************@tk2msftngp13.phx.gbl>
<04**************@cpmsftngxa07.phx.gbl>Subject: Re: what are aspx.resx files for?
Date: Thu, 12 Feb 2004 16:42:56 +0100
Lines: 120
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#n**************@TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 62.166.159.254
Path: cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP11.phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:209614
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

I think the question really is "WHY are these files generated along with
aspx and ascx files?".
It's probably not just to take up space so there is a reason why they are
generated.
WHAT is that reason?
Does some component inside the asp.net system (or maybe the IDE, because
that's the one
generating these files) need these files?
If so, what components and for what use?

And along with the above questions there is "can *I* change anything there
to
do something usefull within my application"?

Hans Kesting
"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:04**************@cpmsftngxa07.phx.gbl...
Hans,

I am really not following you here. Can you explicitly indicate what you
mean by "use"?

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
>From: "Hans Kesting" <ne***********@spamgourmet.com>
>References: <#C**************@TK2MSFTNGP12.phx.gbl> <l9**************@cpmsftngxa07.phx.gbl>
>Subject: Re: what are aspx.resx files for?
>Date: Tue, 10 Feb 2004 11:41:04 +0100
>Lines: 85
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <uE*************@tk2msftngp13.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: 62.166.159.254
>Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA05.phx.gbl!TK2MSFTNGP0

8
phx.gbl!tk2msftngp13.phx.gbl
>Xref: cpmsftngxa07.phx.gblmicrosoft.public.dotnet.framework.aspnet:208840 >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>
>Yes, I know.
>
>You can instantiate a ResourceManager, that you point to a set ofresource >files,
>(for the different supported cultures). Then it is possible te retrieve
>texts and
>binary information as specific as possible for the current culture.
>
>However, the question was (or was supposed to be, might have beenunclear): >how can I use specifically the aspx.resx files that are generated
>automatically?
>Just as "regular" resource files (add more of those files for thesupported >cultures,
>instantiate a ResourceManager, point it to the set of resource files, and >use it
>for every text that is culture specific; in short: add a lot of coding)
>or is there any direct support built-in, which requires (almost) nocoding? >(I can imagine a feature where label-texts and so on are automatically
>replaced by a text from the resource, if the label-text happens to be an
>existing resource-label)
>
>
>Hans Kesting
>
>
>"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
>news:l9**************@cpmsftngxa07.phx.gbl...
>> Hi Hans,
>>
>> The most common use of resource files is to hold localizationinformation >> so that you can present different versions of your applicationdepending >on
>> the locale. However, there are other uses as well.
>>
>> http://samples.gotdotnet.com/quickst...urcefiles.aspx
>>
>> Jim Cheshire, MCSE, MCSD [MSFT]
>> ASP.NET
>> Developer Support
>> ja******@online.microsoft.com
>>
>> This post is provided as-is with no warranties and confers no rights.
>>
>> --------------------
>> >From: "Hans Kesting" <ne***********@spamgourmet.com>
>> >Subject: what are aspx.resx files for?
>> >Date: Mon, 9 Feb 2004 10:41:14 +0100
>> >Lines: 17
>> >X-Priority: 3
>> >X-MSMail-Priority: Normal
>> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>> >Message-ID: <#C**************@TK2MSFTNGP12.phx.gbl>
>> >Newsgroups: microsoft.public.dotnet.framework.aspnet
>> >NNTP-Posting-Host: 62.166.159.254
>> >Path:
>>


cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSF TNGP08.phx.gbl!TK2MSFTNGP1

2


Nov 18 '05 #6

P: n/a
OK, thanks!

"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:PW**************@cpmsftngxa07.phx.gbl...
Hans,

The IDE uses the resource files to store internal information regarding the Server Controls on the Web form. You should not add your own information
into the auto-generated resource files.

If you want to use resource files in your application, you should create
your own.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

Nov 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.