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

Embbed .NET Custom Control (ActiveX) into ASP .NET page

P: n/a
Hi All,

I'm trying to display .NET Custom Control (created using Inherited Control)
on an ASPX page, but no luck. I already registered the Control to Global
Assembly Cache through .NET Framework 1.1 Configuration. I have also put a
reference to the control on my ASP .NET project. The view that I get is only
a disabled text area.

Below is the code that I'm using:

<html>
<script language="JScript">
function ChangeText() {
simpleControl1.Text = text1.value;
}
</script>
<body>
<p>Simple Control
<br>
<br>
<object id="simpleControl1"
classid="http:bin/ActiveXDotNet.dll#ActiveXDotNet.SimpleControl" height="300"
width="300" VIEWASTEXT>
<param name="Text" value="Simple Control">
</object>
<br>
<br>
<input type="text" id="text1" NAME="text1">
<input type="button" value="Change Text" onclick="ChangeText()"
ID="Button1" NAME="Button1">
</p>
</body>
</html>

Can anyone help me with the issue?

Regards,
Budhi
Sep 12 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
You shouldn't GAC it. It shouldn't be strong named.
Instead it belongs in the web root of your web application so it can be
automatically downloaded.
Here's more info:

http://SteveOrr.net/articles/WinformControls.aspx

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"Budhi Saputra Prasetya" <Bu******************@discussions.microsoft.com>
wrote in message news:26**********************************@microsof t.com...
Hi All,

I'm trying to display .NET Custom Control (created using Inherited
Control)
on an ASPX page, but no luck. I already registered the Control to Global
Assembly Cache through .NET Framework 1.1 Configuration. I have also put a
reference to the control on my ASP .NET project. The view that I get is
only
a disabled text area.

Below is the code that I'm using:

<html>
<script language="JScript">
function ChangeText() {
simpleControl1.Text = text1.value;
}
</script>
<body>
<p>Simple Control
<br>
<br>
<object id="simpleControl1"
classid="http:bin/ActiveXDotNet.dll#ActiveXDotNet.SimpleControl"
height="300"
width="300" VIEWASTEXT>
<param name="Text" value="Simple Control">
</object>
<br>
<br>
<input type="text" id="text1" NAME="text1">
<input type="button" value="Change Text" onclick="ChangeText()"
ID="Button1" NAME="Button1">
</p>
</body>
</html>

Can anyone help me with the issue?

Regards,
Budhi

Sep 13 '06 #2

P: n/a
Hi Steve,

Thanks for the answer. It works fine now. Now I'm trying to sign my active x
control so it can execute certain program on the client's computer. The
ActiveX will be in the intranet, so there won't be any issue with public
domain. Any insight on this matter?

Regards,
Budhi

"Steve C. Orr [MVP, MCSD]" wrote:
You shouldn't GAC it. It shouldn't be strong named.
Instead it belongs in the web root of your web application so it can be
automatically downloaded.
Here's more info:

http://SteveOrr.net/articles/WinformControls.aspx

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"Budhi Saputra Prasetya" <Bu******************@discussions.microsoft.com>
wrote in message news:26**********************************@microsof t.com...
Hi All,

I'm trying to display .NET Custom Control (created using Inherited
Control)
on an ASPX page, but no luck. I already registered the Control to Global
Assembly Cache through .NET Framework 1.1 Configuration. I have also put a
reference to the control on my ASP .NET project. The view that I get is
only
a disabled text area.

Below is the code that I'm using:

<html>
<script language="JScript">
function ChangeText() {
simpleControl1.Text = text1.value;
}
</script>
<body>
<p>Simple Control
<br>
<br>
<object id="simpleControl1"
classid="http:bin/ActiveXDotNet.dll#ActiveXDotNet.SimpleControl"
height="300"
width="300" VIEWASTEXT>
<param name="Text" value="Simple Control">
</object>
<br>
<br>
<input type="text" id="text1" NAME="text1">
<input type="button" value="Change Text" onclick="ChangeText()"
ID="Button1" NAME="Button1">
</p>
</body>
</html>

Can anyone help me with the issue?

Regards,
Budhi


Sep 14 '06 #3

P: n/a
If it's signed I'm pretty sure it won't work in this embedded way you are
trying.
I also want to clarify that it isn't truly an ActiveX control you are
making, it is an embedded windows forms control.
ActiveX controls are based on COM, and while they have some similarities
there are also many differences between ActiveX controls and embedded
windows forms controls.

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"Budhi Saputra Prasetya" <Bu******************@discussions.microsoft.com>
wrote in message news:6B**********************************@microsof t.com...
Hi Steve,

Thanks for the answer. It works fine now. Now I'm trying to sign my active
x
control so it can execute certain program on the client's computer. The
ActiveX will be in the intranet, so there won't be any issue with public
domain. Any insight on this matter?

Regards,
Budhi

"Steve C. Orr [MVP, MCSD]" wrote:
>You shouldn't GAC it. It shouldn't be strong named.
Instead it belongs in the web root of your web application so it can be
automatically downloaded.
Here's more info:

http://SteveOrr.net/articles/WinformControls.aspx

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"Budhi Saputra Prasetya" <Bu******************@discussions.microsoft.com>
wrote in message
news:26**********************************@microso ft.com...
Hi All,

I'm trying to display .NET Custom Control (created using Inherited
Control)
on an ASPX page, but no luck. I already registered the Control to
Global
Assembly Cache through .NET Framework 1.1 Configuration. I have also
put a
reference to the control on my ASP .NET project. The view that I get is
only
a disabled text area.

Below is the code that I'm using:

<html>
<script language="JScript">
function ChangeText() {
simpleControl1.Text = text1.value;
}
</script>
<body>
<p>Simple Control
<br>
<br>
<object id="simpleControl1"
classid="http:bin/ActiveXDotNet.dll#ActiveXDotNet.SimpleControl"
height="300"
width="300" VIEWASTEXT>
<param name="Text" value="Simple Control">
</object>
<br>
<br>
<input type="text" id="text1" NAME="text1">
<input type="button" value="Change Text" onclick="ChangeText()"
ID="Button1" NAME="Button1">
</p>
</body>
</html>

Can anyone help me with the issue?

Regards,
Budhi



Sep 15 '06 #4

P: n/a
what is the different between activeX controls and windows control library ?
"Steve C. Orr [MVP, MCSD]" <St***@Orr.netwrote in message
news:e8**************@TK2MSFTNGP06.phx.gbl...
If it's signed I'm pretty sure it won't work in this embedded way you are
trying.
I also want to clarify that it isn't truly an ActiveX control you are
making, it is an embedded windows forms control.
ActiveX controls are based on COM, and while they have some similarities
there are also many differences between ActiveX controls and embedded
windows forms controls.

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"Budhi Saputra Prasetya" <Bu******************@discussions.microsoft.com>
wrote in message
news:6B**********************************@microsof t.com...
>Hi Steve,

Thanks for the answer. It works fine now. Now I'm trying to sign my
active x
control so it can execute certain program on the client's computer. The
ActiveX will be in the intranet, so there won't be any issue with public
domain. Any insight on this matter?

Regards,
Budhi

"Steve C. Orr [MVP, MCSD]" wrote:
>>You shouldn't GAC it. It shouldn't be strong named.
Instead it belongs in the web root of your web application so it can be
automatically downloaded.
Here's more info:

http://SteveOrr.net/articles/WinformControls.aspx

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"Budhi Saputra Prasetya"
<Bu******************@discussions.microsoft.co m>
wrote in message
news:26**********************************@micros oft.com...
Hi All,

I'm trying to display .NET Custom Control (created using Inherited
Control)
on an ASPX page, but no luck. I already registered the Control to
Global
Assembly Cache through .NET Framework 1.1 Configuration. I have also
put a
reference to the control on my ASP .NET project. The view that I get
is
only
a disabled text area.

Below is the code that I'm using:

<html>
<script language="JScript">
function ChangeText() {
simpleControl1.Text = text1.value;
}
</script>
<body>
<p>Simple Control
<br>
<br>
<object id="simpleControl1"
classid="http:bin/ActiveXDotNet.dll#ActiveXDotNet.SimpleControl"
height="300"
width="300" VIEWASTEXT>
<param name="Text" value="Simple Control">
</object>
<br>
<br>
<input type="text" id="text1" NAME="text1">
<input type="button" value="Change Text" onclick="ChangeText()"
ID="Button1" NAME="Button1">
</p>
</body>
</html>

Can anyone help me with the issue?

Regards,
Budhi


Sep 15 '06 #5

P: n/a
I don't have time to detail all the differences, but what it boils down to
from a browser perspective is that ActiveX controls have all or nothing
permissions, while embedded windows forms controls run inside the security
context of the .NET framework and also Internet Explorer. This makes them
much safer for users and much more configurable so they can be given
permission to do only what they need to do and nothing more so they can't be
so easily misused and/or hacked.
ActiveX controls are one of the leading sources of Spyware, Adware, and
other annoyances that have infiltrated the Internet over the last several
years. It's time for them to go away.
..NET controls are much more secure. Of course now we developers must deal
with the layers of security to achieve the functionality we need. Not so
great for us, but it is very good for the Internet in general.

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"Seth Bourne" <se*****@yahoo.comwrote in message
news:O4**************@TK2MSFTNGP05.phx.gbl...
what is the different between activeX controls and windows control library
?
"Steve C. Orr [MVP, MCSD]" <St***@Orr.netwrote in message
news:e8**************@TK2MSFTNGP06.phx.gbl...
>If it's signed I'm pretty sure it won't work in this embedded way you are
trying.
I also want to clarify that it isn't truly an ActiveX control you are
making, it is an embedded windows forms control.
ActiveX controls are based on COM, and while they have some similarities
there are also many differences between ActiveX controls and embedded
windows forms controls.

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"Budhi Saputra Prasetya" <Bu******************@discussions.microsoft.com>
wrote in message
news:6B**********************************@microso ft.com...
>>Hi Steve,

Thanks for the answer. It works fine now. Now I'm trying to sign my
active x
control so it can execute certain program on the client's computer. The
ActiveX will be in the intranet, so there won't be any issue with public
domain. Any insight on this matter?

Regards,
Budhi

"Steve C. Orr [MVP, MCSD]" wrote:

You shouldn't GAC it. It shouldn't be strong named.
Instead it belongs in the web root of your web application so it can be
automatically downloaded.
Here's more info:

http://SteveOrr.net/articles/WinformControls.aspx

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"Budhi Saputra Prasetya"
<Bu******************@discussions.microsoft.com >
wrote in message
news:26**********************************@micro soft.com...
Hi All,

I'm trying to display .NET Custom Control (created using Inherited
Control)
on an ASPX page, but no luck. I already registered the Control to
Global
Assembly Cache through .NET Framework 1.1 Configuration. I have also
put a
reference to the control on my ASP .NET project. The view that I get
is
only
a disabled text area.

Below is the code that I'm using:

<html>
<script language="JScript">
function ChangeText() {
simpleControl1.Text = text1.value;
}
</script>
<body>
<p>Simple Control
<br>
<br>
<object id="simpleControl1"
classid="http:bin/ActiveXDotNet.dll#ActiveXDotNet.SimpleControl"
height="300"
width="300" VIEWASTEXT>
<param name="Text" value="Simple Control">
</object>
<br>
<br>
<input type="text" id="text1" NAME="text1">
<input type="button" value="Change Text" onclick="ChangeText()"
ID="Button1" NAME="Button1">
</p>
</body>
</html>

Can anyone help me with the issue?

Regards,
Budhi



Sep 15 '06 #6

P: n/a
The old ActiveX controls download the binary (DLL or OCX files), it's like
the application downloaded and then run it from the client. does the .net
custom control have the similar architecture ?

"Steve C. Orr [MVP, MCSD]" <St***@Orr.netwrote in message
news:eT**************@TK2MSFTNGP03.phx.gbl...
>I don't have time to detail all the differences, but what it boils down to
from a browser perspective is that ActiveX controls have all or nothing
permissions, while embedded windows forms controls run inside the security
context of the .NET framework and also Internet Explorer. This makes them
much safer for users and much more configurable so they can be given
permission to do only what they need to do and nothing more so they can't
be so easily misused and/or hacked.
ActiveX controls are one of the leading sources of Spyware, Adware, and
other annoyances that have infiltrated the Internet over the last several
years. It's time for them to go away.
.NET controls are much more secure. Of course now we developers must deal
with the layers of security to achieve the functionality we need. Not so
great for us, but it is very good for the Internet in general.

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"Seth Bourne" <se*****@yahoo.comwrote in message
news:O4**************@TK2MSFTNGP05.phx.gbl...
>what is the different between activeX controls and windows control
library ?
"Steve C. Orr [MVP, MCSD]" <St***@Orr.netwrote in message
news:e8**************@TK2MSFTNGP06.phx.gbl...
>>If it's signed I'm pretty sure it won't work in this embedded way you
are trying.
I also want to clarify that it isn't truly an ActiveX control you are
making, it is an embedded windows forms control.
ActiveX controls are based on COM, and while they have some similarities
there are also many differences between ActiveX controls and embedded
windows forms controls.

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"Budhi Saputra Prasetya"
<Bu******************@discussions.microsoft.comw rote in message
news:6B**********************************@micros oft.com...
Hi Steve,

Thanks for the answer. It works fine now. Now I'm trying to sign my
active x
control so it can execute certain program on the client's computer. The
ActiveX will be in the intranet, so there won't be any issue with
public
domain. Any insight on this matter?

Regards,
Budhi

"Steve C. Orr [MVP, MCSD]" wrote:

You shouldn't GAC it. It shouldn't be strong named.
Instead it belongs in the web root of your web application so it can
be
automatically downloaded.
Here's more info:
>
http://SteveOrr.net/articles/WinformControls.aspx
>
--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
>
>
"Budhi Saputra Prasetya"
<Bu******************@discussions.microsoft.co m>
wrote in message
news:26**********************************@micr osoft.com...
Hi All,

I'm trying to display .NET Custom Control (created using Inherited
Control)
on an ASPX page, but no luck. I already registered the Control to
Global
Assembly Cache through .NET Framework 1.1 Configuration. I have also
put a
reference to the control on my ASP .NET project. The view that I get
is
only
a disabled text area.

Below is the code that I'm using:

<html>
<script language="JScript">
function ChangeText() {
simpleControl1.Text = text1.value;
}
</script>
<body>
<p>Simple Control
<br>
<br>
<object id="simpleControl1"
classid="http:bin/ActiveXDotNet.dll#ActiveXDotNet.SimpleControl"
height="300"
width="300" VIEWASTEXT>
<param name="Text" value="Simple Control">
</object>
<br>
<br>
<input type="text" id="text1" NAME="text1">
<input type="button" value="Change Text" onclick="ChangeText()"
ID="Button1" NAME="Button1">
</p>
</body>
</html>

Can anyone help me with the issue?

Regards,
Budhi
>
>
>




Sep 19 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.