Groups | Blog | Home
all groups > asp.net > april 2006 >

asp.net : Problem loading usercontrol since latest ie patch....



Tim B
4/14/2006 10:42:01 PM
Hi,

Previously I was loading my .NET Usercontrol like this :

<OBJECT id="Obj" classid="Viewer.dll#Viewer.Viewer" width=105 height=20
VIEWASTEXT><param name="DONOTHING" value="1">
</OBJECT>

Everything was working great until the new patch came out and changed the
way the ActiveX / Usercontrols are loaded.

I tried using the 'inner html' example located at :
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/activating_activex.asp

But the example did not work for my user control. How can I load my
usercontrol and my parameter in a way that is functional with this latest ie
update? Do I need to now specify a codebase ?

Here is what I tried :

<script language="JScript">
CreateControl( "EXAMPLE_DIV_ID",
"Viewer.dll#Viewer.Viewer",
"EXAMPLE_OBJECT_ID", "600", "400", "1",)
</script>

Supporting function :
// external_script.js
function CreateControl(DivID, CLSID, ObjectID, WIDTH, HEIGHT, URL, AUTOSTART)
{
var d = document.getElementById(DivID);
d.innerHTML = '<object classid=' + CLSID + ' id=' + ObjectID + ' width=' +
WIDTH + ' height=' + HEIGHT +'><param name="URL" value=' + URL + '><param
name="autoStart" value=' + AUTOSTART + '/>';
}

Tim B
4/15/2006 5:21:01 AM
Perhaps I used the wrong term, I am trying to host a Windows Form Contol in
IE.
Here is an example of how it used to work before the patch :

http://www.15seconds.com/issue/030610.htm


[quoted text, click to view]
Kevin Spencer
4/15/2006 7:43:43 AM
A UserControl is a server-side WebControl. I don't understand what you're
trying to do here.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

[quoted text, click to view]

Kevin Spencer
4/15/2006 3:18:49 PM
Hi Time,

I don't have the actual answer to your question, but I did find a good
resource where you should be able to find the answer:

http://msdn.microsoft.com/library/default.asp?url=/workshop/components/activex/sec_activex.asp

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

[quoted text, click to view]

nyclove21 NO[at]SPAM hotmail.com
5/2/2006 6:28:04 AM
I have a simliar situation. I was able load the user control
sucessfully even with the patch installed on the client machine. The
control wouldn't load once the patch was installed on the server
however.

Has anyone else ran into this problem?
AddThis Social Bookmark Button