M
msch-prv
Please bear with me: I am a newbie at ASP.NET 2.0.
I created an aspx file that calls up a js calendar when the date icon
is clicked. The date selected by the user is copied back into the
textbox. This works fine on a single aspx file.
When I include the same code in the content page of a slave file, the
textbox ID changes its ID name causing the js code to fail. Code
excerpt:
<asp:TextBox ID="datBeg1" runat="server" maxlength="25" />
<a href="javascript:NewCal('datBeg1','ddmmyyyy',true,24)">
<img src="icons/cal.gif" width="16" height="16" border="0"
alt="Pick a date"></a>
The browser reveals that TextBox ID changed to smthg. like
'ctl00_CONTENT_datBeg1', causing the program to crash. In the single
aspx file, the textbox ID remains constant. I am puzzled.
Thanks for any ideas, Mark
I created an aspx file that calls up a js calendar when the date icon
is clicked. The date selected by the user is copied back into the
textbox. This works fine on a single aspx file.
When I include the same code in the content page of a slave file, the
textbox ID changes its ID name causing the js code to fail. Code
excerpt:
<asp:TextBox ID="datBeg1" runat="server" maxlength="25" />
<a href="javascript:NewCal('datBeg1','ddmmyyyy',true,24)">
<img src="icons/cal.gif" width="16" height="16" border="0"
alt="Pick a date"></a>
The browser reveals that TextBox ID changed to smthg. like
'ctl00_CONTENT_datBeg1', causing the program to crash. In the single
aspx file, the textbox ID remains constant. I am puzzled.
Thanks for any ideas, Mark