Dynamically add link button
<p>I have a master page and content placeholder. In contentplaceholder there is a place holder for that place holder I insert a dynamic linkbutton. When i run a page link button does not show up on the page.</p>

<pre><code>for (int i = 0; i &lt; UserCredentialsDT.Rows.Count; i++)
{
    switch (Convert.ToInt32(UserCredentialsDT.Rows[i]["RoleId"]))
    {
        case (int)Helper.UserRole.Administrator:
            Session[AppConstants.ROLEID] = UserCredentialsDT.Rows[i]["RoleId"];
            LinkButton lnkAdmin = new LinkButton();
            lnkAdmin.Text = "Admin";
            lnkAdmin.ID = "lnkAdmin" + i.ToString();
            PlaceHolder1.Controls.AddAt(PlaceHolder1.Controls.Count, lnkAdmin);
            lnkAdmin.Visible = true;
            lnkAdmin.PostBackUrl = PresentationConstant.ASPX_ADMINSETTINGS;
            break;
     }
 }
</code></pre>
