473,473 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Passing Data Around in ASP.NET

I am an old ASP developer that has begun porting existing apps to ASP.NET.

I am currently working on a wizard dialog that contains about 4 pages. In
ASP in order to keep track of user entered data on the various wizard pages
I had to manually create hidden form fields and pass these between pages.
The form action either went to the next or previous page in the dialog,
depending on whether NEXT or BACK button was pressed. All validation was
done in client side script.

Should I emply the same techniques in ASP.NET, or is there a more efficient
way.

My initial thoughts were to write a custom class capable of storing the
wizard dialog info and instantiate it as session var. Whenever a dialog
button is clicked I will update this structure via a postback server event,
and then move onto the next/prev page using the Response.Redirect or
Response.Transfer.

Am I on the right track?

Thanks,

G.
Nov 18 '05 #1
2 1846
Glenn wrote:
I am an old ASP developer that has begun porting existing apps to ASP.NET.

I am currently working on a wizard dialog that contains about 4 pages. In
ASP in order to keep track of user entered data on the various wizard pages
I had to manually create hidden form fields and pass these between pages.
The form action either went to the next or previous page in the dialog,
depending on whether NEXT or BACK button was pressed. All validation was
done in client side script.

Should I emply the same techniques in ASP.NET, or is there a more efficient
way.

My initial thoughts were to write a custom class capable of storing the
wizard dialog info and instantiate it as session var. Whenever a dialog
button is clicked I will update this structure via a postback server event,
and then move onto the next/prev page using the Response.Redirect or
Response.Transfer.

Am I on the right track?

Thanks,

G.


Sounds like a good initial approach, a little more OO than your previous
ASP approach so a little cleaner. Another way I always try to see if it
will work initially, is to use one page with multiple panels, as panels
seem intuitively to lend themselves to this app beautifully (turn one
panel on, then after they enter, turn on the next, etc.). The only
problem is the size of ViewState. If the panels are complex or contain
a number of fields, the ViewState can get to be too much. But you could
also play with selectively enabling ViewState.

Then you don't have to pass anything from page to page....

So if this wouldn't cause ViewState problems, I'd look at using Panels.
Otherwise your approach seems to be just fine...

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #2
Hi Glenn,

Thank you for using MSDN Newsgroup. I am Luke and I am review this issue
currently. As I understand, your ASP.NET application is like Wizard which
need to keed data between pages. I think your initial thought about session
is the most common way can use. Besides this, we also can use Application
variant, Viewstate, cookies and hidden fields. If the data shared between
pages are not large, session varaint should be the most easiest way to
achieve.
Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #3

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

Similar topics

1
by: Paul | last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and session.use_trans_sid = 1 in my php.ini file. Index.php contains:...
27
by: Oscar | last post by:
I am looking for a way to pass an ADO recordset that has been retrieved in an ASP page to another HTML-page. Is there someone who can provide me with a small sample or a link to see how this is...
58
by: jr | last post by:
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of...
2
by: Curtis Justus | last post by:
Hi, I currently have a control that is on a form and I want to pass that exact instance of the control to another form (a child form that appears on a button click). The control has state,...
11
by: Arsen Vladimirskiy | last post by:
Hello, If I have a few simple classes to represent Entities such as Customers and Orders. What is the proper way to pass information to the Data Access Layer? 1) Pass the actual ENTITY to...
3
by: Simon Harvey | last post by:
Hi, In my application I get lots of different sorts of information from databases. As such, a lot of information is stored in DataSets and DataTable objects. Up until now, I have been passing...
4
by: Jack | last post by:
Hi, I have a hashtable that I need to pass around to different Business Objects. My question is it better to pass it and make a locale hashtable variable and set it equal to the passed hashtable...
22
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to...
11
by: Macca | last post by:
Hi, I'm writing an application that will pass a large amount of data between classes/functions. In C++ it was more efficient to send a pointer to the object, e.g structure rather than passing...
5
by: Markus Ernst | last post by:
Hello A class that composes the output of shop-related data gets some info from the main shop class. Now I wonder whether it is faster to store the info in the output class or get it from the...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
1
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...
0
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...
0
agi2029
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,...
1
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...
0
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...
0
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...

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.