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
What r the asp.net list controls and difference between them?
Contrast OOP and SOA. What are tenets of each ?
What is the difference between asp.net and mvc?
Define secured sockets layer.
If Instancing = Single use for ActiveX Exe, how will this be executed if there are 2 consecutive client requests ?
Which method is used to force all the validation controls to run?
What is a ashx file?
What is the full form of asp.net?
Explain the features that make asp.net more used framework? : asp.net mvc
Which class is used to send an email message from an ASP.NET Web page?
Why SessionID changes in every request in asp.net?
what is silver light when will we use silver light,
Which of the following .NET framework supports Web API?
What is a postback in asp net?
Can we add code files of different languages in app_code folder?