User (Legacy) Posted May 9, 2003 Report Share Posted May 9, 2003 Hi, I'm using this event to save the custom configuration for my user in a file. But how to retrieve it automatically on the server side ? This is my code to save the personalization settings : Private Sub Chart1_Personalized(ByVal sender As Object, ByVal e As SoftwareFX.ChartFX.Internet.Server.PersonalizedEventArgs) Handles Chart1.Personalized Trace.Warn(e.Action.ToString()) If e.Action = SoftwareFX.ChartFX.Internet.Server.PersonalizedAction.Save Then Trace.Warn("Save perso", "save action from chart") Trace.Warn("Save perso", e.Stream.CanRead) Trace.Warn("Save perso", e.Stream.GetType().ToString()) If e.Stream.CanRead Then Dim memstr As System.IO.MemoryStream = e.Stream Dim tmp As System.IO.FileStream tmp = New System.IO.FileStream(ConfigurationSettings.AppSettings("StorageFolder") & "\tmp1.txt", IO.FileMode.Create, IO.FileAccess.Write) memstr.WriteTo(tmp) tmp.Close() End If End If End Sub But the "Load" event is generated only when the user click "Load My Chart", and I want to load it automatically during the Page_Load event on the server. So, there is an Import method, but I dopn't know how to use it, all my tests generates errors and there no samples in the documentation. thanks. -- ---------------------------------------------------- This mailbox protected from junk email by Matador from MailFrontier, Inc. http://info.mailfrontier.com Link to comment Share on other sites More sharing options...
Software FX Posted May 16, 2003 Report Share Posted May 16, 2003 The personalized event will be generated (as you noticed) when the user clicks "Load My Chart", normally when user select "Save my Chart" you will save the stream (that includes the chart settings minus the data) in a filesystem or database and will recognize the user that owns this chart. If you want to automatically display the chart when the page is first displayed you will have to get the chart (from the filesystem or database assuming you are again recognizing the user) and call the Import method in your Page_Load event. -- Regards, JC Software FX Support "J Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.