Hi,
I am trying to use the client API in C# (sorry don't do VB
- can read most but don't write).
I am trying to create a basic user control (ascx) to drop into a
'SmartDnnModule'. The control is created and displays as expected, and
I have finally got a client callback (I think). The problem is that I
get an alert 'Error 404: Control not found'.
If I look at the page source in the browser, I can find my control with exactly the same id as in the error message :
'dnn_ctr460_SmartDNNModule__ctl0_Button1'
BUT the control ALSO has a name field (which I am not supplying !!), and which
is different :
<input name="dnn:ctr460:SmartDNNModule:_ctl0:Button1" type="button" id="dnn_ctr460_SmartDNNModule__ctl0_Button1" value="PressMe" onclick="dnn.xmlhttp.doCallBack('Button1 dnn_ctr460_SmartDNNModule__ctl0_Button1','test',successFunc,this,errorFunc,null);" />
I am assuming that the error 404 is coming from the client-side js
code ???. If so - why can't it find my control ??. Is it looking for a
matching ID or NAME. If name - where is this being created and why is
the format different.
Much head-scratching on this one but its probably quite a simple mistake I am making ???.
aspx code is :
<input type="button" runat="server" id="Button1" value="PressMe" />
and aspx.cs is :
Button1.Attributes.Add("onclick", ClientAPI.GetCallbackEventReference(Button1, "'test'", "successFunc", "this", "errorFunc"));
NB if I replace the first parameter 'Button1' with 'Page' as suggested in the docs - I get a completely
different failure.
Finally - if we can fix this I am more than willing to send the
source code as a C# example of a user control with ClientAPI - for
those who want one )
Thanks
Regards
Graham