Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Passing Values Between Web Forms Pages

Reply
Thread Tools

Passing Values Between Web Forms Pages

 
 
cgia
Guest
Posts: n/a
 
      07-25-2003
I am porting an old client/server application to asp.net. I used to
retrieve data into local tables (Paradox table-files on the client's
disk) and work on them before saving them back to the server. What is
the approach for this in asp.net? The comments in MSDN on using the
session object are scary, imagining that several users at the same
time will use plenty of space on the server's memory! Or is it
realistic to memorize the data in a page and access them from the
following pages?
Thank for your help!
 
Reply With Quote
 
 
 
 
S. Justin Gengo
Guest
Posts: n/a
 
      07-25-2003
There are a lot of options to transferring values between pages: Session
like you've mentioned, The querystring (of course), But you may want to look
into Server.Transfer and the Context Object.

I hope this leads you in the right direction.

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"cgia" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I am porting an old client/server application to asp.net. I used to
> retrieve data into local tables (Paradox table-files on the client's
> disk) and work on them before saving them back to the server. What is
> the approach for this in asp.net? The comments in MSDN on using the
> session object are scary, imagining that several users at the same
> time will use plenty of space on the server's memory! Or is it
> realistic to memorize the data in a page and access them from the
> following pages?
> Thank for your help!



 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      07-25-2003
You can add objects to the HttpContext of the current Page, and then use
Server.Transfer to transfer to the next page. The HttpContext is transferred
as well, and you can pull the data from the original page out of that.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big things are made up of
lots of little things.

"cgia" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I am porting an old client/server application to asp.net. I used to
> retrieve data into local tables (Paradox table-files on the client's
> disk) and work on them before saving them back to the server. What is
> the approach for this in asp.net? The comments in MSDN on using the
> session object are scary, imagining that several users at the same
> time will use plenty of space on the server's memory! Or is it
> realistic to memorize the data in a page and access them from the
> following pages?
> Thank for your help!



 
Reply With Quote
 
Steve C. Orr, MCSD
Guest
Posts: n/a
 
      07-25-2003
Here's a nice, simple way to pass values from one page to another:
(VB.NET code)

'Add data to the context object before transferring
Context.Items("myParameter") = x
Server.Transfer("WebForm2.aspx")

Then, in WebForm2.aspx:

'Grab data from the context property
Dim x as Integer = CType(Context.Items("myParameter"),Integer)

Of course there are a number of ways to pass values from one page to
another, such as using the querystring, cookies, session,
context, saving to a temporary table in the database between each page, etc.
You'll have to decide which technique is best for your application.
Here are several good articles on the subject to help you decide.
http://msdn.microsoft.com/msdnmag/is...e/default.aspx

http://www.aspalliance.com/kenc/passval.aspx

http://www.dotnetjunkies.com/tutoria...tutorialid=600

http://www.dotnetbips.com/displayarticle.aspx?id=79

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net


"cgia" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I am porting an old client/server application to asp.net. I used to
> retrieve data into local tables (Paradox table-files on the client's
> disk) and work on them before saving them back to the server. What is
> the approach for this in asp.net? The comments in MSDN on using the
> session object are scary, imagining that several users at the same
> time will use plenty of space on the server's memory! Or is it
> realistic to memorize the data in a page and access them from the
> following pages?
> Thank for your help!



 
Reply With Quote
 
cgia
Guest
Posts: n/a
 
      07-26-2003
Actually what I want to transfer between forms is huge tables... do
you think it is appropriate to use the server.transfer?



http://www.velocityreviews.com/forums/(E-Mail Removed) (cgia) wrote in message news:<(E-Mail Removed). com>...
> I am porting an old client/server application to asp.net. I used to
> retrieve data into local tables (Paradox table-files on the client's
> disk) and work on them before saving them back to the server. What is
> the approach for this in asp.net? The comments in MSDN on using the
> session object are scary, imagining that several users at the same
> time will use plenty of space on the server's memory! Or is it
> realistic to memorize the data in a page and access them from the
> following pages?
> Thank for your help!

 
Reply With Quote
 
Steve C. Orr, MCSD
Guest
Posts: n/a
 
      07-26-2003
Yes, that seems like one of the more efficient solutions for this particular
problem.

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net


"cgia" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Actually what I want to transfer between forms is huge tables... do
> you think it is appropriate to use the server.transfer?
>
>
>
> (E-Mail Removed) (cgia) wrote in message

news:<(E-Mail Removed). com>...
> > I am porting an old client/server application to asp.net. I used to
> > retrieve data into local tables (Paradox table-files on the client's
> > disk) and work on them before saving them back to the server. What is
> > the approach for this in asp.net? The comments in MSDN on using the
> > session object are scary, imagining that several users at the same
> > time will use plenty of space on the server's memory! Or is it
> > realistic to memorize the data in a page and access them from the
> > following pages?
> > Thank for your help!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing values between HTML forms robkiolbasa Javascript 2 02-12-2007 03:55 PM
Passing values between forms Mani P.S via .NET 247 ASP .Net 2 04-01-2005 04:23 PM
Passing values between web pages which are in different Web Sites Shankar Ayyachamy ASP .Net 4 01-28-2005 03:32 PM
Passing server control values between pages Greg Decos ASP .Net 2 04-15-2004 03:17 AM
Passing Server Control Values Between Pages Matt M ASP .Net 1 08-28-2003 12:56 AM



Advertisments