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

how to include timer or counting time to display next page in asp.net

1599


How does a content page differ from a master page?

503


How long the items in ViewState exists?

962


Can we set master page as a start page?

538


What is Bundling and Minification in MVC?

576






If Instancing = Single use for ActiveX Exe, how will this be executed if there are 2 consecutive client requests ?

1965


To display data in a Repeater control which template you provide?

586


What are the disadvantages of asp.net?

586


How many web config files can be created for an application?

446


What are cookies in asp.net?

569


What are the different kinds of assemblies?

520


What is application state?

511


Whats the difference between registerclientscriptblock, registerclientscriptinclude and registerclientscriptresource?

582


Explain how can you debug your .net application?

531


Explain the updatepanel?

580