Error with Custom Control

  • Thread starter Thread starter Nikolay Petrov
  • Start date Start date
N

Nikolay Petrov

I've created a simple custom control with a textbox and buttom on it.
When placed in .htm page an empty box shown in IE.

I've added the site to trusted sites.
still no luck.

any ideas?
 
Hi Nikolay:

You'll need to use .aspx files, not .htm files, to have the ASP.NET
runtime process the control.
 
Have you tried adding an object tag to your html page where the
control is hosted? The DLL that is created when you compile your
windows form will need to be placed in the directory where you can
reference it from your web server.

Example

<body>
<object classid="http:MyControl.dll#MyControl.MyClass" VIEWASTEXT>
<PARAM NAME="Param1" VALUE="Value1">
<PARAM NAME="Param2" VALUE="Value2">
</object>

For simplicity sake I usually copy the DLL into the same directory as
the web app.

Hope this helps.

Kind Regards,
John
 
Oh, that kind of control :)

Yes - it is possible, but configuration can be a pain. Did you do any
code access security configuration? Does the control come from a
single dll on the server or could there be some missing dependencies?
 
I've created the control by myself.
It is on my machine, the dll is in the folder where my htm page is.
My local site is added to the thrusted sites zone, which is configured for
the lowest security.
When the page is loaded, an icon of broken image is displayed in the place
of the control.
 

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

Back
Top