Parse my winForm to store all textbox values into an array.
Posted on 2008-10-23
Hi, I have created a form with textbox and droplist. I have named them by group. Eg :
private System.Windows.Forms.TextBox p1_ctl00_CPPC_ctrlShipToAddress_txtName;
private System.Windows.Forms.TextBox p1_ctl00_CPPC_ctrlShipToAddress_txtDepartment;
private System.Windows.Forms.ComboBox p1_ctl00_CPPC_ctrlShipToAddress_ddlCountry;
Have you may notice, they all start by "p1_" because I have an other group that I have named "p2_" and so one, so I can individualy manage group fields.
What I need to do is to parse the whole form and store their name excluding the "p1_" in a Array because de name of the item refers to a specific name on a webApplication.
I am pretty new to C# and need assistance to figure this out.