Infolink

 

Search This Blog

Showing posts with label How to create windows c# aaplication. Show all posts
Showing posts with label How to create windows c# aaplication. Show all posts

Nov 11, 2012

.Net C# How to dynamically add controls to a form

Dynamically Adding Controls to a Windows Form

I have a project right now who’s requirements are to dynamically create sections on a form, dynamically create items in those sections (checkboxes, text boxes, etc), and store the values entered in those boxes in a database.

Now this is no small task, but it had me thinking. It’s been a while since I wrote something that used dynamic controls. Since I’m writing the code anyway I thought I would share the technical details as to how you too can create your own controls on the fly, and hook up the events, and read the data. So many web demo’s seem to show the first and miss the next two (which would be the same as missing the point entirely..)
Related Posts Plugin for WordPress, Blogger...