all groups > dotnet interop > october 2005 >
You're in the

dotnet interop

group:

Deployment of Windows User Controls for Web Pages


Deployment of Windows User Controls for Web Pages Wayne Gibson
10/24/2005 11:59:40 AM
dotnet interop:
Hi,
Was wondering if anybody could point me in the right direction.

I'm looking at developing a Windows User Control using Visual Studio .NET
2005 in C#. The user control is to be used on a web page to replace an
existing Java applet. One of the main reasons for switching from Java to
the Windows User Control is to reduce the amount of the time spent maintain
two lots of source code, keeping the online and offline versions in sync.
So the creating a Windows User Control, would help in this matter.

I haven't seen many samples on how to achieve creating a Windows User
Control using C#. The ones that I have seen, seem to implement the Windows
User Controls like ActiveXs. Using the Object Tag in the HTML file, as
follows:

<object id="HelloWorldControl1"
classid="http://localhost/HelloWorldControlHost/HelloWorldControl.dll#HelloWorldControl.HelloWorldCtl"
height="500" width="500" VIEWASTEXT>
</object>

Using the # to specify the Assemblyname and class to invoke.

Firstly, is this the correct way of doing it. Or is there a better method
that I haven't found as yet?

I also noticed that the when the custom control is download, it states that
it is unsigned. Am I correct in thinking that I will need to sign the
custom control, using a digital signature from Verisign?
Once signed, will the user still be prompted to install the control or is
there someway of avoiding the dialog be presented to them?

Is it also possible to use a cab file, just in case there are an additional
dlls that are required by the custom control ? If so will this be
transparent to the users, or will they see some sort of installation being
performed?

My major problem, is that I want this to work on as many machines as
possible. But nowadays a lot of system managers are restricting what can
and can't be installed on the users machines and I don't want to lose these
users....

Thanks

Wayne

Re: Deployment of Windows User Controls for Web Pages Robbe Morris [C# MVP]
10/24/2005 8:52:07 PM
Correct...I'd avoid the use of windows user controls in
a web browser like the plague. Even for IE users, you'll
run into all sorts of users who are either not permitted to
install your control or have problems getting it to work
once installed because of security settings.

It isn't worth the headaches...

Unless you need to work with files on the user's
desktop, I'd suggest writing the functionality in
script or write the core functionality you need
in the flash player. Many companies will permit
flash installs if it isn't already installed (which it is
very, very likely to already be there).

--
Robbe Morris - 2004/2005 Microsoft MVP C#
http://www.masterado.net





[quoted text, click to view]

AddThis Social Bookmark Button