开发者

ASPX Control Injected Access

I have a situation where I add several controls at runtime. I do:

placeholder.Controls.Add(theaddedcontrol);

开发者_JAVA技巧When I collect input from the page, I do not know how to access the added controls for their values.

Any suggestions?


Use the following structure:

Control control = (Control) placeHolder.FindControl("ControlName");
Object targetProperty = control.//Target Property ...

Refer to Control.FindControl Method


You'll need to use the Control.FindControl method.

You can find more information on how to use this over at MSDN

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜