Groups | Blog | Home
all groups > dotnet xml > september 2004 >

dotnet xml : Postback & Xml Control ViewState



BluDog
9/28/2004 11:42:46 AM
Hi

I have an Xml control that reflects a tree structure from a serialized
object that is generated in the Page_Load event:

If Not IsPostBack Then

Dim ms As New IO.MemoryStream
Dim ser As New
System.Xml.Serialization.XmlSerializer(Content.Site.GetType)
ser.Serialize(ms, Content.Site)
Xml1.DocumentContent =
System.Text.UTF8Encoding.UTF8.GetString(ms.ToArray)

End If

The transform source is static and therefore set at design time. The
problem i have is that when the postback occurs the Xml control does
not maintain it's transformed document. I cannot perform the transform
when there is a postback because the tree structure is reset.

Any ideas would be greatly appreciated.

Thanks

Martin Honnen
9/28/2004 6:04:19 PM


[quoted text, click to view]


[quoted text, click to view]

Try setting
Xml1.EnableViewState = True

[quoted text, click to view]


--

Martin Honnen
BluDog
9/29/2004 10:01:19 AM
On Tue, 28 Sep 2004 18:04:19 +0200, Martin Honnen <mahotrash@yahoo.de>
[quoted text, click to view]

AddThis Social Bookmark Button