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

R

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top