M
Mombiatch
Hi
I'm trying to set a property on a UserControl that I've embedded in my
ASP.NET web page. At first, I had the following in the <form> section:
<object id="mediaclient"
classid="mediaclient.dll#NeuralFramework.MediaBroker.MediaClient"></object>
When I tried to use custom javascript to set a property on 'mediaclient', I
put the following in Page_Load:
this.RegisterStartupScript("setGUID", "<script
language=javascript>mediaclient.strFileGUID=\"6a35ba9b-bbde-4678-9057-fb15c7
a685b8\";var gControl = mediaclient;alert(gControl.strFileGuid);</script>");
With the object in the form section, this bombs out saying that mediaclient
is null. So I tried putting it in the <body> section, before the <form>
section, and this works nicely, I can set the property and then use it when
I call functions of the UserControl. I then tried to put it after the <form>
section, but still in the <body> section, as I'd like it to be on the bottom
of the page. Unfortunately, it bombed out there too, saying that mediaclient
was once again null. Does anyone have any advice on getting around this or a
different strategy to suggest?
Thanks
Joe
I'm trying to set a property on a UserControl that I've embedded in my
ASP.NET web page. At first, I had the following in the <form> section:
<object id="mediaclient"
classid="mediaclient.dll#NeuralFramework.MediaBroker.MediaClient"></object>
When I tried to use custom javascript to set a property on 'mediaclient', I
put the following in Page_Load:
this.RegisterStartupScript("setGUID", "<script
language=javascript>mediaclient.strFileGUID=\"6a35ba9b-bbde-4678-9057-fb15c7
a685b8\";var gControl = mediaclient;alert(gControl.strFileGuid);</script>");
With the object in the form section, this bombs out saying that mediaclient
is null. So I tried putting it in the <body> section, before the <form>
section, and this works nicely, I can set the property and then use it when
I call functions of the UserControl. I then tried to put it after the <form>
section, but still in the <body> section, as I'd like it to be on the bottom
of the page. Unfortunately, it bombed out there too, saying that mediaclient
was once again null. Does anyone have any advice on getting around this or a
different strategy to suggest?
Thanks
Joe