473,729 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create a multi-dimensioned array in conventional ASP Javascript so that C# interop function can read it?

I am trying to create multi-dimensioned arrays in conventional ASP pages and
pass these arrays as arguments to functions that are in a C# interop
assembly. ASP complains because it doesn't recognize that the created array
is the same as the declared interface argument.

The C# function is expecting to receive a 2 dimensioned array and is
declared like this:
public object[] InteropFunc( string s1, object[] arValues );

What should the ASP side look like in order to call into the C# interop
function?
--
Richard Lewis Haggard
www.Haggard-And-Associates.com
Aug 3 '06 #1
5 2141
Richard,

And how are you expecting to pass that array to ASP.NET? The only way
you can do this is to set form values which will be passed on a post.

To that end, you can create a hidden field in your form which you set to
a string which you can then parse on the server side to recreate your array.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Richard Lewis Haggard" <HaggardAtWorld DotStdDotComwro te in message
news:OA******** ******@TK2MSFTN GP02.phx.gbl...
>I am trying to create multi-dimensioned arrays in conventional ASP pages
and pass these arrays as arguments to functions that are in a C# interop
assembly. ASP complains because it doesn't recognize that the created array
is the same as the declared interface argument.

The C# function is expecting to receive a 2 dimensioned array and is
declared like this:
public object[] InteropFunc( string s1, object[] arValues );

What should the ASP side look like in order to call into the C# interop
function?
--
Richard Lewis Haggard
www.Haggard-And-Associates.com

Aug 4 '06 #2
Easiest way will be change your asp to asp.net I think.

chanmm

"Richard Lewis Haggard" <HaggardAtWorld DotStdDotComwro te in message
news:OA******** ******@TK2MSFTN GP02.phx.gbl...
>I am trying to create multi-dimensioned arrays in conventional ASP pages
and pass these arrays as arguments to functions that are in a C# interop
assembly. ASP complains because it doesn't recognize that the created array
is the same as the declared interface argument.

The C# function is expecting to receive a 2 dimensioned array and is
declared like this:
public object[] InteropFunc( string s1, object[] arValues );

What should the ASP side look like in order to call into the C# interop
function?
--
Richard Lewis Haggard
www.Haggard-And-Associates.com

Aug 4 '06 #3
Thank you for your response. However, you've addressed a question that was
not asked. There's not the slightest bit of trouble returning an array from
the C# interop assembly to the ASP page. After all, from the ASP point of
view, the C# assembly is a COM server. That's the point of the interop
assembly. In any case, that was not my question. My question was going the
other way. How does one format up an array from an ASP page, using either
Javascript or VBScript or a combination of the two, such that the C# interop
can receive the array argument as type object[].

--
Richard Lewis Haggard
www.Haggard-And-Associates.com
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c omwrote in
message news:u5******** ******@TK2MSFTN GP02.phx.gbl...
Richard,

And how are you expecting to pass that array to ASP.NET? The only way
you can do this is to set form values which will be passed on a post.

To that end, you can create a hidden field in your form which you set
to a string which you can then parse on the server side to recreate your
array.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Richard Lewis Haggard" <HaggardAtWorld DotStdDotComwro te in message
news:OA******** ******@TK2MSFTN GP02.phx.gbl...
>>I am trying to create multi-dimensioned arrays in conventional ASP pages
and pass these arrays as arguments to functions that are in a C# interop
assembly. ASP complains because it doesn't recognize that the created
array is the same as the declared interface argument.

The C# function is expecting to receive a 2 dimensioned array and is
declared like this:
public object[] InteropFunc( string s1, object[] arValues );

What should the ASP side look like in order to call into the C# interop
function?
--
Richard Lewis Haggard
www.Haggard-And-Associates.com


Aug 4 '06 #4
Thank you for your response. While that is on the schedule for sometime next
year, I need to solve this problem now or they will bring in another
consultant who can. If you have some useful ideas on how an ASP page can
format up an array, using either Javascript or VBScript or a combination of
the two, such that the C# interop can receive the array argument as type
object[] then I'd be the high grateful recipient of such wisdom.
--
Richard Lewis Haggard
www.Haggard-And-Associates.com
"chanmm" <ch*****@hotmai l.comwrote in message
news:ex******** ******@TK2MSFTN GP04.phx.gbl...
Easiest way will be change your asp to asp.net I think.

chanmm

"Richard Lewis Haggard" <HaggardAtWorld DotStdDotComwro te in message
news:OA******** ******@TK2MSFTN GP02.phx.gbl...
>>I am trying to create multi-dimensioned arrays in conventional ASP pages
and pass these arrays as arguments to functions that are in a C# interop
assembly. ASP complains because it doesn't recognize that the created
array is the same as the declared interface argument.

The C# function is expecting to receive a 2 dimensioned array and is
declared like this:
public object[] InteropFunc( string s1, object[] arValues );

What should the ASP side look like in order to call into the C# interop
function?
--
Richard Lewis Haggard
www.Haggard-And-Associates.com


Aug 4 '06 #5
You weren't too specific about whether this call was being made on the
client side, or the server side. My assumption was on the client side,
hence my response.

If you are calling this from a server-side ASP.NET page, then you need
to change your interop declaration in such a way so that it matches the
number of dimensions that you are trying to pass ([,] for a two-dimensional
array, [,,] for three, etc, etc).

If this number is variable, then I believe you can declare it as Array,
but I don't know how well interop will handle that declaration.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Richard Lewis Haggard" <HaggardAtWorld DotStdDotComwro te in message
news:Og******** ********@TK2MSF TNGP05.phx.gbl. ..
Thank you for your response. However, you've addressed a question that was
not asked. There's not the slightest bit of trouble returning an array
from the C# interop assembly to the ASP page. After all, from the ASP
point of view, the C# assembly is a COM server. That's the point of the
interop assembly. In any case, that was not my question. My question was
going the other way. How does one format up an array from an ASP page,
using either Javascript or VBScript or a combination of the two, such that
the C# interop can receive the array argument as type object[].

--
Richard Lewis Haggard
www.Haggard-And-Associates.com
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c omwrote
in message news:u5******** ******@TK2MSFTN GP02.phx.gbl...
>Richard,

And how are you expecting to pass that array to ASP.NET? The only way
you can do this is to set form values which will be passed on a post.

To that end, you can create a hidden field in your form which you set
to a string which you can then parse on the server side to recreate your
array.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Richard Lewis Haggard" <HaggardAtWorld DotStdDotComwro te in message
news:OA******* *******@TK2MSFT NGP02.phx.gbl.. .
>>>I am trying to create multi-dimensioned arrays in conventional ASP pages
and pass these arrays as arguments to functions that are in a C# interop
assembly. ASP complains because it doesn't recognize that the created
array is the same as the declared interface argument.

The C# function is expecting to receive a 2 dimensioned array and is
declared like this:
public object[] InteropFunc( string s1, object[] arValues );

What should the ASP side look like in order to call into the C# interop
function?
--
Richard Lewis Haggard
www.Haggard-And-Associates.com



Aug 5 '06 #6

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

Similar topics

1
1405
by: Grahammer | last post by:
Is it possible to create a multi element property in VB.Net? Something similar to the "Location" or "Size" property. Each of these has two elements. I'm trying to create an IMAGE property that has four different elements. One for each state of a button. I would set the image for a normal button like this: MyButton.ButtonImage(ButtonStates.Normal) = imgButtons.Images(0)
0
1088
by: Eddie | last post by:
In Microsoft Access form, combo box can be binded to the table or query and can be shown as multi column, getting a actual binded column and showing columns. I'm struggling to make a multi-column combo box now but in vain. The combo box in VC.NET seems not having multi-colmn property. Is it true? If I can't use combo box as a multi column container, how can I show the information like Select your name :
2
1524
by: ME | last post by:
I need to know how to create a MULTI page report. All I can seem to create is a report with only one page, even though the datasource it is bound to returns multiple records. I have posted an example of my source code here: http://mreprogramming.com/currentrelease/WindowsApplication25.zip What am I doing wrong? Thanks, Matt
3
2074
by: Bob | last post by:
I need to create a program that is essentially a special fax sender using multi line Dialogic cards. I figure that the best way to do this so that it can be used from any app is to create someting that can be installed as a printer on the local computer. When sending the print command so that the current document, whatever it is is transmitted to the program, I need to popup a box to get the desination info (name phone number etc..) ,when...
2
1866
by: news.sbcglobal.net | last post by:
Here's my problem: I'm developing an ASP.NET 2.0 application that has a user select one or more auto manufacturers from a listbox ("lstMakes"). Once they do this, another listbox ("lstModels") should be filled with all matching models made by the selected manufacturers. If lstMakes was not multi-select, I'd have no problem. But in this case it has to be multi-select. The database is SQL Server 2005 which does not accept arrays as...
2
1616
by: cpressley2 | last post by:
Hi, On a multi-partition instance, can you create a database on a single parition? How??? The db architects want to use one instance for four databases where only one is big enough for a multi-partition. The other three are small. I'd like to create them only on one partition but can't find any documention on how to do this.
2
3668
by: BillE | last post by:
I need to create a multi-line label dynamically. Since labels aren't multi-line, I'm creating a textbox and making it look like a label with the multiline property set to true. I want to increase the height of the textbox only if there are multiple lines, and leave it at the default height if the text does not wrap after setting the Text property. I thought I could use the Lines property after setting the Text property,
4
1646
by: Laurence | last post by:
Hi folks, Who knows how to create multi-location/global views? Could you show me some examples? Thanks in advance, Laurence
0
959
by: Chris Chin | last post by:
I observed from Registry (HKLM:\SYSTEM\CurrentControlSet\Services\<category>\Performance) and Reflector that a multi-instance performance category has IsMultiInstance=1 attribute in the registry. So after creating a performance category, I manually added this attribute to the registry. I then used a constructor of PerformanceCounter that accepts an instance name. However, (unlike .NET 2.0) it would not create the category instance. Any help will...
1
3463
by: jimjack145 | last post by:
Hi All, I have one form with two multi select list box. I want to create query when user select value from it and click for result page. However i search on net but not find any code example. If any body have any example link or code then please reply this forum as soon as possible. I am not getting how i create mysql query for the same. Hope soon i will get good reply here. :) Regards,
0
8917
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8761
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9281
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9142
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8148
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2163
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.