I am creating a custom datepicker and everything is working fine except. I can't seem to access the textboxes clientID.
In my custom control I have a textbox and an image, which is a link.
I need to pass the textboxes ClientID with this link, but I can't seem to get it.
Here's my code
I have tried JHATextBox.ClientID as well, but I still can't get the clientID of the textBox control.VB Code:
Protected Overrides Sub CreateChildControls() Controls.Clear() JHATextBox = New TextBox JHATable = New Table JHARow = New TableRow JHATextCell = New TableCell JHAEmptyCell = New TableCell JHAImageCell = New TableCell JHATextCell.Controls.Add(JHATextBox) [color=red]JHAImageCell.Text = "<a href=""javascript:LookupDate(Form1, " & Me.JHATextBox.ClientID & ", document.forms[0]." & Me.JHATextBox.ClientID & ".value)""><img alt=""Show Calendar"" src=""/Common/images/btn_calendar.gif"" border=""0"">"[/color] JHARow.Cells.Add(JHATextCell) JHARow.Cells.Add(JHAEmptyCell) JHARow.Cells.Add(JHAImageCell) JHATable.Rows.Add(JHARow) Controls.Add(JHATable) End Sub
Any ideas?




Reply With Quote