Page 1 of 1

Postback events not fired in composite control

Posted: Thu Apr 20, 2006 6:35 pm
by 8879772
Hi,

Two years ago we had this problem with postback events: http://www.teechart.net/support/viewtop ... webcontrol

We are now porting our application on VS2005 and .NET framework 2.0 and the problem is back with our composite controls using TeeChart. I downloaded TeeChart v2 (2.0.2040.15118 eval.) to see if our "old" version (1.1.1675.27998) was the problem. Unfortunatly, the problem is still present in the v2 evaluation version of TeeChart.

Everything works fine when we switch back our webserver to .NET framework 1.1 (v1 and v2 of TeeChart).

I'm now trying to figure out a workaround, but I was wondering if you have a quick solution for us.

Regards,

Martin

Found the problem...

Posted: Thu Apr 20, 2006 8:06 pm
by 8879772
I finally found what was going wrong. The problem is that the postback signature has changed in .NET 2.0.

In .NET 1.1, the postback data key was something lilke "MyContainerControl:MyChart"

In .NET 2.0, the postback data key is "MyContainerControl$MyChart"

I looked at the code of your last build of TeeChart v1, and in the WebChart.cs file there is following line in method "LoadPostData":

...
while (nameKey.IndexOf(":")!=-1)
nameKey=nameKey.Substring(nameKey.IndexOf(":")+1);
...

I just replaced the ":" by "$", recompiled the dll and it works fine now. I'm looking forward to see if it solves all my problems, but the problem is for sure in this method.

Regards,

M.