When I tried to use the syntax such as toPage.Form1.Controls.Add(), it didn't work because I had code block. I realize that it is not possible to add a control to a form if code blocks are present in it. So, once I removed all the code blocks, I was able to add the control. I don't see the point in here. This means I have to replace all my code blocks with labels and have my Page_Load() to parse string in all those labels instead. So, as I have to add controls at run time, I will never be able to use code blocks. Way to go WWC, at least we had full control over the code block at run time when using that product.