Hi,
The control won't render to the client (Browser) but binding on the
server side would take place. So there will be performance improvement.
You can improve your performance if you won't create and bind your
control at all. Consider the following code :
System.Collections.ArrayList oArr = new System.Collections.ArrayList();
for(int i = 0; i< 11 ; i++)
{
oArr.Add("string " + Convert.ToString(i) );
}
ListBox o = new ListBox();
o.Visible = true;
o.DataSource = oArr;
o.DataBind();
PlaceHolder2.Controls.Add(o);
I create dynamic listbox and add it to Placeholder. I can remove place
holder programmatically:
this.FindControl("Form1").Controls.Remove(PlaceHol der2);
causing the datalist won't be render to the client. But I can use the
same condition and instead of removing place holder simply not to create
DatatList.
Natty Gur[MVP]
blog :
http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!