Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Re: Calling .NET Assembly from JavaScript... (http://www.velocityreviews.com/forums/t60363-re-calling-net-assembly-from-javascript.html)

Ken Dopierala Jr. 07-22-2003 07:30 PM

Re: Calling .NET Assembly from JavaScript...
 
Hi,
I don't know how you can get around using HTTP. But the way I do it is
to wrap what I need in a Web Service and then use the webservice.htc control
to retrieve it from the client-side. Works sweet and if you do a search for
'webservice.htc' on MSDN you'll find a bunch of great links telling you
everything you need to know. I use it to return both classes and arrays of
classes. Be sure to use just a normal Array object though. If you use an
ArrayList then IE has trouble with it and just gives it to you as an XML
string instead of a nice object. Good luck. Ken.

"arc" <archer_vonz@hotmail.com> wrote in message
news:%23LIs6vHUDHA.1680@TK2MSFTNGP11.phx.gbl...
> I have a requirement to call .NET assembly (Custom component) from thin
> client Page (ASPX).
> This Assembly talks only TCP/IP with an external server and hence cannot
> interact over HTTP.
> That's the reason I am trying to make a call from the Client Script so

that
> the information could be captured from screen, sent to the Assembly
> and is fired by the Client Script itself because the Assembly as such is
> dumb
>
> Is there a way to perform this? Or should it be done only by a Thick

Windows
> Client?
> Here is a sample code within which I would like to make a call to this
> Assembly.
>
> <%@ Register TagPrefix="UITemplate" TagName="TTop" Src="include/top.ascx"

%>
> <%@ Page language="c#" Codebehind="UpdateProfile.aspx.cs"
> AutoEventWireup="false" Inherits="XXX.UpdateProfile" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
> <HTML dir="ltr">
> <HEAD>
> <title>XXX</title>
> <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
> <meta content="C#" name="CODE_LANGUAGE">
> <meta content="JavaScript" name="vs_defaultClientScript">
> <meta content="http://schemas.microsoft.com/intellisense/ie5"
> name="vs_targetSchema">
> <script language="javascript">
> function validateProfile()
> {
> //////Call to Assembly - ServerConnector
> }
> </HEAD>
> </HTML>
>
> Regards
> Arc
>
>





All times are GMT. The time now is 05:11 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.