Invalid javascript in onMouseMove event

Hi,
I have a webcontrol named NodeTemplateEditor, which contains a
placeholder. During the OnPreRender event a GoView is added to this
placeholder. The generated html appears to contain some invalid values,
namely go_csa_ActiveControl_NodeTemplateEditor and
go_ttsa_ActiveControl_NodeTemplateEditor.

ActiveControl is a server-side property of my page used to get/set the
value of the loaded webcontrol (in this case NodeTemplateEditor), which
is persisted in a session variable.

<img
 
 src="go_image_wrapper.aspx?GoView=ActiveControl_Node TemplateEditor"
 id="ActiveControl_NodeTemplateEditor"
 name="ActiveControl:NodeTemplateEditor"
 width="400"
 height="350"
 
 onMouseDown="goMouseDown(event,'ActiveControl_NodeTe mplateEditor')"
 
 onMouseUp="goMouseUp(event,'ActiveControl_NodeTempla teEditor')"
 
 onDblClick="goDblClick(event,'ActiveControl_NodeTemp lateEditor')"
 onMouseMove="goMouseMove(event,
<font color=RED>go_csa_ActiveControl_NodeTemplateEditor</font>,
<font color=RED>go_ttsa_ActiveControl_NodeTemplateEditor</font>, '')"
 onContextMenu="return false"
 
 onLoad="goInit('ActiveControl_NodeTemplateEditor','A ctiveControl:NodeTemplateEditor','ActiveControl_NodeTemplate Editor',false,'go_image_wrapper.aspx','')" 
 galleryimg="no" />

The additional spaces around column 50 do not appear in the generated
html, but are added by the forum software (at least on preview).

Any idea what is causing this?
Cheers,
Calum

Those JavaScript variables are defined by GoView.PreRenderDefinitions, which is called by GoView.OnPreRender.
Do you make sure all of the controls that you add dynamically in your Control.PreRender event get all the events they are supposed to get as part of the standard lifecycle for ASP.NET Controls?

I’m using vb.net, so my GoView object is declared ‘WithEvents’.

The GoView Init and Load events both fire ok when the page is loaded,
but not OnPreRender. BackgroundDoubleClicked, which I also handle,
fires as expected as well.

Is there anything special I have to do to handle OnPreRender?

I should also add that I’m using version 2.2.1.0 of the GoWeb control.

Well, I haven’t tried this, but if you are creating and adding Controls to your Page in the Page’s PreRender event, then maybe you can just call Control.OnPreRender for each of your Controls, after you have otherwise finished adding them to your Page.
I’m just worried that you might be missing other initialization that either GoView or other Controls might be expecting. You haven’t overridden CreateChildControls, since you aren’t defining a composite control, are you?

I’ve found the problem. It was pretty simple once you narrowed it down
to the PreRender event. The GoView object had been subclassed and the
PreRender event overridden. Handling the base event correctly fixed
everything.

Thanks for your help,
Calum