Accessing Child Control from a user control bY Java Script
-
hi, I have a user control with one textbox(ie a javascript calender). I want to access the value of text box by javascript User control name: Cal1 textbox ID=txt_Date By Binu Varghese
-
hi, I have a user control with one textbox(ie a javascript calender). I want to access the value of text box by javascript User control name: Cal1 textbox ID=txt_Date By Binu Varghese
You will need to output the client id of the control (i.e. txt_date.clientID) to the page as a javascript variable. The client id depends on the nesting of the user control in other server controls on the page.
-
You will need to output the client id of the control (i.e. txt_date.clientID) to the page as a javascript variable. The client id depends on the nesting of the user control in other server controls on the page.
i didn't get you, how to output the clientID of the text box. Can u help me to solve the problem.?
-
i didn't get you, how to output the clientID of the text box. Can u help me to solve the problem.?
Either put it in the mark up as an attribute on the text box, or assign it in the code behind : tbYourTextBox.ClientID.