Greg Young wrote:
You are asking this question leads me to wonder if you are dealing with a
design problem.
Perhaps you could give more detail on why you need many partial classes?
Cheers,
Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung
"Lau Lei Cheong" <le****@yehoo.com.hkwrote in message
news:ev**************@TK2MSFTNGP02.phx.gbl...
>A few quick questions:
Is there a limitation on how much partial class files we can have for a
single class? And can a ASP.NET page file inherit a class from multiple
code-behind files? if so, do I need to point out all the codefiles in the
page directive, or just one of them is enough?
Hello:
I do not have experience in using partial class in ASP.NET webpage.
However, I have used partial class in ASP.NET web service (*.asmx).
I will assume that the ASP.NET webpage has the same effect in ASP.NET
web service.
It is OK to use partial class in ASP.NET web service.
>"do I need to point out all the codefiles in the
page directive, or just one of them is enough?"
In my experience in ASP.NET web service, it is not necessary to point
out all the codefiles in the WebService directive.
In my experience, I have one "service.asmx" and two codebehind files
"service.asmx.cs" and "service2.cs". Just the "service.asmx.cs" is in
the WebService directive in "service.asmx". "service.asmx.cs" is the
original file which was created by VS2005 and it has the webservice
attributes.
I use partial class because I want to group the testing functions in one
partial class. The testing functions are for list all the row data in
every tables in database. I can simplely remove the whole partial class
file to remove all testing functions.
P.S. I use VS2005 with the Web application project addin.
--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk