Question: How to access the ressource files in a short fashion

P

Progman

to read the ressources, I execute the following code from my screen files.
Is there another shorter way of doing this? Similar to
"ressource("language1.ressource").key("GuestBook.asax.LabelTitle.Text").Value

txs for your answers in advance

Dim rr As ResourceReader

rr = New ResourceReader(Server.MapPath("~") + Path.DirectorySeparatorChar +
"Common/Resources" + Path.DirectorySeparatorChar + "CommonStrings" +
Trim(Str(Application("Language"))) + ".resources")

Dim de As IDictionaryEnumerator = rr.GetEnumerator()


While de.MoveNext()

Me.LabelTitle.Text = IIf(de.Key.ToString() =
"GuestBook.asax.LabelTitle.Text", de.Value.ToString(), Me.LabelTitle.Text)

End While

rr.Close()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top