Jump to content
Software FX Community

Using Ajax


User (Legacy)

Recommended Posts

Hi,

Like some of the others, I am evaluating the software for a project I am

doing. I need the ability to update the charts without refreshing the

page, just the chart. I have some controls that will change our data set

and the chart should update. I am familiar with doing this in AJAX with

Java, but I like the features your product has. I am working with our

.net developer to figure out how to integrate the charts with AJAX. Can

you provide some information on how to go about making the data

updatable with out refreshing the page? I couldn't find any thing on the

support site.

Thanks

Tom

Link to comment
Share on other sites

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message 

news:wuu4fl0tGHA.2444@webserver3.softwarefx.com...

> Your inquiry prompted me to release the following KB article:

>

> Q7651001. Chart FX for VS 2005 and AJAX

>

> http://support.softwarefx.com/ShowArticle.aspx?Type=KB&Product=CfxNet70&Source=http://support.softwarefx.com/kb/765/1/001.htm

>

> This should get you in the right direction.

>

> --

> Francisco Padron

> www.chartfx.com

>

Link to comment
Share on other sites

Oops, I hit send by accident on the previous reply... please ignore the 

blank message.

Thanks for your reply. I believe it will solve the issue we are having. I

am having a bit of trouble compiling the sample from the KB article or

implementing the changes in my own application. I get the following

compilation error:

Error 4 The type or namespace name ´UserCallbackEventArgs´ could not be

found (are you missing a using directive or an assembly reference?)

C:\Documents and Settings\Gabor\My Documents\Visual Studio

2005\WebSites\CfxAjax2\Default.aspx.cs 68 52 C:\...\CfxAjax2

Thanks for your help,

Gabor Maghera

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:wuu4fl0tGHA.2444@webserver3.softwarefx.com...

> Your inquiry prompted me to release the following KB article:

>

> Q7651001. Chart FX for VS 2005 and AJAX

>

> http://support.softwarefx.com/ShowArticle.aspx?Type=KB&Product=CfxNet70&Source=http://support.softwarefx.com/kb/765/1/001.htm

>

> This should get you in the right direction.

>

> --

> Francisco Padron

> www.chartfx.com

>

Link to comment
Share on other sites

Great! Thanks for your effort, it is appreciated. I am sure it will be 

valuable to others as well.

Gabor, who posted the other response, is actually doing the development

and I'm just helping with the Ajax portion. I'll look over the

documentation today and point out anything that doesn't make sense to me.

Again, thanks

Tom

Link to comment
Share on other sites

I get the same error message with the Ajax samples and use version

7.0.2330.23824 and it says that this is the

most updated version available.

I have a evaluation version of Chart Fx for Visual Studio 2005

Regards

Magnus Salgo

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:qQYtw%23%23tGHA.2136@webserver3.softwarefx.com...

> You need the latest Service Pack.

>

> Please download from our Web Site.

>

> --

> Francisco Padron

> www.chartfx.com

>

>

Link to comment
Share on other sites

When I run the example and I click certain controls (not all of them) I get 

an error saying a .png file already exists. I was able to work around this

issue, by manually deleting the images from the Temp folder before using the

controls mentioned. Am I supposed to turn off temporary image creation when

using AJAX?

Thanks,

Gabor Maghera

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:GE4DT8luGHA.2136@webserver3.softwarefx.com...

> Please contact Software FX Support to obtain a HotFix including the latest

> changes.

>

> --

> Francisco Padron

> www.chartfx.com

>

Link to comment
Share on other sites

No. Is this something your debugger is trapping or something that's actually 

crashing your app.

There are cases in which this exception id thrown but we catch it, it

doesn't cause any problems. It is perfectly normal.

Another thing you should be aware of. You can not make two callbacks from

the same client at the same time. You must wait for one call to finish

before starting the next. This logic must be part of the script. For

simplicity reasons, the sample application doesn't deal with this kind of

things, for example if you were to press the ""Fire UserCallback" button

repeatedly very fast you may get this error.

Which UI is controls are generating the error ?

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

The error is trapped by the debugger.  It happens when using the 

"Enable/Disable Chart UI checkbox", the "Use Callbacks for Clicks" checkbox,

and the "Add Custom Command to Toolbar" button. It does not occur when using

the "Fire UserCallback" button or the "Make Callback to User Control" link.

Here is the error message for one of them (the other ones differ only in the

name of the png file referenced):

#####################################################################

The file ´C:\Documents and Settings\Gabor\My Documents\Visual Studio

2005\WebSites\CfxAjax2\chartfx70\Temp\CFV0810_032727179E1.png´ already

exists.

Description: An unhandled exception occurred during the execution of the

current web request. Please review the stack trace for more information

about the error and where it originated in the code.

Exception Details: System.IO.IOException: The file ´C:\Documents and

Settings\Gabor\My Documents\Visual Studio

2005\WebSites\CfxAjax2\chartfx70\Temp\CFV0810_032727179E1.png´ already

exists.

Source Error:

An unhandled exception was generated during the execution of the current web

request. Information regarding the origin and location of the exception can

be identified using the exception stack trace below.

Stack Trace:

[iOException: The file ´C:\Documents and Settings\Gabor\My Documents\Visual

Studio 2005\WebSites\CfxAjax2\chartfx70\Temp\CFV0810_032727179E1.png´

already exists.]

ChartFX.WebForms.Internal.b.a(OutputText A_0, Exception A_1,

IServerControl A_2) +813

ChartFX.WebForms.Chart.a(Stream A_0, IOutputWriter A_1, OutputText A_2,

OutputText A_3, OutputInfo A_4) +2517

ChartFX.WebForms.Chart.a(OutputText A_0, OutputText A_1, Boolean A_2,

String A_3, String A_4) +546

ChartFX.WebForms.Chart.Render(HtmlTextWriter output) +135

System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,

ControlAdapter adapter) +74

System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter

adapter) +291

System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,

ICollection children) +234

System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53

System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)

+98

System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter

writer) +43

System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +333

System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,

ControlAdapter adapter) +74

System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter

adapter) +291

System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49

System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)

+56

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,

ICollection children) +234

System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53

System.Web.UI.Control.Render(HtmlTextWriter writer) +31

System.Web.UI.Page.Render(HtmlTextWriter writer) +39

System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,

ControlAdapter adapter) +74

System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter

adapter) +291

System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49

System.Web.UI.Page.ProcessRequestMain(Boolean

includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5537

#####################################################################

Thanks for your help,

Gabor

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:xBbOwSMvGHA.1292@webserver3.softwarefx.com...

> No. Is this something your debugger is trapping or something that´s

> actually crashing your app.

>

> There are cases in which this exception id thrown but we catch it, it

> doesn´t cause any problems. It is perfectly normal.

>

> Another thing you should be aware of. You can not make two callbacks from

> the same client at the same time. You must wait for one call to finish

> before starting the next. This logic must be part of the script. For

> simplicity reasons, the sample application doesn´t deal with this kind of

> things, for example if you were to press the ""Fire UserCallback" button

> repeatedly very fast you may get this error.

>

> Which UI is controls are generating the error ?

>

> --

> Francisco Padron

> www.chartfx.com

>

Link to comment
Share on other sites

To makes sure I understand correctly:

If you run your Web application OUTSIDE of the debugger everything works

fine. if this is the case this is perfectly normal, make sure when you debug

you only stop on the exceptions that are NOT handled. This can be controlled

under the Debug - Exceptions menu in Visual Studio 2005.

--

Francisco Padron

www.chartfx.com

"Gabor Maghera" <gmaghera@loanforte.com> wrote in message

news:yM4tcyMvGHA.2572@webserver3.softwarefx.com...

> The error is trapped by the debugger. It happens when using the

> "Enable/Disable Chart UI checkbox", the "Use Callbacks for Clicks"

> checkbox, and the "Add Custom Command to Toolbar" button. It does not

> occur when using the "Fire UserCallback" button or the "Make Callback to

> User Control" link.

>

> Here is the error message for one of them (the other ones differ only in

> the name of the png file referenced):

>

> #####################################################################

> The file ´C:\Documents and Settings\Gabor\My Documents\Visual Studio

> 2005\WebSites\CfxAjax2\chartfx70\Temp\CFV0810_032727179E1.png´ already

> exists.

> Description: An unhandled exception occurred during the execution of the

> current web request. Please review the stack trace for more information

> about the error and where it originated in the code.

>

> Exception Details: System.IO.IOException: The file ´C:\Documents and

> Settings\Gabor\My Documents\Visual Studio

> 2005\WebSites\CfxAjax2\chartfx70\Temp\CFV0810_032727179E1.png´ already

> exists.

>

> Source Error:

>

>

> An unhandled exception was generated during the execution of the current

> web request. Information regarding the origin and location of the

> exception can be identified using the exception stack trace below.

>

>

> Stack Trace:

>

>

> [iOException: The file ´C:\Documents and Settings\Gabor\My

> Documents\Visual Studio

> 2005\WebSites\CfxAjax2\chartfx70\Temp\CFV0810_032727179E1.png´ already

> exists.]

> ChartFX.WebForms.Internal.b.a(OutputText A_0, Exception A_1,

> IServerControl A_2) +813

> ChartFX.WebForms.Chart.a(Stream A_0, IOutputWriter A_1, OutputText A_2,

> OutputText A_3, OutputInfo A_4) +2517

> ChartFX.WebForms.Chart.a(OutputText A_0, OutputText A_1, Boolean A_2,

> String A_3, String A_4) +546

> ChartFX.WebForms.Chart.Render(HtmlTextWriter output) +135

> System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,

> ControlAdapter adapter) +74

> System.Web.UI.Control.RenderControl(HtmlTextWriter writer,

> ControlAdapter adapter) +291

> System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49

> System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,

> ICollection children) +234

> System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53

> System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter

> writer) +98

> System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter

> writer) +43

> System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +333

> System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,

> ControlAdapter adapter) +74

> System.Web.UI.Control.RenderControl(HtmlTextWriter writer,

> ControlAdapter adapter) +291

> System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49

> System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)

> +56

> System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,

> ICollection children) +234

> System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53

> System.Web.UI.Control.Render(HtmlTextWriter writer) +31

> System.Web.UI.Page.Render(HtmlTextWriter writer) +39

> System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,

> ControlAdapter adapter) +74

> System.Web.UI.Control.RenderControl(HtmlTextWriter writer,

> ControlAdapter adapter) +291

> System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49

> System.Web.UI.Page.ProcessRequestMain(Boolean

> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5537

> #####################################################################

>

> Thanks for your help,

> Gabor

>

>

> "SoftwareFX Support" <noreply@softwarefx.com> wrote in message

> news:xBbOwSMvGHA.1292@webserver3.softwarefx.com...

>> No. Is this something your debugger is trapping or something that´s

>> actually crashing your app.

>>

>> There are cases in which this exception id thrown but we catch it, it

>> doesn´t cause any problems. It is perfectly normal.

>>

>> Another thing you should be aware of. You can not make two callbacks from

>> the same client at the same time. You must wait for one call to finish

>> before starting the next. This logic must be part of the script. For

>> simplicity reasons, the sample application doesn´t deal with this kind of

>> things, for example if you were to press the ""Fire UserCallback" button

>> repeatedly very fast you may get this error.

>>

>> Which UI is controls are generating the error ?

>>

>> --

>> Francisco Padron

>> www.chartfx.com

>>

>

>

Link to comment
Share on other sites

I think I was a little bit unclear in my earlier message.  I am getting the 

prompt about the exception in the browser while I am running my application

with debugging enabled. The error comes up in the browser, not in the IDE.

Not a big deal though, I got what I needed from your responses in this

thread and the KB article you pointed me to, I just thought I´d mention the

issue I was having with the sample provided, in case it is of any

informational value.

Gabor

"Software FX Support" <noreply@softwarefx.com> wrote in message

news:nL3YJmivGHA.1280@webserver3.softwarefx.com...

> To makes sure I understand correctly:

>

> If you run your Web application OUTSIDE of the debugger everything works

> fine. if this is the case this is perfectly normal, make sure when you

> debug you only stop on the exceptions that are NOT handled. This can be

> controlled under the Debug - Exceptions menu in Visual Studio 2005.

>

> --

> Francisco Padron

> www.chartfx.com

>

>

> "Gabor Maghera" <gmaghera@loanforte.com> wrote in message

> news:yM4tcyMvGHA.2572@webserver3.softwarefx.com...

>> The error is trapped by the debugger. It happens when using the

>> "Enable/Disable Chart UI checkbox", the "Use Callbacks for Clicks"

>> checkbox, and the "Add Custom Command to Toolbar" button. It does not

>> occur when using the "Fire UserCallback" button or the "Make Callback to

>> User Control" link.

>>

>> Here is the error message for one of them (the other ones differ only in

>> the name of the png file referenced):

>>

>> #####################################################################

>> The file ´C:\Documents and Settings\Gabor\My Documents\Visual Studio

>> 2005\WebSites\CfxAjax2\chartfx70\Temp\CFV0810_032727179E1.png´ already

>> exists.

>> Description: An unhandled exception occurred during the execution of the

>> current web request. Please review the stack trace for more information

>> about the error and where it originated in the code.

>>

>> Exception Details: System.IO.IOException: The file ´C:\Documents and

>> Settings\Gabor\My Documents\Visual Studio

>> 2005\WebSites\CfxAjax2\chartfx70\Temp\CFV0810_032727179E1.png´ already

>> exists.

>>

>> Source Error:

>>

>>

>> An unhandled exception was generated during the execution of the current

>> web request. Information regarding the origin and location of the

>> exception can be identified using the exception stack trace below.

>>

>>

>> Stack Trace:

>>

>>

>> [iOException: The file ´C:\Documents and Settings\Gabor\My

>> Documents\Visual Studio

>> 2005\WebSites\CfxAjax2\chartfx70\Temp\CFV0810_032727179E1.png´ already

>> exists.]

>> ChartFX.WebForms.Internal.b.a(OutputText A_0, Exception A_1,

>> IServerControl A_2) +813

>> ChartFX.WebForms.Chart.a(Stream A_0, IOutputWriter A_1, OutputText A_2,

>> OutputText A_3, OutputInfo A_4) +2517

>> ChartFX.WebForms.Chart.a(OutputText A_0, OutputText A_1, Boolean A_2,

>> String A_3, String A_4) +546

>> ChartFX.WebForms.Chart.Render(HtmlTextWriter output) +135

>> System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,

>> ControlAdapter adapter) +74

>> System.Web.UI.Control.RenderControl(HtmlTextWriter writer,

>> ControlAdapter adapter) +291

>> System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49

>> System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,

>> ICollection children) +234

>> System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53

>> System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter

>> writer) +98

>> System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter

>> writer) +43

>> System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +333

>> System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,

>> ControlAdapter adapter) +74

>> System.Web.UI.Control.RenderControl(HtmlTextWriter writer,

>> ControlAdapter adapter) +291

>> System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49

>> System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter

>> writer) +56

>> System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,

>> ICollection children) +234

>> System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53

>> System.Web.UI.Control.Render(HtmlTextWriter writer) +31

>> System.Web.UI.Page.Render(HtmlTextWriter writer) +39

>> System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,

>> ControlAdapter adapter) +74

>> System.Web.UI.Control.RenderControl(HtmlTextWriter writer,

>> ControlAdapter adapter) +291

>> System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49

>> System.Web.UI.Page.ProcessRequestMain(Boolean

>> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

>> +5537

>> #####################################################################

>>

>> Thanks for your help,

>> Gabor

>>

>>

>> "SoftwareFX Support" <noreply@softwarefx.com> wrote in message

>> news:xBbOwSMvGHA.1292@webserver3.softwarefx.com...

>>> No. Is this something your debugger is trapping or something that´s

>>> actually crashing your app.

>>>

>>> There are cases in which this exception id thrown but we catch it, it

>>> doesn´t cause any problems. It is perfectly normal.

>>>

>>> Another thing you should be aware of. You can not make two callbacks

>>> from the same client at the same time. You must wait for one call to

>>> finish before starting the next. This logic must be part of the script.

>>> For simplicity reasons, the sample application doesn´t deal with this

>>> kind of things, for example if you were to press the ""Fire

>>> UserCallback" button repeatedly very fast you may get this error.

>>>

>>> Which UI is controls are generating the error ?

>>>

>>> --

>>> Francisco Padron

>>> www.chartfx.com

>>>

>>

>>

>

>

Link to comment
Share on other sites

I have been using the following function, from the KB article you mention 

below:

SFX_SendUserCallback(´Chart1´,´My Param Data´,false);

I cannot find documentation on this function (perhaps because it is part of

a hotfix). What is the purpose of the last parameter of boolean type?

Thanks,

Gabor

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:wuu4fl0tGHA.2444@webserver3.softwarefx.com...

> Your inquiry prompted me to release the following KB article:

>

> Q7651001. Chart FX for VS 2005 and AJAX

>

> http://support.softwarefx.com/ShowArticle.aspx?Type=KB&Product=CfxNet70&Source=http://support.softwarefx.com/kb/765/1/001.htm

>

> This should get you in the right direction.

>

> --

> Francisco Padron

> www.chartfx.com

>

Link to comment
Share on other sites

Yes. This is part of a HotFix and there is a KB article / Sample program 

that goes with it.

Q7651001. Chart FX for VS 2005 and AJAX

http://support.softwarefx.com/ShowArticle.aspx?Type=KB&Product=CfxNet70&Source=http://support.softwarefx.com/kb/765/1/001.htm

The parameter is called postBack and it is true if you want to make a

PostBack and false if you want to make a callback.

If all you are updating in your user command is the chart or if you take

care of updating any other controls in the page by returning a state from

the UserCallBack event, then you will use callbacks. Callbacks will use AJAX

to refresh the chart and any other objects (provided you write the Java

Script to do it) . Postbacks will navigate to a brand new page refreshing

everything in it.

--

Francisco Padron

www.chartfx.com

"Gabor Maghera" <gmaghera@loanforte.com> wrote in message

news:vs6OjqxwGHA.2572@webserver3.softwarefx.com...

>I have been using the following function, from the KB article you mention

>below:

> SFX_SendUserCallback(´Chart1´,´My Param Data´,false);

>

> I cannot find documentation on this function (perhaps because it is part

> of a hotfix). What is the purpose of the last parameter of boolean type?

>

> Thanks,

> Gabor

>

> "SoftwareFX Support" <noreply@softwarefx.com> wrote in message

> news:wuu4fl0tGHA.2444@webserver3.softwarefx.com...

>> Your inquiry prompted me to release the following KB article:

>>

>> Q7651001. Chart FX for VS 2005 and AJAX

>>

>> http://support.softwarefx.com/ShowArticle.aspx?Type=KB&Product=CfxNet70&Source=http://support.softwarefx.com/kb/765/1/001.htm

>>

>> This should get you in the right direction.

>>

>> --

>> Francisco Padron

>> www.chartfx.com

>>

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...