By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,386 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

calling a clients local COM object

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.