Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 24th, 2004, 06:41 AM
Friend of Wrox
 
Join Date: Sep 2003
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.

 
Old September 25th, 2004, 12:13 PM
Friend of Wrox
 
Join Date: Jul 2004
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.:)
 
Old September 26th, 2004, 09:05 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
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.





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.