View Single Post
  #1 (permalink)  
Old January 16th, 2006, 04:56 PM
wewald wewald is offline
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Page.Unload Personalization Saving

Great book Peter.

On p360 between steps 5 and 6 identifies that "the user performs some personalization activities" and "the page's data is posted back to the server".

My question is how can I trigger this (it already saves when I logout, just not when I change pages)? I was hoping I could do it via a line or two of code on the Page.Unload or similar.

Walter

(I've included the simple class code in case that helps)

_________

Imports System
Imports System.Web
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts

Partial Class Controls_CountyState_Zip
    Inherits System.Web.UI.UserControl
    Private ZipCodeSave As String
    <Personalizable(), WebBrowsable()> _
    Property ZipCodeSave1() As String
        Get
            Return ZipCode.Text
        End Get
        Set(ByVal value As String)
            ZipCode.Text = value
        End Set
    End Property

    Protected Overrides Sub CreateChildControls()
        Dim Textbox1 As New TextBox()
        Textbox1.Text = ZipCode.Text
        Controls.Add(Textbox1)
    End Sub
End Class