开发者

best way to find webcontrols quickly

开发者 https://www.devze.com 2023-01-11 06:36 出处:网络
Request.Form[key] has a hashtable-like interface, but I doubt that\'s how it works.Is there a hashing mechanism for the c开发者_StackOverflowurrent Page control set?

Request.Form[key] has a hashtable-like interface, but I doubt that's how it works. Is there a hashing mechanism for the c开发者_StackOverflowurrent Page control set?

How would one pass along a hashed set of all controls between postbacks?


TextBox ControlId = (TextBox) FindControl("ControlId") works and this library on CodePlex has an extension to enable searching the control tree recursively, which is a common issue (where FindControl returns null or the control otherwise seems to be out of scope).

Also, you should be able to get the value of any control by checking the ControlId.Value property (or what ever the relevant property is, it is different for Label, TextBox, DropDownList, etc)

0

精彩评论

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