jfblier

Hi,

I want to be able to create a UserControl that will appear in a dhtml page running on the desktop of the user(start a web page locally without IIS).

I have create a a usercontrol with the following code:

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Drawing;

using System.Data;

using System.Text;

using System.Windows.Forms;

using System.Runtime.InteropServices;

namespace MyCOM

{

[ComVisible(true)]

[Guid("77E95B43-525A-429b-8CD1-7D6F98BB934A")]

public partial class UserControl1 : UserControl

{

public UserControl1()

{

InitializeComponent();

}

}

}

And the html page:

<html>

<head>

<title>Test Page</title>

</head>

<body>

Test1

<object id=¡±uc1" classid=¡±http:MyCOM.dll.dll#MyCOM.UserControl1¡±>

Test2

</body>

</html>

Any ideas

Thanks



Re: Internet Explorer Web Development .NET UserControl in a dhtml page

unique_username

I could be wrong, but I don't think this is possible at all.

You are trying to run server side code, in a non-server environment.

If you want to create an end user screen (HTML page) that the user runs locally on their desktop, then you are limited to JavaScript only, (or if you are not going to create a cross-browser page, then it can contain VBScript, and/or ActiveX controls)

Note, that *EVERY* tirme the user accesses the page, if on their local PC, any JavaScript/VBScript/ActiveX will trigger the EVER-SO-AGREVATING "security-bar". Even if they try to add this page to the local list of safe sites, it will always re-trigger the warning bar.

(e.g. if hosted locally, adding localhost or 127.0.0.1, or 192.168.100.xxx to the "safe" list, will have NO EFFECT on the security bar)

This was brought up hundreds of times to the developers while IE7 was in Alpha/Beta, but all requests to fix this were ignored.


This is why most do development on Firefox, Safari, or Konqueror since being able to test a quick file locally, to see if it works before hooking in a DB and all that jazz (e.g. PHP, ASP, JSP, CF....) is VERY important.

Good luck!