Jump to content
Software FX Community

What is the content of the saved Stream in the personalized event ?


User (Legacy)
 Share

Recommended Posts

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...