473,569 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(o bject 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 1197
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@silversprin gs.me.ukwrote in message
news:11******** *************** ***********@mic rosoft.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(o bject 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.orgwro te in
message news:ez******** ******@TK2MSFTN GP04.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@silversprin gs.me.ukwrote in message
news:11******** *************** ***********@mic rosoft.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(o bject sender, EventArgs e)

{

vs.Refresh() ;

TextBody.Tex t = 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
2083
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 true/false when finished), the method works fine (it is meant to store data in a database, and this part works), but we get the error: "The object...
3
3164
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 objects. The UserControl client creates and passes these sponsor objects to the remote objects. I am able to launch .Net UserControls and their...
30
2247
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 nested do loops, going through the records in rst using .movenext. At one point in one of the loops, we'll say the rst is at record "a". Now,...
0
1592
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 COM on the wrong thread, at which point things seem to go downhill very rapidly. I'm successfully making very heavy use of COM interop elsewhere in my...
4
2004
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 called and tested in the browser from the server and it works fine. Any suggestions?
6
12014
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 and it return the date for example, or even just a string "abc". Ideally I would like to see both the C# code and JS code! Anyone help me!
9
2747
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: ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEV.v10.en/dndotnet/html/callnetfrcom.htm Problem is it doesn't work! Can someone point me a "How-to" for exposing .net classes to...
2
2841
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 time, something like 15 to 30 seconds. All subsequent calls are really fast (about 10 milliseconds). But when the client is restarted, the first call...
2
1663
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 ID #2 (or any ID over 1) and input that information into my dynamic page. No matter what ID i type, or even if I neglect to type in an ID to begin...
0
7695
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...
0
7612
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...
0
7922
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8119
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...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
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...
0
6281
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...
0
3653
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...
1
2111
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

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.