473,387 Members | 1,463 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,387 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 1746
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.