Home All Groups Group Topic Archive Search About

Error with Custom Control

Author
26 Mar 2005 10:14 PM
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?

Author
26 Mar 2005 10:16 PM
Scott Allen
Hi Nikolay:

You'll need to use .aspx files, not .htm files, to have the ASP.NET
runtime process the control.

Show quoteHide quote
On 26 Mar 2005 14:14:19 -0800, "Nikolay Petrov" <johnt***@mail.bg>
wrote:

>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?
Author
26 Mar 2005 10:25 PM
Nikolay Petrov
Scott, look at the url, i've given
also at: http://windowsforms.net/articles/iesourcing.aspx

and also, i've tried it in aspx too, looks the same.
Author
27 Mar 2005 3:09 PM
Scott Allen
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?

Show quoteHide quote
On 26 Mar 2005 14:25:09 -0800, "Nikolay Petrov" <johnt***@mail.bg>
wrote:

>Scott, look at the url, i've given
>also at: http://windowsforms.net/articles/iesourcing.aspx
>
>and also, i've tried it in aspx too, looks the same.
Author
29 Mar 2005 6:40 AM
Nikolay Petrov
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.


Show quoteHide quote
"Scott Allen" <scott@nospam.odetocode.com> wrote in message
news:7vid4119blljooefkser0jm8a8r2kngmms@4ax.com...
> 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?
>
> --
> Scott
> http://www.OdeToCode.com/blogs/scott/
>
> On 26 Mar 2005 14:25:09 -0800, "Nikolay Petrov" <johnt***@mail.bg>
> wrote:
>
>>Scott, look at the url, i've given
>>also at: http://windowsforms.net/articles/iesourcing.aspx
>>
>>and also, i've tried it in aspx too, looks the same.
>
Author
26 Mar 2005 10:17 PM
Nikolay Petrov
Forgot to mension, it is an Windows Forms custom control.

It's is possible according to http://www.15seconds.com/issue/030610.htm
Author
26 Mar 2005 10:32 PM
ghost
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



Show quoteHide quote
On 26 Mar 2005 14:14:19 -0800, "Nikolay Petrov" <johnt***@mail.bg>
wrote:

>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?
Author
26 Mar 2005 10:50 PM
Nikolay Petrov
It's set just like that. I am aware of this.