473,320 Members | 2,092 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,320 software developers and data experts.

calling a clients local COM object

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!!!

Jun 6 '07 #1
2 1192
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" <ag@silversprings.me.ukwrote in message
news:11**********************************@microsof t.com...
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!!!

Jun 6 '07 #2
great thanks Eliyahu

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:ez**************@TK2MSFTNGP04.phx.gbl...
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" <ag@silversprings.me.ukwrote in message
news:11**********************************@microsof t.com...
>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!!!

Jun 6 '07 #3

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

Similar topics

0
by: James Lavery | last post by:
Hi all, We've got a vb.net assembly (dll), which is exposing a COM interface so it can be called from our legacy VB6 application. When we call a particular method (which is designed to return...
3
by: Dave McCracken | last post by:
I am hosting .Net UserControls in HTML pages with Object Tags. These UserControls are clients of remotable objects that run on the same machine. The remote objects execute callbacks via sponsor...
30
by: Tim Marshall | last post by:
Here's the scenario, A2003, Jet back end, illustrated with some cut down code at the end of the post: A proc dims a snapshot recordset (dim rst as Dao.recordset) and opens it. There are several...
0
by: Ted Miller | last post by:
Hi folks, I originally posted this on microsoft.public.dotnet.framework.interop. Reposting to broaden the audience. I'm having an interop problem where my managed component is reentered from...
4
by: Joe | last post by:
I'm running XP and Windows 2003 servers. These calls did work up until a certain point which we can't track back now. There were no code changes at all to the service. The service can be...
6
by: Adrian | last post by:
Hi I want to write a simple DLL in C# that I can call from a local html page using JavaScript. I'm looking for a very simple example! The sort of think I'm looking for is from JS to call the DLL...
9
by: Terry | last post by:
I am trying to test out the ability of VB6 (VBA access) to instanciate a VB.net Object and call its methods. I came accross the following article in my vs2005 help search:...
2
by: Johan | last post by:
We have run into problems calling a web service from a client running .NET framework 2.0. The problem is that the first call to the web service, after the client has been started, takes very long...
2
by: ph33red | last post by:
Hi, I'm having a problem getting my code to pull the appropriate information when I call for it via URL. (example: http://..../.php?id=2). For some reason I can't get it to pull the information for...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.