Question about adding controls to a winform
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.
加载中,请稍侯......
精彩评论