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
How to bind all the binding controls in a page at once in ASP.NET?
What are the events that happen when a client requests an asp.net page from iis server?
How many types cache in asp net?
Can you explain architecture of your project ?
How Can assign alias name for ASP.NET Web API Action?
What is session in web technology?
Can you explain the importance of finalize method in .net?
What is the difference between response.redirect and server.transfer?
What are different methods of session maintenance in asp.net?
Which is better asp.net or php?
What are the types of caching in asp.net?
Give me one example of Web API Routing?
Why is string called immutable data type?
What are the security types in asp.net?
Will the asp.net validators run in server side or client side? How do you do client-side validation in .net?