Question on Using Partial Types with ASP.NET via J.I.T.

G

Guest

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.


MY QUESTION to the Microsoft ASP.NET and C# teams.

I know how file #2,Untitled.aspx.1.cs, is connected and can be found by file
#1, the Untitled.aspx page.
How does file #3, Untitled.aspx.2.cs, get found by the file #1 when I the
first time with Internet Explorer?

IN OTHER WORDS, I am NOT using pre-compile for VS.NET to make these file
compile together.
I would be just using J.I.T. compiling like you do now with src= attribute
in a ASP.NET page.
 
A

Armin Zingler

nospam said:
I got three (3) files

(1) Untitled.aspx
(2) Untitled.aspx.1.cs
(3) Untitled.aspx.2.cs
[...]


This is a VB.NET group. Please post to the *most* appropriate group(s) only.
 
C

Cor

Hi Nospam,

I am curious, what is the reason that you post this questions to a VB.net
language related newsgroup?

Cor
 
C

Cowboy \(Gregory A. Beamer\)

Are you working with ASP.NET 2.0? I would assume so, since you are talking
partial classes. If so, you are likely working with the PDC alpha, which is
not feature complete.

Just to run with it, one idea to try would be to place the second partial
class file into the SRC directory and take advantage of the code compiling
ability. Not sure how it would work on partial classes, however, so it is
simply an experiment.

If you are in ASP.NET 1.x, please add more detail, as I am lost.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
J

Jay B. Harlow [MVP - Outlook]

nospam,
Have you considered asking in the Whidbey newsgroups?
http://communities.microsoft.com/newsgroups/default.asp?icp=whidbey&slcid=us

Did the ASP.NET 2.0 article I refer you too the other day help?

http://msdn.microsoft.com/asp.net/w...library/en-us/dnaspp/html/codecompilation.asp

Or one of the articles on the following page?
http://msdn.microsoft.com/asp.net/whidbey/
MY QUESTION to the Microsoft ASP.NET and C# teams.
Why are you bothering the VB.NET users then?

Hope this helps
Jay
 
G

Guest

Yes, I looked at every link you posted...still doesn't answer the question.


Let me ask you, do you understand what my question is exactly referring to?

Some people here are just shooting into the wind with their answers.
 
G

Guest

VB is going to have Partial Types right?

(1) Untitled.aspx
(2) Untitled.aspx.1.vb
(3) Untitled.aspx.2.vb

happy?
 
G

Guest

I know the PDC alpha is not feature complete.

I just want to know how Microsoft is "attempting" to implement this partial
type feature with ASP.NET pages using JIT compiling.

Do you understand the original question? YES or NO

The more successful, as well as larger, 1.1 .NET web sites don't use
CodeBehind= attribute, they use src= attribute as it allows them to have
fully separated pages that can be easily FTP's to the server and changes can
be made rapidly without affecting the entire web site. These commercial
sites also tend to use Text Editors, HomeSite, Dreamweaver, icsharp, Web
Matrix, etc other than VS.NET as their sites need to be USABLE by millions
of people, not to mention reliable.

As you already know in ASP.NET 2.0 Whidbey, there are several compiling
options. One of which is a separate dll for each .aspx page which wasn't in
the VS.NET 2003 versions.

Those who knew better realized the CodeBehind= attribute and the single dll
file was a very very BAD architectural pattern for web development and
maintenance, not to mention reliability.


But enough of that, JIT for a Partial Types on a .aspx page will allow
people to build MORE RICH .aspx pages by making it more manageable when some
of the code is split inbetween 2 or more code behind files.
 
G

Guest

I don't know how to read the Microsoft C# and ASP.NET teams' mind...that's
why I decided to ASK them.......
 
G

Guest

Because someone in the C# might know or the VB.NET team might know...THAT'S
WHY!!!

For of all, IT'S not a real problem as it has even been implemented in the
first place.
 
A

Armin Zingler

nospam said:
VB.NET is going to have Partial Types right?

(1) Untitled.aspx
(2) Untitled.aspx.1.vb
(3) Untitled.aspx.2.vb

happy?

Why do you post to the C# group, if it is, as you think, a VB.NET issue?
Maybe it is independent from the language as it affects both languages?
Maybe it's a framework or/and asp problem?

You can't blame the modem manufacturer for a broken phone line.
 
C

Cor

This is your message:
MY QUESTION to the Microsoft ASP.NET and C# teams.
I know how file #2,Untitled.aspx.1.cs, is connected and can be found by file
#1, the Untitled.aspx page.
How does file #3, Untitled.aspx.2.cs, get found by the file #1 when I the
first time with Internet Explorer?
IN OTHER WORDS, I am NOT using pre-compile for VS.NET to make these file
compile together.
I would be just using J.I.T. compiling like you do now with src= attribute
in a ASP.NET page.

You know know how file #2,Untitled.aspx.1.cs, is connected and can be found
by file
#1, the Untitled.aspx page, how does file #3, Untitled.aspx.2.cs, get found
by the file #1 when the first time with Internet Explorer?

You are not using pre-compile for VS.NET to make these file compile
together.
You would use J.I.T. compiling like you do now with src= attribute in a
ASP.NET page.

You would do that, so what is your problem if you knows everything?

Happy

Cor
 
J

Jay B. Harlow [MVP - Outlook]

Nospam,
I explained the way I understood ASP.NET 1.1 to work the other day. Which I
get the impression does not coincide with the way you understand it to work.
:-(
Some people here are just shooting into the wind with their answers.
I hope you realize the assembly I was referring to IS NOT the assembly
created by VS.NET!!!

It is the assembly created by ASP.NET after it converts your ASPX page to C#
or VB.NET, the first time anyone visits the page. This assembly is then JIT
as the executable code is needed.

I hope you realize that .NET is not able to execute source code (ASPX, C# or
VB.NET), that the source code needs to be converted (compiled) into an
assembly. That ASP.NET will take your ASPX page convert it into a C# or
VB.NET source file, which it then compiles with other C# or VB.NET source
files to create an assembly. That ASP.NET will then call methods in this
assembly (which causes the assembly to be JIT) which causes your HTML to
appear in the browser. I don't have the specific reference handy, I
understand that each aspx page generates its own assembly.

VS.NET simply allows you to compile all its Code Behind pages into a
different assembly ahead of time.

You want to know in Whidbey when the assembly is created by ASP.NET, how
does it know where to find the third file. I'm curious if its even
supported, or is that what you are attempting to find out, is it even
supported? One of the articles I referred you to mentions a /Code folder (in
addition to the /Bin folder used by VS.NET) that you can place source files
to utility classes in, however I got the impression from the article this is
NOT for your 'third' file, I may however be wrong and /Code is where your
"third" file belongs...

Unfortunately all I know about ASP.NET Whidbey is the articles I pointed you
to, the above is based on ASP.NET 1.1.

Hope this helps
Jay
 
A

Armin Zingler

nospam said:
Because someone in the C# might know or the VB.NET team might
know...THAT'S WHY!!!

Then you didn't understand the purpose of the group hierarchy - or you
should post to all groups you can find because in each group might be anyone
that can help you.

That's why I wrote, you should post to the *most* appropriate group.
 
E

Eric Newton

You're really getting into inheritance and not partial classes...

partial classes were intended to be used for some of the auto code
generators like the DataSet generator and the Web Service Reference code gen
so that you could make some changes in a more stable file while the code gen
could write its changes into a much less stable file.

when you say reusing code you should be inheriting from a more common base
class, then you achieve other important advantages like polymorphism and so
forth.
 
C

Cor

Hi Nospam,
The more successful, as well as larger, 1.1 .NET web sites don't use
CodeBehind= attribute, they use src= attribute as it allows them to have
fully separated pages that can be easily FTP's to the server and changes
can

Some take a horse, others a car, I am glad I am living in a democratic
country where I can decide most common things for myself.

Cor
 
G

Guest

Try not to speak for Microsoft unless you really have information on partial
classes.

And especially try not to talk to polymorphism as anything worth doing in a
*real* production environment when reliability and true maintainability is
needed.

And I wouldn't get so hung up on code reuse either as there is so much the
industry has to learn on real life programming in real life world.

I personally think a lot of programmers have their heads in books, example
codes, and magazine articles instead of REAL production code in a REAL
production environment. White boards and UML is a lot different than a
fully working and dependable web application where someone actually has to
maintain it instead of telling some other programmer to do it.



Eric Newton said:
You're really getting into inheritance and not partial classes...

partial classes were intended to be used for some of the auto code
generators like the DataSet generator and the Web Service Reference code gen
so that you could make some changes in a more stable file while the code gen
could write its changes into a much less stable file.

when you say reusing code you should be inheriting from a more common base
class, then you achieve other important advantages like polymorphism and so
forth.

--
Eric Newton
C#/ASP Application Developer
(e-mail address removed)-software.com [remove the first "CC."]

nospam said:
I know the PDC alpha is not feature complete.

I just want to know how Microsoft is "attempting" to implement this partial
type feature with ASP.NET pages using JIT compiling.

Do you understand the original question? YES or NO

The more successful, as well as larger, 1.1 .NET web sites don't use
CodeBehind= attribute, they use src= attribute as it allows them to have
fully separated pages that can be easily FTP's to the server and changes can
be made rapidly without affecting the entire web site. These commercial
sites also tend to use Text Editors, HomeSite, Dreamweaver, icsharp, Web
Matrix, etc other than VS.NET as their sites need to be USABLE by millions
of people, not to mention reliable.

As you already know in ASP.NET 2.0 Whidbey, there are several compiling
options. One of which is a separate dll for each .aspx page which wasn't in
the VS.NET 2003 versions.

Those who knew better realized the CodeBehind= attribute and the single dll
file was a very very BAD architectural pattern for web development and
maintenance, not to mention reliability.


But enough of that, JIT for a Partial Types on a .aspx page will allow
people to build MORE RICH .aspx pages by making it more manageable when some
of the code is split inbetween 2 or more code behind files.




message news:%[email protected]... which
is I
the
 
B

Bret Mulvey [MS]

nospam said:
The more successful, as well as larger, 1.1 .NET web sites don't use
CodeBehind= attribute, they use src= attribute as it allows them to have
fully separated pages that can be easily FTP's to the server and changes can
be made rapidly without affecting the entire web site. These commercial
sites also tend to use Text Editors, HomeSite, Dreamweaver, icsharp, Web
Matrix, etc other than VS.NET as their sites need to be USABLE by millions
of people, not to mention reliable.

Does Microsoft.com qualify as a successful, larger commercial web site? I
develop for Microsoft.com and use ASP.NET 1.1 extensively. We use CodeBehind
quite a lot (and also Src--it depends on the needs of the specific project).
I use VS.NET exclusively, for both the Codebehind and the Src cases. Not
text editors, HomeSite, Dreamweaver, etc. The site is usable (and used) by
millions of people, and is reliable.

Being an MS employee I admit I have a bias, but for what it's worth I use
VS.NET every day for super large scale web projects and I find it easy and
fun. I enjoy my job very much, and VS.NET makes me very productive.

Changes to large-scale web sites are not undertaken lightly. When we need to
change a codebehind dll we do so in a very managed way, with extensive
testing and controlled deployment. But we do it on a regular basis.
Codebehind is not at all a hinderence.

I tend to use Src instead of Codebehind when the page classes are less
reusable and more isolated to a specific smaller part of the site. Some
parts of our site aren't even in "application" directories where we can use
\bin folders and global.asax, so for these isolated areas we use Src.

I'm afraid I can't answer your original question about partial types as I
have not yet had the occasion to work with ASP.NET 2.0.
 
G

Guest

COMMENTS INLINE BELOW.....


Bret Mulvey said:
Does Microsoft.com qualify as a successful, larger commercial web site? I
develop for Microsoft.com and use ASP.NET 1.1 extensively. We use CodeBehind
quite a lot (and also Src--it depends on the needs of the specific project).
I use VS.NET exclusively, for both the Codebehind and the Src cases. Not
text editors, HomeSite, Dreamweaver, etc. The site is usable (and used) by
millions of people, and is reliable.


Who did the look and feel of the Microsoft site? I find it hard to believe
you did it all in VS.NET
You know, and I know, what tool makes more usable sites and that's
Dreamweaver hands down.
You can't even do tables with VS.NET, the most fundamental thing in Web
Pages.
I would say GotDotNet and Hotmail are designed first in something other than
VS.NET


Plus, how many transactions are really going through the Microsoft.com site?
It took you, microsoft.com, more than TWO (2) years to convert parts of your
web site to .aspx pages

But since you use src= quite a lot, at least how I see it, you can see that
CodeBehind is only being used because it's a microsoft thing as when push
comes to shove, you had to use src=.

Plain and simple, VS.NET are simply not productive on web sites. Windows
stuff YES, but Web stuff, no way in the world. The ASP.NET stuff I see on
the macromedia newgroups blows aways the VS.NET stuff hands down. In fact,
even though they have very little people using Dreamweaver for .NET stuff
they seem to have MORE web sites and they are thousands to times better.

CASE IN POINT, if VS.NET was so good, why is every single newsgroup and even
INETA still use the IBuySpy portal or DotNetNuke? They sites essentially
have no creative programming and these site are essentially identical to
each other. All one has to do is look at the DesktopDefault.aspx page and
you know exactly what that site is capable of. Furthermore, because there
are nothing new, one cannot even tell if they have really been tested in a
business environment when things change and reliability is paramount.

Nevertheless, after more than 2.5 years we are now seeing more and more
sites....but one has got to ask how they are really done....But come 2.5
years later...Mr. BILL is right, DOT NET is SLOWWWWWW GOING.

It took you guys 3 years to figure out that when you create a project you
don't add 10 new files/folders that the user has no idea what they do. You
don't add .resx files and all those folders of who know what...... I told
you this THREE (3) years ago...you finally are getting it.

You are still even working on ZERO touch deployment after 6
years...constantly trying to FIX what never worked.
You also GOT RID of those FRONT PAGE EXTENSIONS in Whidbey...YEAHHHH!!!!!
ONLY SIX (6) years to figure that one out.....


Look at all the changes is Whidbey!!!! VS.NET is looking more and more like
Dreamweaver.....property nesting tag bar at the bottom, clean projects,
easier FTP......DUHHHHHHH!!!!!!, Design and Code view highlight
syncronization, leave the html code just like it is.......

Oh and there are promises of BETTER table support in Whidbey of which I have
yet to see.

THREE (3) years to figure this out after I told you again and again.....

Hand down the people on the dreamweaver forums have twice the number of web
pages than all of the people on microsoft newsgroups and they LOOK 1000
times better as well....plus they ACTUALLY have web sites in the first
place.......
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top