Web Forms Question:
Download Questions PDF

How to access a control inside a UserControl in .net?


Assume there is a user control called UC and there is only a TextBox control inside it. Now drag this user control into a web page, you can use the following code to visit the TextBox control.

((TextBox)UC1.FindControl("TextBox1")).Text = "demo";

Download Microsoft Web Forms Interview Questions And Answers PDF

Previous QuestionNext Question
How to disable some dates in Calendar control in web forms?How to create a dynamic control in dot net?