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.



Question asked by one of interviewer in panal is given below: We have 2 user control on same page..

Answer / 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

More ASP.NET Interview Questions

What is Stateless ASP or ASP.Net?

2 Answers   Accenture,


Rate yourself in .net and sql database?

1 Answers   BrickRed, Infosys, Satyam, SP Software,


Can we create a multiple user simultaneously ?

0 Answers   MCN Solutions,


version information is mentioned in which file

3 Answers   AG Technologies,


How do I create a web form?

0 Answers  






What are the event handlers that we can have in global.asax file?

0 Answers  


When you are running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003?

0 Answers   BirlaSoft,


What is advantage of viewstate and what are benefits ?

1 Answers  


How many view state can be hold by a aspx page ?

3 Answers   Intellevate,


Give real time examples for polymorphism, encapsulation, inheritance..

2 Answers   L&T,


Are cookies stored on server or client?

0 Answers  


can u any one tell me clearly where is stored cache datas?

2 Answers   Apollo,


Categories