473,408 Members | 1,951 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,408 software developers and data experts.

Passing a javascript array to a handler .ashx

JJ
I am using a handler (processImage.ashx) to display an image. The image is
displayed according to parameters passed in the querystring. The handerl is
called via some clientside javascript.

I want to send an array of unknown length to the handler. I am not sure
whether the querystring is the best place to do this. What's the best way to
send an array held in the client side javascript to the handler?

Thanks in advance,
JJ
Nov 19 '07 #1
3 5765
you can not post an image request, so the url is the only option other than a
prelimary ajax call. the url is restricted to about 2k. how you encode the
array depends on the array type. the most common is a array.join('|'), with a
matching split on the server side.

-- bruce (sqlwork.com)
"JJ" wrote:
I am using a handler (processImage.ashx) to display an image. The image is
displayed according to parameters passed in the querystring. The handerl is
called via some clientside javascript.

I want to send an array of unknown length to the handler. I am not sure
whether the querystring is the best place to do this. What's the best way to
send an array held in the client side javascript to the handler?

Thanks in advance,
JJ
Nov 19 '07 #2
JJ
How would I do the prelimary ajax call?

Thanks,
JJ
"bruce barker (sqlwork.com)"
<br*******************@discussions.microsoft.comwr ote in message
news:C8**********************************@microsof t.com...
you can not post an image request, so the url is the only option other
than a
prelimary ajax call. the url is restricted to about 2k. how you encode the
array depends on the array type. the most common is a array.join('|'),
with a
matching split on the server side.

-- bruce (sqlwork.com)
"JJ" wrote:
>I am using a handler (processImage.ashx) to display an image. The image
is
displayed according to parameters passed in the querystring. The handerl
is
called via some clientside javascript.

I want to send an array of unknown length to the handler. I am not sure
whether the querystring is the best place to do this. What's the best way
to
send an array held in the client side javascript to the handler?

Thanks in advance,
JJ

Nov 20 '07 #3
Hi JJ,

I think Bruce means you should pass the image urls(or any array parameters)
either through url querystring or through AJAX xmlhttp request. Directly
manipulate binary content of image is not quite supported in client script
and also not effecient to pass such large content frequently.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "JJ" <ab*@xyz.com>
Subject: Re: Passing a javascript array to a handler .ashx
Date: Tue, 20 Nov 2007 10:55:18 -0000
>How would I do the prelimary ajax call?

Thanks,
JJ
"bruce barker (sqlwork.com)"
<br*******************@discussions.microsoft.comw rote in message
news:C8**********************************@microso ft.com...
>you can not post an image request, so the url is the only option other
than a
prelimary ajax call. the url is restricted to about 2k. how you encode
the
>array depends on the array type. the most common is a array.join('|'),
with a
matching split on the server side.

-- bruce (sqlwork.com)
"JJ" wrote:
>>I am using a handler (processImage.ashx) to display an image. The image
is
displayed according to parameters passed in the querystring. The
handerl
>>is
called via some clientside javascript.

I want to send an array of unknown length to the handler. I am not sure
whether the querystring is the best place to do this. What's the best
way
>>to
send an array held in the client side javascript to the handler?

Thanks in advance,
JJ


Nov 21 '07 #4

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

Similar topics

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...
2
by: Stanislav Ostachevski | last post by:
Hello, My app needs to map calls to "virtual files" to ASPX parametrized pages, without showing user actual page address. I.e, I want to catch calls to...
2
by: Bart Adriaanse | last post by:
As VS.NET is not being very supportive in creating a ASHX http handler, i would like to use a codebehind VB file as to get intellisense features etc on it's code. I just cannot get ashx to work...
0
by: JJ | last post by:
I am trying to use .ashx files to handle dynamic image requests. The aspx page needs to pass the data to the ashx file. It was decided to not use the query string. Instead we hoped we could use the...
4
by: s.bussing | last post by:
Hi All, I'm new to Atlas and I did some programming using AJAX, but I'm wondering if it is possible to hava a javascript which can call a server-site function, in my case to write data to the...
4
by: MarkusJNZ | last post by:
Hi, I am trying to pass an number from a classic asp webpage to a .NET webservice. Because my C# webservice expects an integer and classic ASP uses variants I keep getting problems with object...
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....
4
by: simon | last post by:
hi, I would like to separate my javascript completely from my xhtml. in the end there should be only <script type="text/javascript" src="javalib.js"></script> in the head-tag to my javascript....
6
by: =?Utf-8?B?cHJhZGVlcF9UUA==?= | last post by:
I am trying to create a simple HTTP handler in ASP.net 2.0. I am using VS 2005. I am trying to handle a custom extension file givein in the URL. I have also created the following entry in the...
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?
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
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,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.