Click to See Complete Forum and Search --> : positioning controls dynamicallya


Cristiane
July 20th, 2003, 05:19 PM
Hi...

I'm using Vb.net to my ASP.net project.. and I would like to know if is posible to position controls dynamically in asp.net.. It means... When I load my page, can I set the left and top propertys of a textbox?
I was reading in MSDN libary and I've found there that's imposible move controls dynamically but I suppose a little bit strange....
Someone could help me? If I could do that, I could decrease my project from 20 to 4 pages....
Thanks any help...
Cristiane

coolbiz
July 20th, 2003, 09:32 PM
It is possible to do so.

1. You can use the old way of formatting your form/controls - use TABLEs.

2. Set your page property PageLayout to GridLayout which will allow you to set the controls' position. Then in your code behind, you can access the Style collection of the controls and modify the .Item("Left") and .Item("Top") values to re-position the controls.

Good Luck,
-Cool Bizs

Cristiane
July 21st, 2003, 09:48 AM
Thanks coolbiz! It works great! :-)