Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 24th, 2004, 06:41 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Whitstable, , United Kingdom.
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default posting back javascript data


Hi,

  I have a webpage that fires off a JavaScript function. This
  function can create a javascript array of strings ( ie
  a simple list).

  When a postback event is then fired - is it possible to send
  back this javascript data so that I can pick it up on the
  server side ? If so - how ? Or have I gone off track with the
  'best practice' on design and is there a more professional way ?

Cheers
Chas.

  #2 (permalink)  
Old September 25th, 2004, 12:13 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

can you ignore javascript?I think here you can work with server-side scripts much easier.


--------------------------------------------
Mehdi.:)
  #3 (permalink)  
Old September 26th, 2004, 09:05 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'll need to store the data in a form field. That's the way to get data back to the server when a postback occurs. Put the data in a hidden form field that you can access in the server side code. Keep in mind that you'll have to change the data into a simple string. So if you have an array of values, you'll need to change it into somelike like a character separated list that you'll then need to change back.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
ASP. Button Control not posting back innochig ASP.NET 1.0 and 1.1 Professional 16 January 15th, 2007 05:15 PM
Drop down list text value not posting back with co binici ASP.NET 2.0 Basics 0 December 12th, 2006 08:38 PM
Help: dropdownlist posting back gives random data vickeyurs ADO.NET 5 September 3rd, 2005 09:28 AM
onChange posting back to same page? busher Classic ASP Basics 1 March 1st, 2005 06:20 PM



All times are GMT -4. The time now is 11:34 PM.


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