Wednesday, March 28, 2012

Dificult to reproduce : problems with webpartzones inside updatePanel

Hi !

That's very dificult to reproduce.

I'm creating a new website. I'm using the default webserver of Visual Studio 2005.

The home page users master pages and has a lot of user controls. The scriptManager and the webpartmanager are in masterpage.

One of the user controls uses three panels with ColapsiblePanelExtender. It's working now, after discovered It doesn't work without documentType tag.

The user controls are inserted in the master page, including a top menu with a top banner.

In the main page I have an UpdatePanel with two webpartzones and some webparts. I also have an UpdateProgress

The problems started when I tried to put outputcache in some user controls, like header and footer of the page.

1st Problem : The webParts in the middle don't allow to change position any more. When I move the webParts, the server is contacted (UpdateProgress works), answer is received but nothing change.

This happens sometimes. First I thinked it was cache, so I take out outputcache from all user controls and tried again, inserting outputcache one by one.

So I discovered that when I get this problem, if I delete the temporary directory for this application (in ASP.NET temp folder), close the webserver (and related process) and delete the browser cache the problem disappears.

2nd Problem : After insert outputcache in some user controls, something difference started to happend - when I move one webpart it changes, but the top banner change it's position, changing the page layout!

The UpdatePanel and webparts are in default.aspx page. Default.aspx uses one masterPage. Inside this master page is the top.ascx user control. Inside this control is the banner. So, something in the page change the layout, making the banner changes Its position!

In the moment I will undo all the cache changes, one by one, trying to discover wich change created this problema, but I don't believe one of the cache changes could do this.

With all this problems, the development becames too slow.

[]'s

Dennes

Hi !

I solved the banner problem, but I still don't know why it happend.

The original HTML was like this :

<style type="text/css" title="Portal BufaloInfo"><!--#banner {position:absoluteleft:284pxtop:21pxwidth:468height:60z-index:1}--></style><div id="banner"><a href="#"><img src="images/banner_468_60.gif" width="468" height="60" border="0"></a></div>

I changed to :

<div id="banner" style="position:absolute;left:284px;top:21px;width:468;height:60;z-index:1"><a href="#"><img src="images/banner_468_60.gif" width="468" height="60" border="0"></a></div>

So, now it works. Before this change, when the style was applied to DIV tag the banner was correct, when not, the banner apears in other position.

The main question is : Why the updatePanel, after a refresh, was changing the way this style was applied ?

[]'s

Dennes


Hi !

This seems to be a problem between Alas and IE, or something like that.

After I corrected the banner problem, IE stoped to apply the style to the rest of the page, to the entire page.

Like before : The pages start correct, after UpdatePanel has communicate with the server, the style disappears.

[]'s

Dennes

No comments:

Post a Comment