Saturday, March 24, 2012

UpdatePanel and absolute positioning

Hi,

I have been doing alot of searching about how to use absolute positioning with the UpdatePanel. I can't seem to find anything on how htis is done. I have tried a css style sheet, as well as a div tag to no avail. I can get the control to center in the page( with the html center tag ) but i can't seem to be able to set where i like.

Could someone tell me how or put me in the right direction?

Thanks

Just put it inside a regular div, and position that whereever you like.

Hope it helps


Hi,

You know as soon as i posted this, it dawned on me on what to do, but it was to late for me to withdraw it. I had tried a div tag but it wouldn't work, maybe I had it wrong but this is the div tag that i was using...please correct me if I had wrong..

<div id="mypos" style="position:absolute">
<asp:UpdatePanel ....>

etc...

</div>

Not sure if i used it correctly. But i put the updatepanel in a panel and set the style to the panel as absolute.

Did i use the div tag incorrectly?

Thanks


yup that looks correct to me. You probably want to set the left and top style attributes of mypos aswell. good luck.


The UpdatePanel itself renders as a div tag with the same ID as the ClientID of the UpdatePanel. You can use a #UpdatePanel1 type CSS selector to directly position it, without using superfluous containers.

No comments:

Post a Comment