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

LoadViewState not firing / fired in ASP.NET 2.0

P: n/a

I'm trying to override the LoadViewState-method of a simple page using
the .NET Framework 2.0. However, the LoadViewState-method in the code
below never gets executed. The SaveViewState-method gets executed on
every page request as described in

Can anyone pinpoint the problem? (Or am I just a dumbass?)

<%@ Page Language="C#" %>
<script runat="server">
protected override void LoadViewState(object savedState)
Trace.Write("Testing LoadViewState...");

protected override object SaveViewState()
Trace.Write("Testing SaveViewState...");
return base.SaveViewState();
<html xmlns="" >
<head runat="server">
<title>Untitled Page</title>
<form id="form1" runat="server">
<asp:Button ID="Button1" Runat="server" Text="Button" />
Nov 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.