|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Textbox and onTextChanged EventI create a textbox control programatically something like this: Dim td As New TableCell() Dim txtbox As New TextBox() txtbox.ID = "my_textbox" td.Controls.Add(txtbox) Now I want to programatically associate a "OnTextChanged" event to this textbox. How can I do this? When I view the page source, the ID of the textbox control is something like "ctl00$my_textbox". So the textbox ID actually gets changed. Can anyone point me to an example or a link that explains how to do this? TIA. - Paul for serverside event associate the TextChanged event
If you want to refer this textbox in the client side use the ClientId property of the control. Show quoteHide quote "Paul" <P***@discussions.microsoft.com> wrote in message news:C1CC08D0-7639-4024-BE52-7B1CAB58CE10@microsoft.com... > Hello: > > I create a textbox control programatically something like this: > > Dim td As New TableCell() > Dim txtbox As New TextBox() > txtbox.ID = "my_textbox" > td.Controls.Add(txtbox) > > Now I want to programatically associate a "OnTextChanged" event to this > textbox. > > How can I do this? > > When I view the page source, the ID of the textbox control is something > like > "ctl00$my_textbox". So the textbox ID actually gets changed. > > Can anyone point me to an example or a link that explains how to do this? > > TIA. > > - Paul
TreeView not expanding in some browsers
SQLDataSource binding to treeview control when using "FOR XML" on select WebControl with CSS and Javascript Copying A Control Not As A Reference sorting in a datagrid Copy & paste with a command button? Concatenate field values ReportViewer Full Trust Required? TimeOfDay control Slider control |
|||||||||||||||||||||||