PC Review


Reply
Thread Tools Rate Thread

calling a clients local COM object

 
 
Adrian
Guest
Posts: n/a
 
      6th Jun 2007
Hi
all of the PC that will have access to the ASPX page have a COM object
installed and using Codebehind I add a COM reference to it and I can call
it like this:


View.ViewSrv vs = new View.ViewSrv();

protected void Button3_Click(object sender, EventArgs e)

{

vs.Refresh();

TextBody.Text = vs.GetView();



My Problem is that the codeBehind runs on the server so when I try it on a
PC from a local IIS server I get an error as it cannot find the reference to
View. So I need a way of connecting to the PCs local COM object and passing
the results back to the Codebehind.

I can access the COM object from VBScript or JavaScript but my CodeBehind is
C#



So how do you mix VBS and C# or can the code in the page be C#

And how do you pass the information to say a textbox that is being used by
the codebehind!

sorry as you can guess I'm new to ASPX!!!



 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      6th Jun 2007
You need to access the object from javascript and organize a sort of
interace between the server and client side code. This may help you:

How to Pass Messages and Actions between Server and Client
http://usableasp.net/DeveloperPage.a...rAndClient.htm


--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Adrian" <(E-Mail Removed)> wrote in message
news:11348F17-9F52-4EB1-9CAA-(E-Mail Removed)...
> Hi
> all of the PC that will have access to the ASPX page have a COM object
> installed and using Codebehind I add a COM reference to it and I can call
> it like this:
>
>
> View.ViewSrv vs = new View.ViewSrv();
>
> protected void Button3_Click(object sender, EventArgs e)
>
> {
>
> vs.Refresh();
>
> TextBody.Text = vs.GetView();
>
>
>
> My Problem is that the codeBehind runs on the server so when I try it on a
> PC from a local IIS server I get an error as it cannot find the reference
> to View. So I need a way of connecting to the PCs local COM object and
> passing the results back to the Codebehind.
>
> I can access the COM object from VBScript or JavaScript but my CodeBehind
> is C#
>
>
>
> So how do you mix VBS and C# or can the code in the page be C#
>
> And how do you pass the information to say a textbox that is being used by
> the codebehind!
>
> sorry as you can guess I'm new to ASPX!!!
>
>
>



 
Reply With Quote
 
Adrian
Guest
Posts: n/a
 
      6th Jun 2007
great thanks Eliyahu

"Eliyahu Goldin" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> You need to access the object from javascript and organize a sort of
> interace between the server and client side code. This may help you:
>
> How to Pass Messages and Actions between Server and Client
> http://usableasp.net/DeveloperPage.a...rAndClient.htm
>
>
> --
> Eliyahu Goldin,
> Software Developer & Consultant
> Microsoft MVP [ASP.NET]
> http://msmvps.com/blogs/egoldin
> http://usableasp.net
>
>
> "Adrian" <(E-Mail Removed)> wrote in message
> news:11348F17-9F52-4EB1-9CAA-(E-Mail Removed)...
>> Hi
>> all of the PC that will have access to the ASPX page have a COM object
>> installed and using Codebehind I add a COM reference to it and I can
>> call it like this:
>>
>>
>> View.ViewSrv vs = new View.ViewSrv();
>>
>> protected void Button3_Click(object sender, EventArgs e)
>>
>> {
>>
>> vs.Refresh();
>>
>> TextBody.Text = vs.GetView();
>>
>>
>>
>> My Problem is that the codeBehind runs on the server so when I try it on
>> a PC from a local IIS server I get an error as it cannot find the
>> reference to View. So I need a way of connecting to the PCs local COM
>> object and passing the results back to the Codebehind.
>>
>> I can access the COM object from VBScript or JavaScript but my CodeBehind
>> is C#
>>
>>
>>
>> So how do you mix VBS and C# or can the code in the page be C#
>>
>> And how do you pass the information to say a textbox that is being used
>> by the codebehind!
>>
>> sorry as you can guess I'm new to ASPX!!!
>>
>>
>>

>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HashTable stores whole object as Key NOT the result of calling GetHashCode on the object when you do myHashTable.Add? John Davis Microsoft Dot NET Framework 3 13th Apr 2006 02:31 PM
Calling a local .NET UserControl from a local HTML page =?Utf-8?B?RGF2ZSBNY0NyYWNrZW4=?= Microsoft Dot NET 1 13th May 2005 04:35 PM
Calling another form's object event - error msg... object required =?Utf-8?B?bHA=?= Microsoft Access Forms 2 22nd Dec 2004 11:38 PM
Am i calling a local proxy or a remote object?! Julia Microsoft C# .NET 3 17th Nov 2004 12:04 PM
Error "The object invoked has disconnected from its clients" when calling DotNET COM dll James Lavery Microsoft Dot NET 0 30th Sep 2004 06:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:13 PM.