Showing posts with label originally. Show all posts
Showing posts with label originally. Show all posts

Saturday, March 24, 2012

Panel in div with rounded corners grows beyond div height when using RoundedCorners

I had originally posted this in the Atlas forum by mistake. Sorry for the double post.

I am just learning CSS so forgive me if this is something simple but I have a div that has a height of 50px. If I add a panel to that div and set it's height to 100% without the rounded corner extender it fills the div as you would expect. When I add the rounded corner extender to the panel it grows to 142px. If I remove the RoundedCornerExtender it displays correctly.

Any idea what is causing this?

Here is some sample code:

<

headrunat="server"><title>Panel expanding beyond div height.</title>

</

head>

<

atlas:ScriptManagerID="ScriptManager1"runat="server">

</

atlas:ScriptManager>

<

body><formid="form1"runat="server"><divid="Wrapper"style="vertical-align: top; width: 750px;"><divid="Header"style="vertical-align: top; background-color: White; padding: 4px;

height: 50px; width: 100%;">

<asp:PanelID="pnlHeader"runat="server"BackColor="Blue"ForeColor="White"Height="100%"HorizontalAlign="Center"Width="100%">This should only be 50px high.</asp:Panel></div><divid="Content"></div><divid="Footer"></div></div></form>

<cc1:RoundedCornersExtenderID="RoundedCornersExtender1"runat="server">

<cc1:RoundedCornersPropertiesTargetControlID="pnlHeader"Color="Blue"Radius="7"/>

</cc1:RoundedCornersExtender>

</

body>It's the Height="100%" on pnlHeader that's confusing things. If you can change that to Height="50", the results seem to be what you want.

Thanks for the thought. But wouldn't the height setting on the Header limit it to 50px? I have found a workaround by creating a cssClass for the panel and setting the height there and not using the Height=100% within the control.

My original use of the 100% within the control was working until the July CTP. Again thanks for the assistance. Something must have changed in the July CTP that caused this to happen.

Wednesday, March 21, 2012

Partial Page Updates

I have a page that originally had just one update panel that held everything inside of a few collapable panels on a 15 seconds timer trigger. The collapsable panels where sluggish in performance so I changed code where there were multiple update panels on the same 15 second timer trigger inside of the update panel that is not on a 15 second timer trigger. The problem is that I placed a label that wrote the current time to see if the outside panel was updating and it's still acting like it's on a timer like the ones inside the collapsable panels...but it's not on a timer anymore, just the inner update panels are. I've setEnablePartialRenderingto "true" in the script manager. What's my problem?

Here's my suedo-layout to give you a basic idea:

<timer1>
<updatepanel>
<content>
<label for current time>
<collapseablepanel extender>
<collapseablepanel1>
<updatepanel1>
<content></content>
<trigger=timer1></trigger>
</updatepanel1>
</collapsablepanel1>
<collapseablepanel2>
<updatepanel2>
<content></content>
<trigger=timer1></trigger>
</updatepanel2>
</collapsablepanel2>
<collapseablepanel3>
<updatepanel3>
<content></content>
<trigger=timer1></trigger>
</updatepanel3>
</collapsablepanel3>
</collapsablepanel extender>
</content>
</updatepanel>

Two things,

Firstly label control's update panel should be closed and rest should be seperate.

secondly try using literal control


Set the Timer as a trigger for the outer UpdatePanel.


I just want all of the inner update panels to update on the timer. The outer one is just for the collapsable panel extender, but it still updates with the rest of the inner ones for some reason. That's my problem; I just want the inner ones to update on the timer, but the outer one is updating even though it doesn't have a timer associated with it.


Set ChildrenAsTriggers to false on the outer one then. It's true by default.

Thank you! That worked...also, if I have 4 update panels set to the same trigger will it be like my page is loading 4 times? Should I do something different there?


The multiple panels shouldn't have a significant impact on performance either way. You can be sure by watching your page operate in Fiddler or FireBug, but it should just trigger a single partial postback per Tick that updates all four panels with its response.