473,324 Members | 2,417 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,324 software developers and data experts.

Web form retains values over diferent stations

I have an ASP.NET web form that is retaining values over different stations
on the network, how can I stop this behavior ?. I didn’t do anything special
to cause it.

Thanks
C.Fleury

Nov 19 '05 #1
7 1233
What values ? (form fields value ?). From where are coming those values in
your application ?

Most often when you have the same values on several wstations this is
because you used shared (or a VB.NET module) (or static in C#) members... Is
this the case ?

Patrice

--

"cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de
news:05**********************************@microsof t.com...
I have an ASP.NET web form that is retaining values over different stations on the network, how can I stop this behavior ?. I didn't do anything special to cause it.

Thanks
C.Fleury

Nov 19 '05 #2
Patrice,

All objects are unbound textboxes in which the user enters data manually…I
do have this code in my “page_load†event, which retains the form values in
between postbacks, in this case “sys†is a public structure:

If Not IsPostBack Then
txb1.Text = IIf(Empty(sys._1), "0", sys._1)
txb2.Text = IIf(Empty(sys._2), "0", sys._2)
txb5.Text = IIf(Empty(sys._5), "0", sys._5)
txb10.Text = IIf(Empty(sys._10), "0", sys._10)
txb20.Text = IIf(Empty(sys._20), "0", sys._20)
txb50.Text = IIf(Empty(sys._50), "0", sys._50)
txb100.Text = IIf(Empty(sys._100), "0", sys._100)
txbCoins.Text = IIf(Empty(sys._Coins), "0", sys._Coins)
End If

Thanks Patrice
C.Fleury
"Patrice" wrote:
What values ? (form fields value ?). From where are coming those values in
your application ?

Most often when you have the same values on several wstations this is
because you used shared (or a VB.NET module) (or static in C#) members... Is
this the case ?

Patrice

--

"cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de
news:05**********************************@microsof t.com...
I have an ASP.NET web form that is retaining values over different

stations
on the network, how can I stop this behavior ?. I didn't do anything

special
to cause it.

Thanks
C.Fleury


Nov 19 '05 #3
How is defined this structure ? In a module ?

Just to make it clear (english is not my native language) do you mean that
you see the same values accross several wstations or do you mean values on a
particular workstations are kept intact when you postback ? My understanding
is that you see the first behavior (values seemed to be "shared" accross
several workstations).

Patrice

--

"cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de
news:EA**********************************@microsof t.com...
Patrice,

All objects are unbound textboxes in which the user enters data manually.I
do have this code in my "page_load" event, which retains the form values in between postbacks, in this case "sys" is a public structure:

If Not IsPostBack Then
txb1.Text = IIf(Empty(sys._1), "0", sys._1)
txb2.Text = IIf(Empty(sys._2), "0", sys._2)
txb5.Text = IIf(Empty(sys._5), "0", sys._5)
txb10.Text = IIf(Empty(sys._10), "0", sys._10)
txb20.Text = IIf(Empty(sys._20), "0", sys._20)
txb50.Text = IIf(Empty(sys._50), "0", sys._50)
txb100.Text = IIf(Empty(sys._100), "0", sys._100)
txbCoins.Text = IIf(Empty(sys._Coins), "0", sys._Coins)
End If

Thanks Patrice
C.Fleury
"Patrice" wrote:
What values ? (form fields value ?). From where are coming those values in your application ?

Most often when you have the same values on several wstations this is
because you used shared (or a VB.NET module) (or static in C#) members... Is this the case ?

Patrice

--

"cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de
news:05**********************************@microsof t.com...
I have an ASP.NET web form that is retaining values over different

stations
on the network, how can I stop this behavior ?. I didn't do anything

special
to cause it.

Thanks
C.Fleury


Nov 19 '05 #4
The first behavior, Patrice, the same values are seem across all wstations...
Thanks
C.Fleury

"Patrice" wrote:
How is defined this structure ? In a module ?

Just to make it clear (english is not my native language) do you mean that
you see the same values accross several wstations or do you mean values on a
particular workstations are kept intact when you postback ? My understanding
is that you see the first behavior (values seemed to be "shared" accross
several workstations).

Patrice

--

"cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de
news:EA**********************************@microsof t.com...
Patrice,

All objects are unbound textboxes in which the user enters data manually.I
do have this code in my "page_load" event, which retains the form values

in
between postbacks, in this case "sys" is a public structure:

If Not IsPostBack Then
txb1.Text = IIf(Empty(sys._1), "0", sys._1)
txb2.Text = IIf(Empty(sys._2), "0", sys._2)
txb5.Text = IIf(Empty(sys._5), "0", sys._5)
txb10.Text = IIf(Empty(sys._10), "0", sys._10)
txb20.Text = IIf(Empty(sys._20), "0", sys._20)
txb50.Text = IIf(Empty(sys._50), "0", sys._50)
txb100.Text = IIf(Empty(sys._100), "0", sys._100)
txbCoins.Text = IIf(Empty(sys._Coins), "0", sys._Coins)
End If

Thanks Patrice
C.Fleury
"Patrice" wrote:
What values ? (form fields value ?). From where are coming those values in your application ?

Most often when you have the same values on several wstations this is
because you used shared (or a VB.NET module) (or static in C#) members... Is this the case ?

Patrice

--

"cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de
news:05**********************************@microsof t.com...
> I have an ASP.NET web form that is retaining values over different
stations
> on the network, how can I stop this behavior ?. I didn't do anything
special
> to cause it.
>
> Thanks
> C.Fleury
>


Nov 19 '05 #5
And how is defined this structure ????

Patrice

--

"cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de
news:0D**********************************@microsof t.com...
The first behavior, Patrice, the same values are seem across all wstations... Thanks
C.Fleury

"Patrice" wrote:
How is defined this structure ? In a module ?

Just to make it clear (english is not my native language) do you mean that you see the same values accross several wstations or do you mean values on a particular workstations are kept intact when you postback ? My understanding is that you see the first behavior (values seemed to be "shared" accross
several workstations).

Patrice

--

"cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de
news:EA**********************************@microsof t.com...
Patrice,

All objects are unbound textboxes in which the user enters data manually.I do have this code in my "page_load" event, which retains the form values
in
between postbacks, in this case "sys" is a public structure:

If Not IsPostBack Then
txb1.Text = IIf(Empty(sys._1), "0", sys._1)
txb2.Text = IIf(Empty(sys._2), "0", sys._2)
txb5.Text = IIf(Empty(sys._5), "0", sys._5)
txb10.Text = IIf(Empty(sys._10), "0", sys._10)
txb20.Text = IIf(Empty(sys._20), "0", sys._20)
txb50.Text = IIf(Empty(sys._50), "0", sys._50)
txb100.Text = IIf(Empty(sys._100), "0", sys._100)
txbCoins.Text = IIf(Empty(sys._Coins), "0", sys._Coins)
End If

Thanks Patrice
C.Fleury
"Patrice" wrote:

> What values ? (form fields value ?). From where are coming those
values in
> your application ?
>
> Most often when you have the same values on several wstations this

is > because you used shared (or a VB.NET module) (or static in C#)

members... Is
> this the case ?
>
> Patrice
>
>
>
> --
>
> "cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de > news:05**********************************@microsof t.com...
> > I have an ASP.NET web form that is retaining values over different
> stations
> > on the network, how can I stop this behavior ?. I didn't do anything > special
> > to cause it.
> >
> > Thanks
> > C.Fleury
> >
>
>
>


Nov 19 '05 #6
In a module as public like:

Public Structure _sys
Public _1 As String
Public _2 As String
Public _5 As String
Public _10 As String
Public _20 As String
Public _50 As String
Public _100 As String
Public _Coins As String
End Structure

Public sys As _sys

and then I use that structure in the aspx in question the following way:

If Not IsPostBack Then
' values were assigned to sys in an onclick event handler....
txb1.Text = IIf(Empty(sys._1), "0", sys._1)
txb2.Text = IIf(Empty(sys._2), "0", sys._2)
txb5.Text = IIf(Empty(sys._5), "0", sys._5)
txb10.Text = IIf(Empty(sys._10), "0", sys._10)
txb20.Text = IIf(Empty(sys._20), "0", sys._20)
txb50.Text = IIf(Empty(sys._50), "0", sys._50)
txb100.Text = IIf(Empty(sys._100), "0", sys._100)
txbCoins.Text = IIf(Empty(sys._Coins), "0", sys._Coins)
End If

Thanks again Patrice
C.Fleury

"Patrice" wrote:
And how is defined this structure ????

Patrice

--

"cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de
news:0D**********************************@microsof t.com...
The first behavior, Patrice, the same values are seem across all

wstations...
Thanks
C.Fleury

"Patrice" wrote:
How is defined this structure ? In a module ?

Just to make it clear (english is not my native language) do you mean that you see the same values accross several wstations or do you mean values on a particular workstations are kept intact when you postback ? My understanding is that you see the first behavior (values seemed to be "shared" accross
several workstations).

Patrice

--

"cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de
news:EA**********************************@microsof t.com...
> Patrice,
>
> All objects are unbound textboxes in which the user enters data manually.I > do have this code in my "page_load" event, which retains the form values in
> between postbacks, in this case "sys" is a public structure:
>
> If Not IsPostBack Then
> txb1.Text = IIf(Empty(sys._1), "0", sys._1)
> txb2.Text = IIf(Empty(sys._2), "0", sys._2)
> txb5.Text = IIf(Empty(sys._5), "0", sys._5)
> txb10.Text = IIf(Empty(sys._10), "0", sys._10)
> txb20.Text = IIf(Empty(sys._20), "0", sys._20)
> txb50.Text = IIf(Empty(sys._50), "0", sys._50)
> txb100.Text = IIf(Empty(sys._100), "0", sys._100)
> txbCoins.Text = IIf(Empty(sys._Coins), "0", sys._Coins)
> End If
>
> Thanks Patrice
> C.Fleury
>
>
> "Patrice" wrote:
>
> > What values ? (form fields value ?). From where are coming those values in
> > your application ?
> >
> > Most often when you have the same values on several wstations this is > > because you used shared (or a VB.NET module) (or static in C#)
members... Is
> > this the case ?
> >
> > Patrice
> >
> >
> >
> > --
> >
> > "cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de > > news:05**********************************@microsof t.com...
> > > I have an ASP.NET web form that is retaining values over different
> > stations
> > > on the network, how can I stop this behavior ?. I didn't do anything > > special
> > > to cause it.
> > >
> > > Thanks
> > > C.Fleury
> > >
> >
> >
> >


Nov 19 '05 #7
The problem is that this structure is defined in a module. In VB.NET a
module is implemented as a class with shared members.

The "Shared" keyword allows to define members that belong to a class (or if
you prefer that are the same for all objects). In ASP.NET, even though you
have multiple users, this is a single application. As a result all users are
sharing the same structure.

Patrice

--

"cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de
news:01**********************************@microsof t.com...
In a module as public like:

Public Structure _sys
Public _1 As String
Public _2 As String
Public _5 As String
Public _10 As String
Public _20 As String
Public _50 As String
Public _100 As String
Public _Coins As String
End Structure

Public sys As _sys

and then I use that structure in the aspx in question the following way:

If Not IsPostBack Then
' values were assigned to sys in an onclick event handler....
txb1.Text = IIf(Empty(sys._1), "0", sys._1)
txb2.Text = IIf(Empty(sys._2), "0", sys._2)
txb5.Text = IIf(Empty(sys._5), "0", sys._5)
txb10.Text = IIf(Empty(sys._10), "0", sys._10)
txb20.Text = IIf(Empty(sys._20), "0", sys._20)
txb50.Text = IIf(Empty(sys._50), "0", sys._50)
txb100.Text = IIf(Empty(sys._100), "0", sys._100)
txbCoins.Text = IIf(Empty(sys._Coins), "0", sys._Coins)
End If

Thanks again Patrice
C.Fleury

"Patrice" wrote:
And how is defined this structure ????

Patrice

--

"cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de
news:0D**********************************@microsof t.com...
The first behavior, Patrice, the same values are seem across all

wstations...
Thanks
C.Fleury

"Patrice" wrote:

> How is defined this structure ? In a module ?
>
> Just to make it clear (english is not my native language) do you mean
that
> you see the same values accross several wstations or do you mean
values on a
> particular workstations are kept intact when you postback ? My

understanding
> is that you see the first behavior (values seemed to be "shared"
accross > several workstations).
>
> Patrice
>
> --
>
> "cFleury" <cF*****@discussions.microsoft.com> a écrit dans le message de > news:EA**********************************@microsof t.com...
> > Patrice,
> >
> > All objects are unbound textboxes in which the user enters data

manually.I
> > do have this code in my "page_load" event, which retains the form

values
> in
> > between postbacks, in this case "sys" is a public structure:
> >
> > If Not IsPostBack Then
> > txb1.Text = IIf(Empty(sys._1), "0", sys._1)
> > txb2.Text = IIf(Empty(sys._2), "0", sys._2)
> > txb5.Text = IIf(Empty(sys._5), "0", sys._5)
> > txb10.Text = IIf(Empty(sys._10), "0", sys._10)
> > txb20.Text = IIf(Empty(sys._20), "0", sys._20)
> > txb50.Text = IIf(Empty(sys._50), "0", sys._50)
> > txb100.Text = IIf(Empty(sys._100), "0", sys._100)
> > txbCoins.Text = IIf(Empty(sys._Coins), "0", sys._Coins) > > End If
> >
> > Thanks Patrice
> > C.Fleury
> >
> >
> > "Patrice" wrote:
> >
> > > What values ? (form fields value ?). From where are coming those

values
> in
> > > your application ?
> > >
> > > Most often when you have the same values on several wstations this is
> > > because you used shared (or a VB.NET module) (or static in C#)
> members... Is
> > > this the case ?
> > >
> > > Patrice
> > >
> > >
> > >
> > > --
> > >
> > > "cFleury" <cF*****@discussions.microsoft.com> a écrit dans le

message de
> > > news:05**********************************@microsof t.com...
> > > > I have an ASP.NET web form that is retaining values over

different > > > stations
> > > > on the network, how can I stop this behavior ?. I didn't do

anything
> > > special
> > > > to cause it.
> > > >
> > > > Thanks
> > > > C.Fleury
> > > >
> > >
> > >
> > >
>
>
>


Nov 19 '05 #8

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

Similar topics

11
by: r0adhog | last post by:
First off wanted to that all that replied to my previous questions, you were much help. Had a couple of general questions. Why has everyone suggested not using VB Script on the Client Side? ...
0
by: Ewok | last post by:
Im having trouble getting the values of form fields when the form is in an included user control form01.ascx is loaded via loadcontrol in a select case statement in the main page and everything...
2
by: Sean | last post by:
Greetings all, I am attempting to make a form that will filter through several tables that (I believe) have refretial integrity. I am pulling data from several tables into the form and i would...
2
by: julk | last post by:
hi im kind of new to C#. i am doing a Ritch text editor dll, for a webform that im going to need. the components runs fine it does all it need to do, and exposes all the properties i need it to...
2
by: cFleury | last post by:
This system works in a intranet w/ some 200 stations and this particular form is retaining its values among different stations...like if I enter some values in the form on station 1 walk to station...
3
by: Ivan | last post by:
Thanks to answer topic previous!!!! I use this script to update one table MERGE INTO EIS.CLI_HISTORY TXN USING EIS.CLI_MAPING CLI ON TXN.CLIENTID = CLI.CLIENTID WHEN MATCHED AND...
11
by: npm | last post by:
Hi, I'm trying to add an IF statement to this javascript that will select/display only those xml nodes either with a certain attribute or attribute value. Here's my xml code: <stations>...
1
by: mirandacascade | last post by:
1) Module1 has the following delcaration: Public g_frmZZZ as Form Public g_txtForm2 as Variant 2) app has two forms: form1 and form2 3) a command button on form1 opens form2; it also has...
9
by: student4lifer | last post by:
Hello, could someone show me how to make sticky form with dynamically generated form element? for example, if one likes to make the dynamically generated check box (and its name) 'sticky' that...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.