Connecting Tech Pros Worldwide Forums | Help | Site Map

Postback & Xml Control ViewState

BluDog
Guest
 
Posts: n/a
#1: Nov 12 '05
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

Martin Honnen
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Postback & Xml Control ViewState




BluDog wrote:

[color=blue]
> 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)[/color]

Try setting
Xml1.EnableViewState = True
[color=blue]
> Xml1.DocumentContent =
> System.Text.UTF8Encoding.UTF8.GetString(ms.ToArray )[/color]


--

Martin Honnen
http://JavaScript.FAQTs.com/
BluDog
Guest
 
Posts: n/a
#3: Nov 12 '05

re: Postback & Xml Control ViewState


On Tue, 28 Sep 2004 18:04:19 +0200, Martin Honnen <mahotrash@yahoo.de>
wrote:
[color=blue]
>Try setting
> Xml1.EnableViewState = True[/color]

Thanks but it is already set to True (default setting).
Closed Thread


Similar .NET Framework bytes