Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 15th, 2003, 01:43 PM
Registered User
 
Join Date: Oct 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Accessing Server Side Data on Client Side

How do you access data gathered on the server side (by any means, whether it be from a database, or other means) from the client side?
Especially within event handlers on the client side? I would think this would be a very desireble need, yet I can't find anything on it
specifically. Maybe you can't.

My knowledge at this point is access as far as Session variables, application variables, page and function scope.

Here is an excellent example: you query data from a database, obviously on the server side. Now, how would you access this data on the client side. I am leaving this as a very broad question on purpose.

Reply With Quote
  #2 (permalink)  
Old October 15th, 2003, 02:40 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You can't access anything from the client to the server apart from requesting a page if you are using only the browser. You need to pass everything you expect to need to the client by means of HTML: hidden form elements, javascript variables/arrays, etc. Then when you have client side events, you can have javascript access that data.

Alternatively you can use ActiveX objects or Java applets that get downloaded to and run at the broser.

If you want to do something more fancy within the browser alone, you could build a frameset with a hidden frame and use that frame as a "talker" to the server. You can force posts or gets thru that frame, then the frame returns with javascript that provides data and the actions necessary for the event you called (populating HTML controls etc). This would make more of an application feel to a web page.

Session/application/page/function vars are all only within the scope of the server-side application. And remember that once the server is done processing one ASP, it's gone. And thus is the bane of the ASP programmers existence: the statelessness of the web.

Peter
Reply With Quote
  #3 (permalink)  
Old October 15th, 2003, 03:19 PM
Registered User
 
Join Date: Oct 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, I see what you are saying, that has been the most helpful response thus far. I like the idea about frames, I am still learning web developement and have not fully covered frames and dynamic html. My primary skills are in C++ and algorithm development and I was thinking is more along those lines.

Reply With Quote
  #4 (permalink)  
Old October 15th, 2003, 03:33 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Do some background reading on ASP so you can get familiar with the whole statelessness issue of web applications. When you have been writing desktop software it can be very hard to come to grips with the disconnected nature of a web app. There are plenty of intro and beginning books in the wrox/wiley/apress libraries that explain it. If you haven't yet gotten into ASP yet, you might concider starting with ASP.Net. Paticularly because you could jumpt right into the C# language (versus dealing with VBScript in ASP) and could cover one hurdle pretty quick.

Good luck!

Peter
Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Converting Client-side to Server-side Code kwilliams ASP.NET 2.0 Professional 1 November 21st, 2007 05:25 PM
Firing server side events at client side codes mehdi62b ASP.NET 1.0 and 1.1 Basics 6 May 18th, 2005 10:11 AM
sharing a server-side variable with client-side pigtail Javascript How-To 6 November 4th, 2004 02:01 AM
storing data client side Anjali VBScript 3 September 3rd, 2004 06:24 PM
Two Client Side vs Server Side issues Milo Classic ASP Professional 5 May 25th, 2004 03:47 PM



All times are GMT -4. The time now is 02:27 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.