473,609 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Partial Types with Code Behind Pages in ASP.NET 2.0?

I just read on Slash Dot about partial types.

Now, is it possible to have a code behind split over two pages but still
referencing the same .aspx file???

If so, that would be really nice as every now and then there is some code
behind code that just gets to be a lot for a single .aspx page
Untitled.aspx
Untitled.aspx.1 .cs <- part 1 that works with Untitled.aspx
Untitled.aspx.2 .cs <- part 2 that works with Untitled.aspx

So when I hit the Untitled.aspx with my browser, it automatically JITs both
the split code behind pages together....thi s seems like something very
doable in ASP.NET 2.0.....

Jul 21 '05 #1
6 1718
Yes, that is what partial types means. You will be able to split up the
definition of your class "Untitled" between multiple .cs files.

That said, there is no guarantee that the VS IDE will support multiple
code-behind files for ASPX pages. Just because the language and framework
support it, doesn't mean the IDE will (think in-line server-sie code,
multi-file assemblies, etc).

"nospam" <n@ntspam.com > wrote in message
news:el******** ******@TK2MSFTN GP11.phx.gbl...
I just read on Slash Dot about partial types.

Now, is it possible to have a code behind split over two pages but still
referencing the same .aspx file???

If so, that would be really nice as every now and then there is some code
behind code that just gets to be a lot for a single .aspx page
Untitled.aspx
Untitled.aspx.1 .cs <- part 1 that works with Untitled.aspx
Untitled.aspx.2 .cs <- part 2 that works with Untitled.aspx

So when I hit the Untitled.aspx with my browser, it automatically JITs both the split code behind pages together....thi s seems like something very
doable in ASP.NET 2.0.....

Jul 21 '05 #2
Watch the nightmare of missmash of wizard code being, not that its bad
enough already with it stomping all over #regions, now its gona spam .cs
files.

"Joshua Flanagan" <jo**@msnews.co m> wrote in message
news:#O******** ******@TK2MSFTN GP09.phx.gbl...
Yes, that is what partial types means. You will be able to split up the
definition of your class "Untitled" between multiple .cs files.

That said, there is no guarantee that the VS IDE will support multiple
code-behind files for ASPX pages. Just because the language and framework
support it, doesn't mean the IDE will (think in-line server-sie code,
multi-file assemblies, etc).

"nospam" <n@ntspam.com > wrote in message
news:el******** ******@TK2MSFTN GP11.phx.gbl...
I just read on Slash Dot about partial types.

Now, is it possible to have a code behind split over two pages but still
referencing the same .aspx file???

If so, that would be really nice as every now and then there is some code behind code that just gets to be a lot for a single .aspx page
Untitled.aspx
Untitled.aspx.1 .cs <- part 1 that works with Untitled.aspx
Untitled.aspx.2 .cs <- part 2 that works with Untitled.aspx

So when I hit the Untitled.aspx with my browser, it automatically JITs

both
the split code behind pages together....thi s seems like something very
doable in ASP.NET 2.0.....


Jul 21 '05 #3
So, are you saying that the .aspx file will have a place for you to tell it
to
have multiple src= files?

right now all you can put is src="Untititled .aspx.cs"

Where would I put the other file name ?

"Joshua Flanagan" <jo**@msnews.co m> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Yes, that is what partial types means. You will be able to split up the
definition of your class "Untitled" between multiple .cs files.

That said, there is no guarantee that the VS IDE will support multiple
code-behind files for ASPX pages. Just because the language and framework
support it, doesn't mean the IDE will (think in-line server-sie code,
multi-file assemblies, etc).

"nospam" <n@ntspam.com > wrote in message
news:el******** ******@TK2MSFTN GP11.phx.gbl...
I just read on Slash Dot about partial types.

Now, is it possible to have a code behind split over two pages but still
referencing the same .aspx file???

If so, that would be really nice as every now and then there is some code behind code that just gets to be a lot for a single .aspx page
Untitled.aspx
Untitled.aspx.1 .cs <- part 1 that works with Untitled.aspx
Untitled.aspx.2 .cs <- part 2 that works with Untitled.aspx

So when I hit the Untitled.aspx with my browser, it automatically JITs

both
the split code behind pages together....thi s seems like something very
doable in ASP.NET 2.0.....


Jul 21 '05 #4
Ok, it has been confirmed that the IDE will use partial types, in a major
way. Partial types will be integral to the replacement of the current
code-behind method.

Paul Wilson explains the new "code beside" model in this article, about the
next version of VS.NET:
http://authors.aspalliance.com/PaulW...rticles/?id=19
"nospam" <n@ntspam.com > wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
So, are you saying that the .aspx file will have a place for you to tell it to
have multiple src= files?

right now all you can put is src="Untititled .aspx.cs"

Where would I put the other file name ?

"Joshua Flanagan" <jo**@msnews.co m> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Yes, that is what partial types means. You will be able to split up the
definition of your class "Untitled" between multiple .cs files.

That said, there is no guarantee that the VS IDE will support multiple
code-behind files for ASPX pages. Just because the language and framework
support it, doesn't mean the IDE will (think in-line server-sie code,
multi-file assemblies, etc).

"nospam" <n@ntspam.com > wrote in message
news:el******** ******@TK2MSFTN GP11.phx.gbl...
I just read on Slash Dot about partial types.

Now, is it possible to have a code behind split over two pages but still referencing the same .aspx file???

If so, that would be really nice as every now and then there is some

code behind code that just gets to be a lot for a single .aspx page
Untitled.aspx
Untitled.aspx.1 .cs <- part 1 that works with Untitled.aspx
Untitled.aspx.2 .cs <- part 2 that works with Untitled.aspx

So when I hit the Untitled.aspx with my browser, it automatically JITs

both
the split code behind pages together....thi s seems like something very
doable in ASP.NET 2.0.....



Jul 21 '05 #5
Ok, thanks.

However, how does the the MyFile.aspx.cs file know where the other part of
the partial file is in the first place.

I can see from the codebesides attrtibute "compileswi th" shows the first
partial file, but what about the second and third, etc. partial files that
go with the first file?

"Joshua Flanagan" <jo**@msnews.co m> wrote in message
news:eA******** ******@TK2MSFTN GP10.phx.gbl...
Ok, it has been confirmed that the IDE will use partial types, in a major
way. Partial types will be integral to the replacement of the current
code-behind method.

Paul Wilson explains the new "code beside" model in this article, about the next version of VS.NET:
http://authors.aspalliance.com/PaulW...rticles/?id=19
"nospam" <n@ntspam.com > wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
So, are you saying that the .aspx file will have a place for you to tell

it
to
have multiple src= files?

right now all you can put is src="Untititled .aspx.cs"

Where would I put the other file name ?

"Joshua Flanagan" <jo**@msnews.co m> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Yes, that is what partial types means. You will be able to split up the definition of your class "Untitled" between multiple .cs files.

That said, there is no guarantee that the VS IDE will support multiple
code-behind files for ASPX pages. Just because the language and framework support it, doesn't mean the IDE will (think in-line server-sie code,
multi-file assemblies, etc).

"nospam" <n@ntspam.com > wrote in message
news:el******** ******@TK2MSFTN GP11.phx.gbl...
> I just read on Slash Dot about partial types.
>
> Now, is it possible to have a code behind split over two pages but still > referencing the same .aspx file???
>
> If so, that would be really nice as every now and then there is some
code
> behind code that just gets to be a lot for a single .aspx page
>
>
> Untitled.aspx
> Untitled.aspx.1 .cs <- part 1 that works with Untitled.aspx
> Untitled.aspx.2 .cs <- part 2 that works with Untitled.aspx
>
>
>
> So when I hit the Untitled.aspx with my browser, it automatically

JITs both
> the split code behind pages together....thi s seems like something very > doable in ASP.NET 2.0.....
>
>
>



Jul 21 '05 #6
It does not have to know

The compiler knows.

I would say that the compiler first creates a list of all types (which it
needs anyway), and at this point it can link them together.

Dont forget: partial types are a COMPILER feature. They dont exist in the
assembly.

Thomas Tomiczek
THONA Software & Consulting Ltd.
(Microsoft MVP C#/.NET)

"nospam" <n@ntspam.com > wrote in message
news:eW******** ******@tk2msftn gp13.phx.gbl...
Ok, thanks.

However, how does the the MyFile.aspx.cs file know where the other part of
the partial file is in the first place.

I can see from the codebesides attrtibute "compileswi th" shows the first
partial file, but what about the second and third, etc. partial files that
go with the first file?

"Joshua Flanagan" <jo**@msnews.co m> wrote in message
news:eA******** ******@TK2MSFTN GP10.phx.gbl...
Ok, it has been confirmed that the IDE will use partial types, in a major
way. Partial types will be integral to the replacement of the current
code-behind method.

Paul Wilson explains the new "code beside" model in this article, about the
next version of VS.NET:
http://authors.aspalliance.com/PaulW...rticles/?id=19
"nospam" <n@ntspam.com > wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
So, are you saying that the .aspx file will have a place for you to tell
it
to
have multiple src= files?

right now all you can put is src="Untititled .aspx.cs"

Where would I put the other file name ?

"Joshua Flanagan" <jo**@msnews.co m> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
> Yes, that is what partial types means. You will be able to split up

the > definition of your class "Untitled" between multiple .cs files.
>
> That said, there is no guarantee that the VS IDE will support
multiple > code-behind files for ASPX pages. Just because the language and

framework
> support it, doesn't mean the IDE will (think in-line server-sie code, > multi-file assemblies, etc).
>
> "nospam" <n@ntspam.com > wrote in message
> news:el******** ******@TK2MSFTN GP11.phx.gbl...
> > I just read on Slash Dot about partial types.
> >
> > Now, is it possible to have a code behind split over two pages but

still
> > referencing the same .aspx file???
> >
> > If so, that would be really nice as every now and then there is

some code
> > behind code that just gets to be a lot for a single .aspx page
> >
> >
> > Untitled.aspx
> > Untitled.aspx.1 .cs <- part 1 that works with Untitled.aspx
> > Untitled.aspx.2 .cs <- part 2 that works with Untitled.aspx
> >
> >
> >
> > So when I hit the Untitled.aspx with my browser, it automatically JITs > both
> > the split code behind pages together....thi s seems like something very > > doable in ASP.NET 2.0.....
> >
> >
> >
>
>



Jul 21 '05 #7

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

Similar topics

43
2628
by: nospam | last post by:
I got three (3) files (1) Untitled.aspx (2) Untitled.aspx.1.cs (3) Untitled.aspx.2.cs These three files must be used together to make file #1, Untitled.aspx, page work via J.I.T. when the User first hits Internet Explorer 6.0 on your browser.
6
1409
by: nospam | last post by:
I just read on Slash Dot about partial types. Now, is it possible to have a code behind split over two pages but still referencing the same .aspx file??? If so, that would be really nice as every now and then there is some code behind code that just gets to be a lot for a single .aspx page Untitled.aspx
0
925
by: nospam | last post by:
I just read on Slash Dot about partial types. Now, is it possible to have a code behind split over two pages but still referencing the same .aspx file??? If so, that would be really nice as every now and then there is some code behind code that just gets to be a lot for a single .aspx page Untitled.aspx
16
2636
by: pawel.pabich | last post by:
Hajo, I would like to have 2 my own partial classes. For example: Default.aspx.cs Default2.aspx.cs and they both will relate to Default.aspx page.
10
2426
by: ptass | last post by:
Hi In asp.net 2.0 an aspx files .cs file is a partial class and all works fine, however, I thought I’d be able to create another class file, call it a partial class and have that compile and load as a 3rd partial class. This would be handy so i can generate standard code into one of the partial classes, while having my custom code untouched
0
8091
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8579
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8232
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7024
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6064
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5524
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4032
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1686
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.