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

Module in VB.net webproject

Cor
Hi,
I was trying to make a nice example for Luís Serpa when something happened
that I found strange.
Who can tell me what I do wrong.

I made a normal Webform class with the IDE so automatic an Aspx page (but
that is not important for this question)
I made:
- A button and a textbox on the form;
- A module with a public string variable;
- The button was used to append a string in the textbox.

And then it happened: I was always thinking that I only could use "session"
information or a database or whatever. No the data did stay in the string
variable every time and when I did a push on the button the string became
longer and longer.

I stopped the debug session and started again. The magic was there, the old
value from the variable showed up.
I made an extra button, to stop the session with session.abandon, no
success.
I added session.clear, no success.
I waited 1 minute, and yes it was cleared. I tried this different times and
the string was cleaned, but for me at unpredictable times.
I made a test with a session.item that I loaded with the first button and
with that there was no problem, it was nice cleaned with the session.clean
every time I pushed the extra button.

Is this normal behaviour or am I doing something wrong.
(It looks if the dll stays alive and is picked up again with the next
visit).

(Visual Studio Net 2003 I did test it too with IE 6.0)

Thank you.
Cor



Nov 20 '05 #1
6 4745
Hi Cor,

And I quote:

Are you sure this is a Visual Basic Studio Net Language question?

This is a VB.net languages group

.. for items about a webserver you can get more
information in the the asp.net group

news://msnews.microsoft.com/microsof...amework.aspnet

Regards,
Fergus

LMAO :-D
Nov 20 '05 #2
Hi Cor,

This is what I understand.

The normal behaviour (and one of the things that MS blows its aspx
trumpets about) is that runat=server controls persist their values.

So each time you press the button, the Module string is appended to the
TextBox text. and it is the TextBox text that is growing, not the Module
string.

When the session times out, the TextBox is reset, as you have found. The
unpredictability is simply that computers can't count :-).

I have no idea why your forced session abandon and clear failed to work.

Regards,
Fergus
Nov 20 '05 #3
Cor
Yes Fergus,
Absolutly :-)
Cor
Nov 20 '05 #4
Cor
Fergus,
Thanks but I think not, at every webpage load VB.Net normaly resets
everything.
It happens like this.
I start IE the textbox is empty
I push sometimes and the pages is every time reloaded with a value from the
mod say till 11111
I put in the label on the same time from a session.item("X) that I have
filled with "This is a VB.net language application"
I have a button to stop the session and to clear the session
I close by hand IE
Do not put of the power
I start IE
On the label is nothing
In the textbox = 11111
I think that is magic
Cor
Nov 20 '05 #5
Hi Cor,

|| I put in the label on the same time from a
|| session.item("X) that I have filled with
|| "This is a VB.net language application"

LOL.

I'd like to have a play. Could you post me a zip of the project (direct to
me if not to the newsgroup) ?

Regards,
Fergus

ps. I'm going out just now and won't reply for a while.
Nov 20 '05 #6
Cor
Hi Fergus,
I had arranged it all to send to you, but I want to do some investigation
myself first.
At the moment I think that the module is only cleaned by stopping the Web
server or a new build or rebuild of the program and not by the end of the
session.
I want to see too if it is totally public or only public for the user who
started it but that takes some time.
Maybe I need the asp.net group. Maybe they can tell me all about the
lifetime of a VB.net module in asp.net :-))))
There is something on msdn in a chat, but in my opinion that says that it
ends by the end of the program.
But it is not direct written in that ways, maybe you can look if I
misunderstand it.
You can too interpret it as when the program ends in memory.
It is a chat and I suppose you can better see those little things in words
than I.
Keywords for the search on msdn are "module" and "lifetime".
There are only two topics then you see it direct.
You have to search in the chattext again for "module"
Thanks I hope it was a pleasant evening for you.
Cor

Nov 20 '05 #7

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

Similar topics

8
by: Bo Peng | last post by:
Dear list, I am writing a Python extension module that needs a way to expose pieces of a big C array to python. Currently, I am using NumPy like the following: PyObject* res =...
0
by: Nina | last post by:
Hello I have just installed my Visual Studio .net, and are trying to open some downloaded projects (part of a single solution). I would appreciate any help you could give me. The problem is...
1
by: Paul van Brenk | last post by:
Not sure if this is the right newsgroup, but it's the best I can find. Is there a way to have the new webserver host the files without a virtual directory? Right now the following happens: ...
0
by: Gabriël | last post by:
Hi Folks, I've got 1 project (generated code) with the datalayer 1 one with the webapplication. The web app uses the data project. I now want to make stand alone local reports and use them...
1
by: Friso Wiskerke | last post by:
Hi All, We've got an VS.2003 ASPNET (VB) webproject which we would like to convert to VS.2005 so that we can make use of the Master Page feature. Converting the initial pages to 2005 is not such...
0
by: Anubhav Jain | last post by:
Hi, I am creating a visual studio template in VS.Net 2005. It contains webproject or website as one of the project. I am successfully abele to add the references into the other project. using...
1
by: Hans Kesting | last post by:
Hi, Since I installed IE7, I regularly get a timeout while loading a web-project (using VS2003). A "reload" command (right-mouse on the webproject) solves this, but it is annoying. Does anyone...
0
by: Mayer, Stefan | last post by:
How can i compile a whole Webproject (mixed C# ans VB.net) on a production server and disable on-demand-Compilation? Tnx, Stefan
0
by: Fredrik Lundh | last post by:
Jeff Dyke wrote: so how did that processing use the "mymodulename" name? the calling method has nothing to do with what's considered to be a local variable in the method being called, so...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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...
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.