Click here to Skip to main content
15,887,385 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to add Custom folder To setup project Pin
sathish s13-Aug-07 3:37
sathish s13-Aug-07 3:37 
GeneralRe: How to add Custom folder To setup project Pin
salmonraju13-Aug-07 3:53
salmonraju13-Aug-07 3:53 
Questionhow to connect to sql Pin
costavo13-Aug-07 1:50
costavo13-Aug-07 1:50 
AnswerRe: how to connect to sql Pin
Giorgi Dalakishvili13-Aug-07 2:03
mentorGiorgi Dalakishvili13-Aug-07 2:03 
AnswerRe: how to connect to sql Pin
Russell Jones13-Aug-07 5:53
Russell Jones13-Aug-07 5:53 
Questionsome problem with ResourceManager Pin
Areff13-Aug-07 1:27
Areff13-Aug-07 1:27 
AnswerRe: some problem with ResourceManager Pin
Pete O'Hanlon13-Aug-07 1:31
mvePete O'Hanlon13-Aug-07 1:31 
AnswerRe: some problem with ResourceManager Pin
Talal Sultan13-Aug-07 2:17
Talal Sultan13-Aug-07 2:17 
With .NET 2.0, there is an easier way to do things.

First of all, you need to create the local resources folder called App_LocalResources or the global resources folder, App_GlobalResources. Files located in the local resources folder will have to be named like their corresponding ASPX files; files in the global resources folder can be named whatever you like.

Now, suppose you have a file called myPage.aspx. If you decide to use the local resouces, it means that you will create resource files only for that page. Your resource files should be named: myPage.aspx.resx (this one should always be present), then for different languages you would have: for US English: myPage.aspx.en-US.resx, for Switzerland French: myPage.aspx.fr-CH.resx, etc....

For the global resources, you can use any file name you like to replace myFile.aspx.

Now to access the resouces:

Assuming you have a label lblFirstname to which you would like to assign the value of the resource called "firstname" in the resource files, you would write:

For local resource: lblFirstname.Text = GetLocalResourceObject("firstname").ToString();
For global resource: lblFirstname.Text = GetGlobalResourceObject("GlobalFile", "firstname").ToString();

where GlobalFile will be the name of the global resource file.

I hope this helps Smile | :)

Talal

-- If this is a post that has been helpful to you, please vote for it. Thank you!

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook

GeneralRe: some problem with ResourceManager Pin
Areff13-Aug-07 2:42
Areff13-Aug-07 2:42 
AnswerRe: some problem with ResourceManager Pin
Talal Sultan13-Aug-07 2:53
Talal Sultan13-Aug-07 2:53 
Questionhow to synchronize static method/variable? Pin
e_b13-Aug-07 1:08
e_b13-Aug-07 1:08 
AnswerRe: how to synchronize static method/variable? Pin
Luc Pattyn13-Aug-07 1:23
sitebuilderLuc Pattyn13-Aug-07 1:23 
QuestionDataGridTextBoxColumn Text Committing problem Pin
srikanth42413-Aug-07 1:03
srikanth42413-Aug-07 1:03 
QuestionHelp regarding row height in datagridview control Pin
anu8113-Aug-07 0:57
anu8113-Aug-07 0:57 
AnswerRe: Help regarding row height in datagridview control Pin
sathish s13-Aug-07 2:51
sathish s13-Aug-07 2:51 
GeneralRe: Help regarding row height in datagridview control Pin
anu8113-Aug-07 3:21
anu8113-Aug-07 3:21 
QuestionTab Order Pin
Sunshine Always13-Aug-07 0:55
Sunshine Always13-Aug-07 0:55 
AnswerRe: Tab Order Pin
Luc Pattyn13-Aug-07 1:27
sitebuilderLuc Pattyn13-Aug-07 1:27 
AnswerRe: Tab Order Pin
kubben13-Aug-07 3:07
kubben13-Aug-07 3:07 
QuestionSFTP, Tamir Pin
GeorgeBerry13-Aug-07 0:46
GeorgeBerry13-Aug-07 0:46 
AnswerRe: SFTP, Tamir Pin
Pete O'Hanlon13-Aug-07 1:14
mvePete O'Hanlon13-Aug-07 1:14 
QuestionRe: SFTP, Tamir Pin
GeorgeBerry13-Aug-07 4:43
GeorgeBerry13-Aug-07 4:43 
AnswerRe: SFTP, Tamir Pin
Ravi Bhavnani13-Aug-07 2:14
professionalRavi Bhavnani13-Aug-07 2:14 
GeneralRe: SFTP, Tamir Pin
GeorgeBerry14-Aug-07 1:13
GeorgeBerry14-Aug-07 1:13 
QuestionData Grid problem Pin
Janu_M13-Aug-07 0:14
Janu_M13-Aug-07 0:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.