473,385 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

PageStatePersister

I'm extending the asp.net 2.0 page class to use a pagestateadapater,
and thereby am attempting to "roll my own" pagestatepersister. But I
keep getting the error "No overload for method PageStatePersister,
takes '0' arguments" when attempting to build the following very basic,
simple class. Any ideas? Thanks much.

using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using System.IO;

namespace AnnawareViewState
{
public class AnnawarePage : System.Web.UI.PageStatePersister
{
public AnnawarePage(Page myPage)
{
}

public override void Load()
{
}

public override void Save()
{
}
}
}

Nov 19 '05 #1
1 1194
The error message is a bit misleading.

What it is trying to tell you is that the PageStatePersister class
constructor requires a parameter, you can pass along the myPage
parameter like so:

public AnnawarePage(Page myPage) : base(myPage)
{

}

--
Scott
http://www.OdeToCode.com/blogs/scott/

On 18 Aug 2005 13:29:24 -0700, "PhatTim" <ti*******@gmail.com> wrote:
I'm extending the asp.net 2.0 page class to use a pagestateadapater,
and thereby am attempting to "roll my own" pagestatepersister. But I
keep getting the error "No overload for method PageStatePersister,
takes '0' arguments" when attempting to build the following very basic,
simple class. Any ideas? Thanks much.

using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using System.IO;

namespace AnnawareViewState
{
public class AnnawarePage : System.Web.UI.PageStatePersister
{
public AnnawarePage(Page myPage)
{
}

public override void Load()
{
}

public override void Save()
{
}
}
}


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Mantorok | last post by:
It's not unusual (to be lo....cough) for me to have VIEWSTATE ranging from 1 full page to several pages..... This seems in-efficient - any ideas how to reduce the thing? Thanks Kev
4
by: Umut Tezduyar | last post by:
I want to get rid of the hidden field _VIEWSTATE. I tried these: I tried to disable ViewState property. I tried to override Page's RegisterHiddenField method. I tried to override Page's...
1
by: cheloman12 | last post by:
Hi, I posted this problem some days ago. I repeat it because it was no answered. If description is confused, please make me know and i'll try to explain the case better. Thanks a lot, Marcelo...
3
by: Kevin | last post by:
We have a base class that is responsible for creating the navigation and look and feel of our applications. So all our web pages inherit from this base page so they don't have to worry about the...
3
by: Peter Row | last post by:
Hi, I'm using VS2005 / .NET 2.0 and would just like to know if there is way to instruct ASP.NET to use an ID/name other than __VIEWSTATE to store the pages viewstate in? The main reason is...
1
by: bill | last post by:
Hi folks, we have a scenario whereby we're not too worried about cpu cycles on the server, and much more worried about users with slow up-stream connections to the server. Our goal is to... 1)...
0
by: jamestilby | last post by:
Hi all, Hope someone can help with this - I am tearing my hair (singular) out. I developed an application using asp.net 2.0 and Mobile Controls. Up till now I have been testing it with a...
6
by: Ivan Gasparetto | last post by:
Is it possible to change the __VIEWSTATE id? The reason is we shouldn't have any id starting with underscores on XHTML pages. Thank you
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.