.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old February 12th, 2002, 10:42 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
dynamically added user controls

Originally posted by : robin (robinvogels@yahoo.com)Hi, I have made some code which adds user controls dynamically. But the problem is that it only works when I fire it off in the Page_load sub. The thing I want to do is to submit a form, using postbacks, and then add the new controls.Can somebody help me?Thanx in advance,RobinThis is my code:dim mycontrol as control dim i as integer for i = 0 to 15 dim row AS new TableRow() dim cell1 as new TableCell() cell1.id="text" & i dim cell2 as new TableCell() cell2.id="ctrl" & i row.cells.add(cell1) row.cells.add(cell2) table1.rows.add(row) mycontrol = FindControl("text" & i) mycontrol.controls.Add(new LiteralControl("test text" & i)) dim myTextBox = new TextBox myTextBox.ID = "myTextBox" & i mycontrol=Page.FindControl("ctrl" & i) mycontrol.controls.Add(myTextBox) next

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > dynamically added user controls


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway