473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Passing Arrays to Javascript

I am populating a Session array from a database query. I would like to
transfer this array to a javascript array to avoid going back to the server.
How?
Nov 18 '05 #1
3 1749
Hi

You can try Page.RegisterArrayDeclaration method in Page_Prerender Event. See reference at
http://msdn.microsoft.com/library/de...rationTopic.as

Bin Song, MC

----- hclarius wrote: ----

I am populating a Session array from a database query. I would like t
transfer this array to a javascript array to avoid going back to the server
How

Nov 18 '05 #2
Looks somewhat promising. I will play with the syntax.
Thanks.

"Bin Song, MCP" <an*******@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.com...
Hi,

You can try Page.RegisterArrayDeclaration method in Page_Prerender Event. See reference at: http://msdn.microsoft.com/library/de...ationTopic.asp
Bin Song, MCP

----- hclarius wrote: -----

I am populating a Session array from a database query. I would like to transfer this array to a javascript array to avoid going back to the server. How?

Nov 18 '05 #3
Actually, I created a string using String.Join("|",Arrayname), then passed
the string to a hidden fields value and then passed the string to javascript
and created an array using stringname.split("|");

Thanks

"Bin Song, MCP" <an*******@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.com...
Hi,

You can try Page.RegisterArrayDeclaration method in Page_Prerender Event. See reference at: http://msdn.microsoft.com/library/de...ationTopic.asp
Bin Song, MCP

----- hclarius wrote: -----

I am populating a Session array from a database query. I would like to transfer this array to a javascript array to avoid going back to the server. How?

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Judy M | last post by:
I am a Javascript Newbie, but have read two of the brick-sized books and read the deja section and FAQ's and didn't find my answer. I'm sure it is simple and apologize in advance, but here goes......
5
by: Andy Fish | last post by:
Hi, I have a HTML page with javascript in it which pops up another HTML page. I can pass simple variables fairly freely between the two pages. I can pass objects between them two, and I have...
12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
58
by: jr | last post by:
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of...
1
by: Alfredo Magallón Arbizu | last post by:
Hello, I need to pass the contents of a dataset to the client in order to use these contents with javascript. What is the best way to achieve that? Normally I use controls like a grid or...
3
by: Mark | last post by:
Hi From what I understand, you can pass arrays from classic ASP to .NET using interop, but you have to change the type of the.NET parameter to object. This seems to be because classic ASP passes...
1
by: Eric Capps | last post by:
This may be more of a Java question, but I feel that JavaScript experts may be more qualified to help me find a solution. In short: is it possible to call a Java method from JavaScript, passing...
41
by: Rene Nyffenegger | last post by:
Hello everyone. I am not fluent in JavaScript, so I might overlook the obvious. But in all other programming languages that I know and that have associative arrays, or hashes, the elements in...
4
by: Nathan Sokalski | last post by:
I am a beginner with AJAX, and have managed to learn how to use it when passing single parameters, but I want to return more than one value to the client-side JavaScript function that displays it....
3
by: Tarik Monem | last post by:
Hi Everyone, Still a newbie with FLEX, and I've passed arrays using AJAX to FLEX before, but I've never passed links to FLEX. Basically, this is the OUTPUT, which I wanted, but I'm given an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.