Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Problem with AJAX-WebPart and .NET 3.5 View modes: 
User avatar
Member
Member
fr-clmm - 2/23/2009 4:41:06 AM
   
Problem with AJAX-WebPart and .NET 3.5
Hello,

we changed a few days ago from .NET 2 to .NET 3.5 (exchanged web.config and bin-folder).

Since this time a web-part doesn't work correctly. This self developped webpart uses Ajax controls (since Kentico 3x, worked/works with 4x too - but only with .NET 2), a Timer checks a few parameters and requests a specially function. If enabled it uses the asp:repeater control and writes a new line...

This works - we get the lines as long as the timer is running, but finally the asp:repeater control is cleared...

There was no changed to the code, it worked fine until we changed to .NET 3.5, since this time the asp:repeater is going cleared...

We don't use the ASP-UpdatePanel Option of the webpart, which was implemented with Kentico 4.

Any idea what could be wrong? Looks a little bit like a problem with Kentico and not with .NET 3.5, but not really sure at moment...

regards
Florian

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/25/2009 9:23:57 AM
   
RE:Problem with AJAX-WebPart and .NET 3.5
Hi,

Which controls from AJAX toolkit are you using?
Isn't it possible that there were some changes in the AjaxToolkit.dll?
Could you please try to compare the controls from toolkits?

Best Regards,
Juraj Ondrus

User avatar
Member
Member
fr-clmm - 3/2/2009 8:21:28 AM
   
RE:Problem with AJAX-WebPart and .NET 3.5
Hi Juraj,

I think the AJAX toolkit runs correctly, we use this controls:

- asp:UpdatePanel (AsyncPostBackTrigger)
- ajaxToolkit:TextBoxWatermarkExtender
- ajaxToolkit:ValidatorCalloutExtender
- asp:Timer

The UpdatePanel has a Textbox with ValidationCheck (works) and a few Checkboxes which could be enabled/disabled with buttons (works) and a request-button..

The Timer runs through the checkboxes and looks if it is checked, if it is he runs through a asp procedure and responses a line to the asp:Repeater control (placed in the asp:UpdatePanel too).

This lines are shown near to end, but finally the lines cleared... i've debuged it and finally it runs to this kentico - code:


CMSAdminControls\Debug\ViewState.ascx.cs => protected override void OnPreRender(EventArgs e)
last line executed is "this.Visible = false;" - final else-code and really one of the last lines in this procedure...


After I end this procedure within VisualStudio 2008 Debugger the asp:Repeater seems to be "deleted", it isn't visibled and i couldn't find it with IE-developper-toolbar (I know it couldn't found at the normal page source code).



I'll tried it with a simple own web-project, too. There it works fine. We only created a simple as possible default.aspx and inserted a Ajax-Scriptmanager and inserted the WebPart-Code one on one - the source-code, too (ok - we cleared the kentico inerhits at top).

It really looks like the Kentico-Code will finally clear the asp:Repeater - the checkboxes and textbox are holding there state.


By the way - the lines are stored in as Session-Object (Type DataTable) - but they are shown correctly until the timer ends... any time we set the timer to enabled=false the asp:repeater is cleared (ok - we don't know what exactly happens, but it must have to do something with this), we changed the asp:repeater-ID and asp:timer-ID, but it wan't resolve the problem...

Any further idea's? I got through my code and can't find any error or something like that, and it works with Kentico 4 + ASP2 but not with Kentico 4 + ASP3.5SP1... I've cleared every validator, too - nothing is used from ASP.NET 3.5 Ajax-Extension-Toolkit..


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/5/2009 2:47:11 AM
   
RE:Problem with AJAX-WebPart and .NET 3.5
Hi again,

I am sorry for the delay. It is weird. Is it possible to send us (support@kentico.com) the web part, so I can restore it on my CMS and try to find out the reason of this? I hope it is possible and that there are no custom connections to custom DBs, etc. so it will work also on my CMS.

Thank you in advance.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
fr-clmm - 3/18/2009 6:56:12 AM
   
RE:Problem with AJAX-WebPart and .NET 3.5
Hi Juraj,

I was to busy to check whats wrong... but now I solved the problem myself.

The problem with the difference between .NET2x and .NET3.5 is a postback change with the Ajax-Timer-Control.

The update pannel at our webpart was triggered with a AsyncPostBackTrigger by the Ajax-Timer-Control. This Timer was enabled by a button and disabled after a defined runs..

.NET2x:
The Ajax-Timer-Control properties could changed but there was no postback-event triggered... The Timer-Control wasn't placed in a Ajax-UpdatePanel

.NET3.5:
The Timer-Control now triggered a postback-event, a procedure checked this event and cleared the asp:repeater-Data (own code).
To solve this problem I simply created one more Ajax-UpdatePanel and placed only the Timer-Control in this Panel... now the Timer-Control-Properties could be changed without triggering a full postback..

But - I couldn't reproduce this problem in a simple ASP-Webpage without Kentico... How ever - it works and there's currently no further problem.


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/25/2009 4:34:36 AM
   
RE:Problem with AJAX-WebPart and .NET 3.5
Hi again,

Thank you for the information. Have you experienced also any problems with this when using some Kentico's controls? If yes, which controls you have used? Thank you.

Best Regards,
Juraj Ondrus