473,657 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Storing/passing variables

Hi,

I work in Visual Basic .NET 2002 using ASP.NET.
I am wondering what would be the best way to store/pass variables
between pages.
(Sessions are sooo simple to use but I hear they are not the best....).
Having a class with static parameters????
Having a class that all the pages inherit???
(These last 2 ideas are coming from the news group but I do not quite
understand them).

Thanks,

Carly

May 1 '06 #1
1 1494
There isn't a best way, unfortunately its whats best for your application.
I like session, as long as its not going to be used really heavily its
perfect and very easy, you need to consider the amount of data stored and
the potential traffic to the site so you dont end up limiting your sites
performance. I prefer to use Public Property Values if I dont have much to
data to work with. Of course it gets more complicated if your passing
values between applications as well as pages.

Good read here to help you.
http://msdn2.microsoft.com/en-us/library/6c3yckfw.aspx

--
Regards

John Timney
Microsoft MVP

"Carly" <ca*******@hotm ail.com> wrote in message
news:11******** **************@ v46g2000cwv.goo glegroups.com.. .
Hi,

I work in Visual Basic .NET 2002 using ASP.NET.
I am wondering what would be the best way to store/pass variables
between pages.
(Sessions are sooo simple to use but I hear they are not the best....).
Having a class with static parameters????
Having a class that all the pages inherit???
(These last 2 ideas are coming from the news group but I do not quite
understand them).

Thanks,

Carly

May 1 '06 #2

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

Similar topics

4
3591
by: Amr Mostafa | last post by:
Hello :) I'm trying to write a script that deals with a web service. I'm using NuSoap class. my question is : Can I pass some variables By Reference to the web service and get the result back in my variables ?? note1: I'm not the one who wrote the web service.. so I can't modify
7
1683
by: pescott | last post by:
I am still struggling to get some files uploaded to a database as BLOB data. I have 5 includes which allows the user to upload 5 files, numbered accordingly. However, there are script errors. Duhh, why else would I post? Well, here goes: CODE $adres = trim (htmlspecialchars($_POST)); $verkocht = trim (htmlspecialchars($_POST)); $form_description1 = trim (htmlspecialchars($_POST));
4
8527
by: Jason Us | last post by:
Does anyone have experience with passing variables from an ASP page to a JSP page. The way it currently works in passing the SSN in the URL. This cannot be good. I thought that storing a unique session ID in a cookie and referencing the SSN from the Session ID would be the correct way to do this. But since we have two separate servers, IIS and Websphere, how do we coordinate the session ID?
3
14928
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) { document.images.src = eval("mt" +menu+ ".src") } alert("imgOff_hidemenu"); hideMenu=setTimeout('Hide(menu,num)',500);
5
6684
by: Jack | last post by:
Hi, I need to pass multple variables in a link in order to go to a asp page with the two varables. The following are the values of the variables using response.write: <%'Response.Write Mypage & "<br>"%> Exp <%'Response.Write GrantID & "<br>"%>
2
2023
by: Mark Hannon | last post by:
I am trying to wrap my brain around storing form elements inside variables & arrays before I move on to a more complicated project. I created this simple example to experiment and as far as I can tell, it should work but it doesn't. Can someone tell me where I went wrong? <html><head> <title>Form Test</title> <script language="JavaScript> <!-- function copy(){
12
2677
by: Andrew Bullock | last post by:
Hi, I have two classes, A and B, B takes an A as an argument in its constructor: A a1 = new A(); B b = new B(a1);
0
227
by: Carly | last post by:
Hi, I work in Visual Basic .NET 2002 using ASP.NET. I am wondering what would be the best way to store/pass variables between pages. (Sessions are sooo simple to use but I hear they are not the best....). Having a class with static parameters???? Having a class that all the pages inherit??? (These last 2 ideas are coming from the news group but I do not quite understand them).
9
1168
by: =?Utf-8?B?SmFzb24gSGFydHNvZQ==?= | last post by:
I have a sub routine that's passing in a variable. I need to take that variable and store it globally...but here's what's happening. ex: I'm executing my routine: doMyThing(path, "test") I'm executing that command at least 10 times replacing the word test with my next object. When im receving that variable: Sub doMyThing(ByVal Path As String, ByVal other As String) I can use my variable...now how can I take that variable from this sub...
0
8402
marktang
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...
0
8734
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8508
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8608
tracyyun
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...
1
6172
isladogs
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...
0
4164
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...
1
2733
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
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1627
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.