By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,029 Members | 1,330 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,029 IT Pros & Developers. It's quick & easy.

Postback & Xml Control ViewState

P: n/a
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.Sit e.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

Blu
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


BluDog wrote:

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.Sit e.GetType)
ser.Serialize(ms, Content.Site)
Try setting
Xml1.EnableViewState = True
Xml1.DocumentContent =
System.Text.UTF8Encoding.UTF8.GetString(ms.ToArray )

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 21 '05 #2

P: n/a
On Tue, 28 Sep 2004 18:04:19 +0200, Martin Honnen <ma*******@yahoo.de>
wrote:
Try setting
Xml1.EnableViewState = True


Thanks but it is already set to True (default setting).
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.