473,385 Members | 1,582 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.

Using a class derived from System.Web.UI.Page

Hello All,

I would like to create a class which is derived from System.Web.UI.Page, to
implement my own LoadPageStateFromPersistenceMedium so I've done this:

public class MyCustomPage : System.Web.UI.Page
{
protected override void LoadPageStateFromPersistenceMedium()
{
// some code
}
}

and then

public class WebForm1 : MyCustomPage

However, thid does not work (e.g. All I get is a blank page!).

So, my question is this: how do you create a class derived from
System.Web.UI.Page and use it ?

Thanks.
Regards,
George Ionescu
Nov 18 '05 #1
2 1294
Solved it by moving the class into a separate cs file (it was int the main
page, which was quite stupid).

Thanks to anyone who might have responded ...

"George Ionescu" <ge********@hotmail.com> wrote in message
news:#I*************@TK2MSFTNGP12.phx.gbl...
Hello All,

I would like to create a class which is derived from System.Web.UI.Page, to implement my own LoadPageStateFromPersistenceMedium so I've done this:

public class MyCustomPage : System.Web.UI.Page
{
protected override void LoadPageStateFromPersistenceMedium()
{
// some code
}
}

and then

public class WebForm1 : MyCustomPage

However, thid does not work (e.g. All I get is a blank page!).

So, my question is this: how do you create a class derived from
System.Web.UI.Page and use it ?

Thanks.
Regards,
George Ionescu

Nov 18 '05 #2
You may find this useful:
http://www.123aspx.com/redir.aspx?res=30375
Store viewstate information on the web server to avoid corrupted viewstate
and browser limitations.
--
Joe Fallon

"George Ionescu" <ge********@hotmail.com> wrote in message
news:es**************@TK2MSFTNGP09.phx.gbl...
Solved it by moving the class into a separate cs file (it was int the main
page, which was quite stupid).

Thanks to anyone who might have responded ...

"George Ionescu" <ge********@hotmail.com> wrote in message
news:#I*************@TK2MSFTNGP12.phx.gbl...
Hello All,

I would like to create a class which is derived from System.Web.UI.Page,

to
implement my own LoadPageStateFromPersistenceMedium so I've done this:

public class MyCustomPage : System.Web.UI.Page
{
protected override void LoadPageStateFromPersistenceMedium()
{
// some code
}
}

and then

public class WebForm1 : MyCustomPage

However, thid does not work (e.g. All I get is a blank page!).

So, my question is this: how do you create a class derived from
System.Web.UI.Page and use it ?

Thanks.
Regards,
George Ionescu


Nov 18 '05 #3

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

Similar topics

11
by: z_learning_tester | last post by:
Hello, yes another beginner question that I'm sure is obvious to many here :-) My book is so bad. Really. It uses the exact same example of code for using the new kw and for using virtual(in the...
5
by: Marcel Gelijk | last post by:
Hi, I am trying to create a User Control that is located in a seperate class library. The User Control contains a textbox and a button. The page generates an exception when it tries to access...
4
by: Vladimír Kolesnik | last post by:
Hi there, does anybody know, how to create a class, which is can be inherited by both aspx (System.Web.UI.Page) as well as by ascx (System.Web.UI.UserControl) classes. I have the bunch of same...
6
by: Ken Varn | last post by:
I have an ASP.NET application that is calling a custom class that is trying to parse all of the members of my Page object using Type.GetMembers(). The problem that I am having is that private...
10
by: Chad Miller | last post by:
I currently have a base form that I inherit. The base for has a custom event. The event will not raise threw the inherited form. I was wondering if events work threw inheritance or should I use...
0
by: hamstak | last post by:
I had developed a custom base page class for the 1.1 framework which I have now migrated to the 2.0 framework. I discovered that the new partial class system -- which appears to "automagically"...
1
by: Peter Nofelt | last post by:
Hey All, I am having issue with serializing a class and its base class using ..net 2.0. I am using IXmlSerializable I've provided code displaying my at the bottom of this post. Thanks ahead...
6
by: ivan.leben | last post by:
I want to write a Mesh class using half-edges. This class uses three other classes: Vertex, HalfEdge and Face. These classes should be linked properly in the process of building up the mesh by...
12
by: Gordon | last post by:
I want to provide a set of static functions in a superclass that work with class constants defined in a decendant of that class. Unfortunately I've run into a snag with this idea. Example: ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.