By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,346 Members | 2,331 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,346 IT Pros & Developers. It's quick & easy.

too many Questions.. How to Access a Field in the USER control

P: n/a
RSB
Hi all,

Sorry for asking to many questions..

one more problem.

i have a Form and in that form i am adding a user control "myUserControl"
which has two text boxes. textbox1 and textbox2.

Now if i am executing a Javascript function right inside the user control ..
say again a validation function then how do i refer to these textboxes
inside the Usercontrol.

as so far i been using this.. window.document.myform.text.value... etc etc.

but now in that user control how do i refer the textbox.
Also if i am executing the javascript Function in the Main Page then how do
i access these fields. As ASP.NEt change the name and Id of the Child
fields. as once my page is painted and if i look at the source the ID and
Name for these Text boxes is some what like this. myForm1_TextBox1 or
myForm:textBOx1.
please help...

Thanks
RSB.
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi
I am not sure if you are looking for something specific but the control inside a user control can be accessed by using
window.document.forms[0].UserControl1_txtUser.value where UserControl1 is the id of the user control and txtUser is id of a textbox inside the user control
regard
srin
Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.