Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 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 December 25th, 2005, 11:03 AM
Registered User
Join Date: Dec 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing Javascript Variables to Asp.Net?

I can't seem to figure out how to pass a variable like an array from javascript variable to asp.net. Does anyone know how to do it?

Old December 27th, 2005, 05:46 PM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Are you talking about AJAX, or plain and simple posting back?

In the latter case, you could store the array's elements as a, say, comma separate list of values in a hidden form field that you can at the server to reconstruct a server-side array.


Imar Spaanjaars
Everyone is unique, except for me.
Old September 2nd, 2006, 05:06 AM
Registered User
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts


      Im also having trouble in passing object values from javascript to asp.net page with out posting back this will reduce some d/w u/p time in handling large size objects as I studied.
      Try search as serialization in javascript this may result some useful info.
      Please try to share with the forum any possible solutions if you got.

Old September 8th, 2006, 11:37 PM
Authorized User
Join Date: Apr 2005
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts

There isn't anyway to send info from Java to server without postback. Java is client side and asp.net C# or vb code is server side. Like someone posted real quick, if you want to eliminate postback you will have to do AJAX. I have wrote a few pages that would take variables from java and store them in my ASP.NET 2.0 session through using the xmlHttp object.
You can find sources out there to help you. If this interests you, Wrox has written a good AJAX beginning book I have read through.

Old September 8th, 2006, 11:52 PM
Registered User
Join Date: Aug 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts

I completely agree with Quick209 (I can't see his name).

Hitul J. Patel
Software Engineer

Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing Variables from Javascript/AJAX to VBScrip mperry Classic ASP Basics 3 November 12th, 2007 03:29 AM
Passing a ASP varible to a javascript tdaustin Classic ASP Basics 1 May 17th, 2005 01:44 AM
Passing PHP variables to javascript wfrisch Pro PHP 10 April 5th, 2005 05:13 AM
Passing Session Variables(ASP.NEt) to Jscript ank2go JSP Basics 1 February 26th, 2004 09:53 PM
equating javascript and ASP variables GregH Classic ASP Basics 3 July 3rd, 2003 02:42 AM

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