Hello,
I have a webapp with on each page a "language" drop down list. Now, if I
choose X, I want to initialise the drop down list to X. Easy to understand.
But what is the best way to do this in ASP.NET? The obvious answer is, I
think, the Session object. But one thing annoys me: a session can expire. It
is difficult to guess the expiration time; 20 minutes, 40, 60? I just don't
know. Is there a better way to pass data between pages? I was thinking about
the good old url parameters: page.aspx?langu age=en. But I don't think that's
the ASP.NET way.
Ideas, suggestions and comments more than welcome. 3 1637
If you are talking about small amounts of data, passing it in the URL is
fine.
It is not difficult to guess the expiration time of a session, since that is
a setting you configure
"Zaccariah Kowalsky" <g-***@freegates.b e> wrote in message
news:bp******** **@news.worldon line.be... Hello,
I have a webapp with on each page a "language" drop down list. Now, if I choose X, I want to initialise the drop down list to X. Easy to
understand. But what is the best way to do this in ASP.NET? The obvious answer is, I think, the Session object. But one thing annoys me: a session can expire.
It is difficult to guess the expiration time; 20 minutes, 40, 60? I just
don't know. Is there a better way to pass data between pages? I was thinking
about the good old url parameters: page.aspx?langu age=en. But I don't think
that's the ASP.NET way.
Ideas, suggestions and comments more than welcome.
Marina <nospam> schreef in berichtnieuws
O2************* *@TK2MSFTNGP10. phx.gbl... If you are talking about small amounts of data, passing it in the URL is fine.
It is not difficult to guess the expiration time of a session, since that
is a setting you configure
It is. You never know how long a customer will stay on your site. 5 minutes
or 2 hours?
"Zaccariah Kowalsky" <g-***@freegates.b e> wrote in message news:bp******** **@news.worldon line.be... Hello,
I have a webapp with on each page a "language" drop down list. Now, if I choose X, I want to initialise the drop down list to X. Easy to understand. But what is the best way to do this in ASP.NET? The obvious answer is, I think, the Session object. But one thing annoys me: a session can
expire. It is difficult to guess the expiration time; 20 minutes, 40, 60? I just don't know. Is there a better way to pass data between pages? I was thinking about the good old url parameters: page.aspx?langu age=en. But I don't think that's the ASP.NET way.
Ideas, suggestions and comments more than welcome.
The session timer is reset each time a user request a
page, so it is perfectly normal to keep your currently
selected language in the session. The session expires if
the user doesn't request a page for longer than X minutes
where X is your session timeout period which is by default
set to 20 minutes.
You could keep the language in the viewstate but it will
not be easily accessible from nested child controls and
such. Since the selected language is more of a global
variable that all pages and controls probably use the
Session is the best way to keep it. -----Original Message----- Marina <nospam> schreef in berichtnieuws O2************ **@TK2MSFTNGP10 .phx.gbl... If you are talking about small amounts of data, passing
it in the URL is fine.
It is not difficult to guess the expiration time of a
session, since thatis a setting you configure It is. You never know how long a customer will stay on
your site. 5 minutesor 2 hours?
"Zaccariah Kowalsky" <g-***@freegates.b e> wrote in
message news:bp******** **@news.worldon line.be... > Hello, > > I have a webapp with on each page a "language" drop
down list. Now, if I > choose X, I want to initialise the drop down list to
X. Easy to understand. > But what is the best way to do this in ASP.NET? The
obvious answer is, I > think, the Session object. But one thing annoys me: a
session canexpire. It > is difficult to guess the expiration time; 20
minutes, 40, 60? I just don't > know. Is there a better way to pass data between
pages? I was thinking about > the good old url parameters: page.aspx?langu age=en.
But I don't think that's > the ASP.NET way. > > Ideas, suggestions and comments more than welcome. > > > > > > >
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Stephen |
last post by:
I was wondering if someone can help me with an web application design
problem. I have a aspx page which builds up an arraylist called addresses
and outputs the values in the arraylist items to a datagrid. I am using the
viewstate object to store the Arraylist items on the page on postback.
My PROBLEM is that I need to redirect the user to a new aspx page and on
this new page i need to be able to access the items in my arraylist. Is this...
|
by: Satish Appasani |
last post by:
Is there any ideal way of passing values to another page using Post method
and avoiding Sessions and Viewstate?
I have used Viewstate unsuccessfully. Though I've set all the required
attributes to the form including enableviewstatemac property to false. But
it did not work.
The I used the following code:
In the source page add the code:
|
by: Kevin Phifer |
last post by:
Ok, before anyone freaks out, I have a solution I need to
create that gathers content from maybe different places.
Each one can return a <form> in the html, so its the
classic can't have more than one runat=server form on a
asp.net page. However, I still want developers to be able
to use asp.net controls to create some apps that are
created on the page. So I need multiple forms on a
asp.net page(doesn't everyone). I purchased the...
|
by: Brian Henry |
last post by:
Hi, I have a data grid that has the following properties
EnableViewState = false
AllowPaging = true
AllowSorting = true
AllowCustomPaging = false
now, when the page switches I want to get the current page number and
display it in a label on the form... but it doesnt seem to return anything
but zero no mater which page i am on in CurrentPageIndex property of the
|
by: kermit |
last post by:
Hi,
I am hoping this is a foolish or simple question.
I am creating a multiuser app. consisit of a login page and a dataentry
page. If the user leaves the data entry page (other than exiting the
browser). I want them to 'have' to go back through the login screen and
re-login.
My problem is the browser's (IE 6) Back and Forward buttons.
If the user clicks the Back button from the data entry screen they go to the
login in screen and if...
| |
by: tshad |
last post by:
Is there a way to carry data that I have already read from the datagrid from
page to page?
I am looking at my Datagrid that I page through and when the user says get
the next page, I have to go to the database to get the next page. Is there
a way to use the dataset to allow us to read back and forth in it instead of
going back to the database to get it?
Thanks,
|
by: bill |
last post by:
Is there a way to retrieve values from the viewstate in the previouspage
using cross page postback?
Thanks!
Bill
|
by: Shadow Lynx |
last post by:
I realize that his question has been asked, in many other forms, many
times in this group. Even so, my tired eyes have not yet found a
sufficient answer, so I've decided to "reask" it even though I'm sure
this will offend some of the more seasoned verterans of this board.
The Players:
Consider a simple web form, which I'll call Page A, that has a couple
of controls on it. It's not important what they are, only that they're
static...
|
by: J055 |
last post by:
Hi
I'd like to post a page to another page using LinkButton.PostBackUrl. Then
using another LinkButton on the target page post back to the source page and
restore the controls to the state they were in before the first post to the
target.
Is there an easy way to do this? Perhaps I should consider another approach?
Many thanks
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |