473,385 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

QueryString

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!
Dec 27 '05 #1
2 2746
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
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
Dec 28 '05 #2
hi,

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

Helter Skelter
Yellow Submarine
Pepperland

PS. Get Back!
"Jani Järvinen [MVP]" wrote:
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
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/

Dec 28 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Arpan | last post by:
A link has the following URL: <a href="Page1.asp?cname=<%= Request.QueryString("cname") %>&cadd1=<%= Request.QueryString("cadd1") %>&cadd2=<%= Request.QueryString("cadd2") %>&cplace=<%=...
2
by: Mikael | last post by:
Hi All! I have a problem here and i can't see what it is... My parameters (value) are shopped off. exampe "Hello world" will end up like "hello" How should i adjust the syntax to get a whole...
1
by: lion | last post by:
my Problem: a query string passed into a html page doesn't display correctly on a mac I am just using html and javascript (no ASP, PHP or server side scripting) This is the query string:...
5
by: David | last post by:
Hello I need to take some values and place them in a string in the format of a querystring. Lets say I have: string State = "ACT"; string SearchString = "Tax"; int MinRelevance = 50;
4
by: Raterus | last post by:
Howdy, Simple question, but I can't figure out how to do it. I have a a page which is called initially with a querystring. After I get the querystring values, I don't need the querystring to...
12
by: Alex | last post by:
I have a question about determining if one QueryString keys exists. The idea is, if this key exists, than its presence is enough to indicate that its value is true. For example ... ...
3
by: Dan Sikorsky | last post by:
How can I get the Querystring passed to the Referring Page from its referrer? I don't want the querystring coming to my current page. I want the querystring that came to the referring page, so...
1
by: beebee | last post by:
Hi all. I am having a bit of difficulty: Here is what is happening: I have an application that spits out a thankyou.aspx page and i would like to pass it the querystring values it had collected...
4
by: =?Utf-8?B?RVcgTmV3Ymll?= | last post by:
My apologies in advance if there is a better forum for this question. Given the following snippet: <script type="text/c#" runat="server"> protected void Page_Load(Object Sender, EventArgs e)...
3
by: pingsheng | last post by:
Dear all, I have a form with dynamically created input fields. These fields go to next page for submitting into SQL database. The thing is all fields are the same but 4 fields. So each record...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.