Need urgent help: Activex in asp.net..

G

Guest

Hi Friends,

I've developed an activeX control (.ocx) using VB 6.0
it has two Public functions, which chages some values of text boxes of the
control.
Fun1(int a)
Fun2()
How to use this control in ASP.NET (C#)?
I've added reference to my web application.

But I'm not getting UserControl.Fun1(a)?
or UserControl.Fun2() in ASP.NET (C#)
However the same calls works fine in Windows forms application.
and in VB 6.0 (standard EXE).

How to call these functions in ASP.NET?
Or any other way to deploy the control for with a web page?

Please help.

Thanks & Regards,
Sachin M
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Post the code you are using, if possible both in VB.NET (working ) and the
C# that is not working

cheers,
 
G

Guest

Hi Ignacio,

Thanks for the reply.
the activex control after dropping on web form gives:
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<OBJECT id="ShowLevel" classid="clsid:9F2B3505-199C-11D2-9E4E-00AA002156AE"
VIEWASTEXT>
<PARAM NAME="Level" VALUE="65">
</OBJECT>
....
...
Even if I can replace 65 with my own value on each page load through C# (the
code behind), my prob is solved.

I tried with this in a table cell, it worked fine:
System.Web.UI.HtmlControls.HtmlGenericControl MyTableCell1;
string value=MyTableCell1.Text;

but i can't give id to PARAM
Can you guide me how to do this? I'm a beginner in C#

Regards,
Sachin M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top