开发者

Question about adding controls to a winform

开发者 https://www.devze.com 2023-01-05 00:04 出处:网络
In .NET Winforms, if I have some code which does something such as execute a stored proc against a SQL Server but I do not know how many parameters there are, can I add more controls to the form with

In .NET Winforms, if I have some code which does something such as execute a stored proc against a SQL Server but I do not know how many parameters there are, can I add more controls to the form with the cont开发者_开发百科rols appearing straight away?

Thanks


Not sure exactly what you're asking here, but you can always add controls to a form dynamically. So, for example, if your code can determine that a stored procedure requires three string parameters, you could dynamically add three text boxes (plus three labels) to your form to allow users to enter values for these three parameters.

0

精彩评论

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