User (Legacy) Posted July 28, 2005 Report Share Posted July 28, 2005 Hi When using the dotnet toolbar on client side. Is there a way to get the clientside settings in my codebehind aspx code? I want to store the data in an databse. Example: I have a small webform with a chart ( enabled toolbar) and a button for a roundtrip. In the toolbar i click the 3D Button so the chart is displayes as 3D. Now I click the button and in my codebehind I ask the chart object "this.chart1.Chart3D.ToString();" but it returns false. So is there any way to get the settings? regards Bj Link to comment Share on other sites More sharing options...
Software FX Posted July 28, 2005 Report Share Posted July 28, 2005 What you need is what we call "Server-side Personalization". To implement it you need to do two things: 1) Set: this.Chart1.Personalized += new SoftwareFX.ChartFX.Internet.Server.PersonalizedEventHandler(this.Chart1_Personalized); Chart1.PersonalizedFlags |= PersonalizedFlags.ServerSide; In your intialization code. 2) Handle the Personalized event as follows: private void Chart1_Personalized(object sender, SoftwareFX.ChartFX.Internet.Server.PersonalizedEventArgs e) { switch (e.Action) { case PersonalizedAction.Save: Chart1.Import(e.Stream); e.Stream.Position = 0; // Save stream to DB or file (In this example I'm saving to a file) System.IO.FileStream file = System.IO.File.Create(@"d:\web\webapplication3\mychart.cfx"); byte [] data = new byte [e.Stream.Length]; e.Stream.Read(data,0,data.Length); file.Write(data,0,data.Length); file.Close(); TextBox1.Text = "Saved !"; break; case PersonalizedAction.Load: // Load Chart from File or DB using Import Chart1.Import(FileFormat.Binary,@"d:\web\webapplication3\mychart.cfx"); break; } } -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
User (Legacy) Posted July 29, 2005 Author Report Share Posted July 29, 2005 Hi Francisco Thanx for your reply. I have a big problem with your code, the Event does not occur . Do you hava any idea? Below I have posted my code behind file. I set a breakpoint in the Chart1_Personalized() method on the switch statement. But I never reached the breakpoint. (I Link to comment Share on other sites More sharing options...
Software FX Posted August 4, 2005 Report Share Posted August 4, 2005 The event should get fired when you select "Save" in the personalization menu (Client Control). Make sure your .NET permissions (in the client) are set to the appropriate level. -- Francisco Padron www.chartfx.com "Bj Link to comment Share on other sites More sharing options...
User (Legacy) Posted August 4, 2005 Author Report Share Posted August 4, 2005 Hi Have you a documentation for me what for permissions I have to set on the client? I Link to comment Share on other sites More sharing options...
User (Legacy) Posted August 5, 2005 Author Report Share Posted August 5, 2005 Hi Do you have any kind of documentation for me what for permissions I have to set on the client? I Link to comment Share on other sites More sharing options...
Software FX Posted August 5, 2005 Report Share Posted August 5, 2005 Chart FX works with Low trust, however, certain operations require unmanaged code permissions, these are: - HyperLinking - Events The reason is that these operation need to communicate with Internet Explorer which is an unmanaged application. -- Francisco Padron www.chartfx.com "Bj Link to comment Share on other sites More sharing options...
User (Legacy) Posted August 9, 2005 Author Report Share Posted August 9, 2005 Hi Can you provide me with more informations? I have set Internet Explorer security to Low trust but nothing changed. Where should I set the code permissions (Hyperlinking, events)? Do you have a link or something where this is documented? thanxs Bj Link to comment Share on other sites More sharing options...
Software FX Posted August 10, 2005 Report Share Posted August 10, 2005 I'm talking about .NET permissions, not IE. .NET permissions are controlled to the .NET Configuration tool located in your control panel. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.