I&#039;m new to .net and am in the process of converting an application from classic asp (VBScript) to .net (C#).<BR><BR>The application I&#039;m converting display a group of hyperlinks, that are retrieved from a database. The groups of links need to be generated at specific location on the form, so I&#039;m using Placeholders, to mark the location. The Placeholder IDs are links1, links2, and links3. (The IDs aren&#039;t necessarily sequential, I&#039;m just simplifying for the sake of this post)<BR><BR>On my code behind page, I&#039;ve written a function that queries the database for the links, then builds the web control and assigns it to the corresponding Placeholder ID. <BR><BR>This works fine as long as I only have one Placeholder defined or if I duplicate the code for each Placeholder.<BR><BR>What I&#039;d like to do is use a single block of code to generate all the controls, based on a variable that is passed to the function. The variable would correspond to the Placeholder ID of the control I want to generate i.e. buildCategory(2) would generate the control where the links2 Placeholder resides on the form.<BR><BR>What I can&#039;t fingure out is how to generate the controls without explicity naming the Placeholder.<BR><BR>Below is my code: <BR>[code language="C#"]<BR>private void Page_Load(object sender, System.EventArgs e)<BR>{<BR>buildCategory2();<BR>buildCategory3();< BR>}<BR>public void buildCategory2()<BR>{<BR>...<BR>links2.Controls.Ad d(newlink);<BR>...<BR>}<BR>public void buildCategory3()<BR>{<BR>...<BR>links3.Controls.Ad d(newlink);<BR>...<BR>}<BR>[/code]<BR><BR>I&#039;m trying to write something like:<BR><BR>[code language="C#"]<BR>private void Page_Load(object sender, System.EventArgs e)<BR>{<BR>buildCategory(2);<BR>buildCategory(3);< BR>}<BR>public void buildCategory(int idVAr)<BR>{<BR>...<BR>PlaceHolder ph = new PlaceHolder();<BR>ph.ID = "links" + idVar.ToString();<BR>ph.Controls.Add(newlink);<BR> ...<BR>}<BR>[/code]<BR><BR>The code builds without errors, but nothing is returned to the page.<BR><BR>Any help would be appreciated.