Article View: borland.public.delphi.aspdotnet.components.using
Article #80Re: Adding webcontrols at running time
From: Marco Caspers
Date: Fri, 09 Sep 2005 08:05
Date: Fri, 09 Sep 2005 08:05
23 lines
1330 bytes
1330 bytes
Fabricio Vargas Matos wrote: > Can I instantiate a new webcontrol (a TextBox, for example) at > runtime? > I would like to do something like: > TextBox := System.Web.UI.WebControls.TextBox.Create; > TextBox.Page := self; > ... > and have a new TextBox in the web page. Yup, easy, almost like you did: TextBox := WebControls.TextBox.Create(); Self.Page.Controls.Add(TextBox); > But, of course, there ins't any reference of this TextBox in the aspx > file, so.... Not a problem, as long as you add it to the controls list. Hth, Marco.
Technical Details
Message-ID:
<43214254@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4321238a@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 21665a,f252a3da4b2c687a X-Google-Attributes: gid21665a,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Marco Caspers" <hexor_haxor@vaxor.com> Subject: Re: Adding webcontrols at running time Newsgroups: borland.public.delphi.aspdotnet.components.using References: <4321238a@newsgroups.borland.com> User-Agent: XanaNews/1.17.5.9 NNTP-Posting-Host: 80.127.177.130 Message-ID: <43214254@newsgroups.borland.com> Date: 9 Sep 2005 01:05:40 -0700 X-Trace: newsgroups.borland.com 1126253140 80.127.177.130 (9 Sep 2005 01:05:40 -0700) Lines: 23 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail