I try to compile a web projects with one aspx file and multiple code-behind
classes. In page-directive you can use only ONE class (file, inherits, ...).
There is no more web-proj. file in VS 2005 if you're using the new model (not
this known from VS 2003).
If I'm putting events for buttons in separate (partial) class, I get an
error that compiler couldn't find the signatures (so it doesn't put together
the partial classes by compiling the projects).
My Example (should describe the prob better), my files:
- somePage.aspx (<%@ Page AutoEventWireup ="true" CodeFile="someP age.aspx.cs"
Inherits="SomeP age" Language="C#" %>)
- somePage.aspx.c s (public partial class SomePage)
- somePageButtonE vents.aspx.cs (public partial class SomePage)
- somePageHelpers .aspx.cs (public partial class SomePage)
somePageButtonE vents.aspx.cs - contains events for buttons/radios, a so on,
on the page
somePageHelpers .aspx.cs - contains methods and events for ex. filling
dropdowns a so on.
By compiling the app I get an error "Couldn't find events for buttons,
drop-downs, ..."
Has anyone an example for such scenario?
Sebastian
"Eliyahu Goldin" wrote:
In the same way as you do it for the dlls.
An example:
public partial class MasterGrid : System.Web.UI.M asterPage
{
....
}
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Sebastian" <Se*******@disc ussions.microso ft.comwrote in message
news:94******** *************** ***********@mic rosoft.com...
Hi Everyone,
we're currently developing an web-app for insurance company. We've got a
long form-flows and view-classes (MVC) of about 2000 lines of code. Is
there
any possibility to split code-behind classes into multiple files using
partial classes? It would be helpfull to balance work on multiple
developers
working on same subject.
I've already got it done in DLL-Projects (SQL-Helper, Builders, .... ) but
how to do it in web-projects?
Thanks for help!
Sebastian