netdocs
Junior Member
Posts: 2
Registered: 11/20/2003
Location: Leicester
Member Is Offline
|
| posted on 11/20/2003 at 03:15 PM |
|
|
asp.net - Error calling the Ctrl : no target specified
asp.net - Error calling the Ctrl : no target specified
I get this error when the page runs. I've read previously that this means that the input control specified does not exist.
I have a textbox within a form and the script under the form calls the textbox as this:
var cal1 = new calendar1(document.all.Textbox10.text);
Although this doesn't seem to work. I thought it might be due to a form name being required, so I tried this but it gave the same error.
Anyone with any ideas?
Does the Pro version solve these problems?
Thanks,
Graham.
|
|
|
vdeepakkumar
Junior Member
Posts: 2
Registered: 6/25/2004
Member Is Offline
|
| posted on 6/25/2004 at 10:19 AM |
|
|
ClientId
Hi:
You can not pass TextBox10 as is. Since ASP.NET would have generated a unique name for the control like
ctrl_TextBox10 etc. [You cancheckthis in ViewSource]/
Use TextBox10.ClientId to get the actual generated ID and send this to the calendar constructor.
|
|
|