handles a control in a formview in asp.net
Asked Answered
P

1

0

How can I do a handles from a control contened in a formview, in code only i can see formview but not the controls in the inserttemplate.

thank for any help

Puce answered 20/8, 2011 at 0:39 Comment(0)
M
1

You have to use the FindControl method to find a control.

TextBox txtEmail = (TextBox)FormView1.FindControl("ControldID");

This is because the controls that are in the DataBound Controls are not directly accessible. To Access these controls, you have to use the FindControl method and cast it in appropriate control.

Multifarious answered 20/8, 2011 at 0:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.