472,121 Members | 1,591 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,121 software developers and data experts.

what are aspx.resx files for?

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
6 9634
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
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
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
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
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
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.

Similar topics

8 posts views Thread by Fabrizio Maltese | last post: by
2 posts views Thread by qh0st | last post: by
2 posts views Thread by Paul | last post: by
3 posts views Thread by JD | last post: by
1 post views Thread by theintrepidfox | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.