This is a discussion on How to add controls into the page dynamicaly within the ASP and ASP.NET Programming forums, part of the Web Development category; How to add controls into the page dynamicaly...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| controlCount = dim.Count; ctrltxtBox = new TextBox[controlCount]; ctrllabel = new Label[controlCount]; int x = 150; for (int i = 0; i < ctrltxtBox.Length; i++) { ctrltxtBox[i] = new TextBox(); ctrllabel[i] = new Label(); ctrllabel[i].Text = (string)dim[i]; ctrltxtBox[i].Name = (string)dim[i]; ctrltxtBox[i].Location = new Point(160, x); ctrllabel[i].Location = new Point(26, x); x = x + 30; this.Controls.Add(ctrltxtBox[i]); this.Controls.Add(ctrllabel[i]); } |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ASP.NET Data Controls | Venkat | ASP and ASP.NET Programming | 133 | 10-11-2008 08:41 PM |
| How can we Dynamically create web controls | Kirubhananth | ASP and ASP.NET Programming | 3 | 03-14-2008 10:00 PM |
| 'Page' ia an unambiguous reference between 'System.Web.UI.Page' and 'Project1.Page' | poornima | ASP and ASP.NET Programming | 1 | 03-05-2008 03:12 AM |
| WebParts controls | S.Vinothkumar | ASP and ASP.NET Programming | 5 | 11-16-2007 03:06 AM |
| Asp.net controls not supported by Ajax? | Gopisoft | ASP and ASP.NET Programming | 0 | 07-17-2007 12:22 AM |