Web Forms Question:
Download Job Interview Questions and Answers PDF
How to access a control inside a UserControl in .net?
Answer:
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";
((TextBox)UC1.FindControl("TextBox1")).Text = "demo";
Download Microsoft Web Forms Interview Questions And Answers
PDF
Previous Question | Next Question |
How to disable some dates in Calendar control in web forms? | How to create a dynamic control in dot net? |