开发者

How To get Child User Control Value on the Button Click of Parent User Control

开发者 https://www.devze.com 2023-03-19 05:57 出处:网络
I have a Button on the Parent User control and a text box on the child user control. Now I wants to get the text 开发者_高级运维from the Text box on the click of Parent Button click.

I have a Button on the Parent User control and a text box on the child user control.

Now I wants to get the text 开发者_高级运维from the Text box on the click of Parent Button click.

I mean I want to get the Child user control values from the parent.

How can i do it in asp.net.


dalvir , you should use events for these , raise a event on the child control and listen the same on the parent

here is the answer for you

Sharing value from child to parent control


It is all there in your Form control collection... you can try

TextBox text = Form.FindControl("name") as TextBox; 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号