Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > LoadViewState not firing / fired in ASP.NET 2.0

Reply
Thread Tools

LoadViewState not firing / fired in ASP.NET 2.0

 
 
J.
Guest
Posts: n/a
 
      01-19-2005
Hello,

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
http://msdn.microsoft.com/asp.net/wh.../internals.asp

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

<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<script runat="server">
protected override void LoadViewState(object savedState)
{
Trace.Write("Testing LoadViewState...");
base.LoadViewState(savedState);
}

protected override object SaveViewState()
{
Trace.Write("Testing SaveViewState...");
return base.SaveViewState();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" Runat="server" Text="Button" />
</div>
</form>
</body>
</html>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LoadViewState not firing when Control added with AddAt =?Utf-8?B?RGV2aW4gRmVuc3RlcmhlaW0=?= ASP .Net 5 11-26-2009 06:44 PM
Solution: LoadViewState not getting fired in ASP.NET 2.0 Anand Saha ASP .Net 0 07-24-2006 08:40 AM
LoadViewState not firing William F. Robertson, Jr. ASP .Net 5 04-16-2004 07:17 PM
LoadViewState not firing on PostBack Bill Biddy ASP .Net Web Controls 0 01-20-2004 08:57 PM
LoadViewState override not firing in UserControl Umbaga ASP .Net Building Controls 2 12-10-2003 04:07 PM



Advertisments