QueryString

G

Guest

hi,

i'm not sure if this has something to do with c# or ASP.NET but i'd like to
know how to use a querystring. i have a webpage that i can translate but i
dont want to make seperate pages for each language. i want a querystring to
edit the text in the page. is this possible? if so, how?

thanx in advance
--
Look Out!

Helter Skelter
Yellow Submarine
Pepperland

PS. Get Back!
 
J

Jani Järvinen [MVP]

Hi Beatle,
i'm not sure if this has something to do with c# or ASP.NET but i'd like
to
know how to use a querystring. i have a webpage that i can translate but i
dont want to make seperate pages for each language. i want a querystring
to
edit the text in the page. is this possible? if so, how?

Say, you wanted to have URLs like this, right?

www.somesite.com/products/?lang=en
www.somesite.com/products/?lang=es

If yes, then you would need a solution that would store the individual
language translations in some kind of a database (it needn't specifically be
a SQL database). Then, on each ASP.NET page, you would have code to check
for this query string, and fetch the correct text from the database based on
the language specified.

That is, you would have static layout for the page and for all languages,
but just the main text (and menus/navigation probably) would change from
language to another. This way, designing and editing the pages would be
easier.

Of course, you could also store the user's language selection in a cookie
and so you could have the same URLs for all languages. But the process of
reading the translated text from the database would still be the same.

Also, you could take advantage of ASP.NET's globalization and localization
features, so that you don't need to code the above all by hand. For example,
start here:

http://samples.gotdotnet.com/quickstart/aspplus/

....and scroll down to see the topic "Localization" on the left and follow
the links.

Hope this helps to get you started.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 
G

Guest

hi,

thanks a lot. i think i have managed it now
--
Look Out!

Helter Skelter
Yellow Submarine
Pepperland

PS. Get Back!
 

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

Similar Threads

web search 6
Querystring 6
Email Form in ASP.NET 4
Creating a new instance of a class 2
Feedback form 1
create a Popup 2
Image Based Website 2
SmtpException with email form 4

Top