[英]How to create a page with dynamic controls in asp.net? How can I define a control collection?
In my ASP.NET web application project I want to create a page with dynamic controls. 在我的ASP.NET Web应用程序项目中,我想创建一个带有动态控件的页面。 Please see the details. 请查看详细信息。 I have aa Page named AddNotificationParameters.aspx. 我有一个名为AddNotificationParameters.aspx的页面。 While passing a querystring parameter to this page it needs to load controls based on the querystring. 在将querystring参数传递到此页面时,它需要基于querystring加载控件。 The controls will be different based on the querystring parameter. 根据querystring参数,控件将有所不同。 What is the best approach to handle these types of scenario. 什么是处理此类情况的最佳方法。 Pls advice 请咨询
Use a gridview or repeater and bind the data to it. 使用gridview或Repeater并将数据绑定到它。 Then you can generate dynamic controls using it. 然后,您可以使用它生成动态控件。 This is just a vague idea. 这只是一个模糊的想法。 Please post more details for getting an exact idea. 请发布更多详细信息以获取确切的想法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.