Question asked by one of interviewer in panal is given
below:
We have 2 user control on same page ,1st user control
contains textbox and a button while 2nd user control have
label.
when ever we click on button click of 1st custom control
button the value of the textBox will get updated into Label
of 2nd custom control.

How to do this.Your help will be appreciated.

Answer Posted / magesh

ControlA ctrlA =
(ControlA)Page.FindControl("<usercontrolname>");
TextBox textBoxA=(TextBox)ctrlA.FindControl("<Textbox name>");

ControlB ctrlB =
(ControlB)Page.FindControl("<usercontrolname>");
Label labelB=(Label )ctrlB.FindControl("<Textbox name>");
Label.Text=TextBox.Text;

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the asp.net page life cycle.

658


What is difference between viewstate and session in asp net?

640


What is difference between datalist and gridview?

667


Explain about asp.net state management?

696


Explain what is clr?

717






What are Session states available and its Uses?

1799


Define static function?

656


How to Separate background image and front image from original picture....

641


What is a master page and what does it do?

615


What is application in asp net?

576


what are the security certificates used in webservices?

1602


What are the disadvantages of asp.net?

686


Define data caching?

620


Explain what is an abstract class?

682


what are the Custom controls in asp.net?

662