By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,617 Members | 1,751 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,617 IT Pros & Developers. It's quick & easy.

Web Developer 2005 - Where has all the code gone ?

P: n/a
I see that the code behind is now a partial class. So where is the code
associated with the server controls declaration etc ?

Is this generated on the fly now, or am I missing something ?

--
Goofy
Dec 18 '06 #1
Share this Question
Share on Google+
21 Replies


P: n/a
"Goofy" <me@mine.comwrote in message
news:eR**************@TK2MSFTNGP06.phx.gbl...
>I see that the code behind is now a partial class. So where is the code
associated with the server controls declaration etc ?
It's in the designer.cs files
Is this generated on the fly now
Yes
Dec 18 '06 #2

P: n/a
OK, so does it create the designer.cs on the fly when you do a build and
then delete it ?

"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
"Goofy" <me@mine.comwrote in message
news:eR**************@TK2MSFTNGP06.phx.gbl...
>>I see that the code behind is now a partial class. So where is the code
associated with the server controls declaration etc ?

It's in the designer.cs files
>Is this generated on the fly now

Yes

Dec 18 '06 #3

P: n/a
Server-side controls no longer need to be explicitly declared in your
codebehind class, but you still have complete access to them programmatically.

Fritz Onion's article in MSDN mag explains this:
http://msdn.microsoft.com/msdnmag/is...ExtremeASPNET/

See Figure 2 and Figure 3 for examples.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message news:eR**************@TK2MSFTNGP06.phx.gbl...
>I see that the code behind is now a partial class. So where is the code associated with the server
controls declaration etc ?

Is this generated on the fly now, or am I missing something ?

--
Goofy

Dec 18 '06 #4

P: n/a
"Goofy" <me@mine.comwrote in message
news:OY**************@TK2MSFTNGP04.phx.gbl...
OK, so does it create the designer.cs on the fly when you do a build and
then delete it ?
No - it *creates* the designer.cs file when the aspx and aspx.cs files are
created.

The contents of the designer.cs files is *updated* on the fly...
Dec 18 '06 #5

P: n/a
Mark,

Thanks for the reply. ( Im probably being dumb) but I cant see this file at
all. I have looked in the websites directory where my web site lives on the
local machine, I have also looked in the projects directory, I have checked
my folder options to enusre that its not hiding the files but it aint there.

I also cant find the dll output file either, this is confusing the hell out
of me. !
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:eu*************@TK2MSFTNGP02.phx.gbl...
"Goofy" <me@mine.comwrote in message
news:OY**************@TK2MSFTNGP04.phx.gbl...
>OK, so does it create the designer.cs on the fly when you do a build and
then delete it ?

No - it *creates* the designer.cs file when the aspx and aspx.cs files are
created.

The contents of the designer.cs files is *updated* on the fly...

Dec 18 '06 #6

P: n/a
Are you using WAP ( Web Application Projects ) ?
If you're not, you'll never see a *.designer.cs or *.designer.vb file.

The *.designer.cs/vb file is a new file used in Web Application Projects
to contain the code that is generated and maintained by Visual Studio for the page.

You won't find any dll, either, if you don't use WAP,
unless you publish or pre-compile your app.

Again, Fritz Onion's article helps :
http://msdn.microsoft.com/msdnmag/is...ExtremeASPNET/

Also, this MSDN article:
http://msdn.microsoft.com/library/de.../internals.asp
giives you the info you need to understand ASP.NET internals.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message news:eG**************@TK2MSFTNGP04.phx.gbl...
Mark,

Thanks for the reply. ( Im probably being dumb) but I cant see this file at all. I have looked in
the websites directory where my web site lives on the local machine, I have also looked in the
projects directory, I have checked my folder options to enusre that its not hiding the files but
it aint there.

I also cant find the dll output file either, this is confusing the hell out of me. !
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message news:eu*************@TK2MSFTNGP02.phx.gbl...
>"Goofy" <me@mine.comwrote in message news:OY**************@TK2MSFTNGP04.phx.gbl...
>>OK, so does it create the designer.cs on the fly when you do a build and then delete it ?

No - it *creates* the designer.cs file when the aspx and aspx.cs files are created.

The contents of the designer.cs files is *updated* on the fly...


Dec 18 '06 #7

P: n/a
"Goofy" <me@mine.comwrote in message
news:eG**************@TK2MSFTNGP04.phx.gbl...
Thanks for the reply. ( Im probably being dumb) but I cant see this file
at all. I have looked in the websites directory where my web site lives on
the local machine, I have also looked in the projects directory, I have
checked my folder options to enusre that its not hiding the files but it
aint there.
Apologies - I assumed you were using Web Application Projects, which creates
the designer files - you clearly aren't, so you won't see them...
I also cant find the dll output file either, this is confusing the hell
out of me. !
Again, you won't see one if you're not using WAP until you either publish or
precompile your site...
Dec 18 '06 #8

P: n/a
No worries. Im fairly reasonable with VS2003, but I've got a copy of
'Visual Web Developer 2005 Express Edition and Im trying to make sense of
it.

"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:Ov**************@TK2MSFTNGP06.phx.gbl...
"Goofy" <me@mine.comwrote in message
news:eG**************@TK2MSFTNGP04.phx.gbl...
>Thanks for the reply. ( Im probably being dumb) but I cant see this file
at all. I have looked in the websites directory where my web site lives
on the local machine, I have also looked in the projects directory, I
have checked my folder options to enusre that its not hiding the files
but it aint there.

Apologies - I assumed you were using Web Application Projects, which
creates the designer files - you clearly aren't, so you won't see them...
>I also cant find the dll output file either, this is confusing the hell
out of me. !

Again, you won't see one if you're not using WAP until you either publish
or precompile your site...

Dec 18 '06 #9

P: n/a
Is the precompiler available in the express edition >?
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:uy**************@TK2MSFTNGP06.phx.gbl...
Server-side controls no longer need to be explicitly declared in your
codebehind class, but you still have complete access to them
programmatically.

Fritz Onion's article in MSDN mag explains this:
http://msdn.microsoft.com/msdnmag/is...ExtremeASPNET/

See Figure 2 and Figure 3 for examples.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message
news:eR**************@TK2MSFTNGP06.phx.gbl...
>>I see that the code behind is now a partial class. So where is the code
associated with the server controls declaration etc ?

Is this generated on the fly now, or am I missing something ?

--
Goofy


Dec 18 '06 #10

P: n/a
"Goofy" <me@mine.comwrote in message
news:er**************@TK2MSFTNGP02.phx.gbl...
No worries. Im fairly reasonable with VS2003, but I've got a copy of
'Visual Web Developer 2005 Express Edition and Im trying to make sense of
it.
Personally, I absolutely *hated* the changed compilation model in ASP.NET 2,
so was absolutely delighted when WAP was released as an add-in.

It's now fully incorporated into SP1...
Dec 18 '06 #11

P: n/a
To be honest, I was not aware of Web Application Projects. Im only using the
express edition here, and it doesent look like it has WAP on it. (AFAIK).

I managed to compile the entire project using the aspnet_compile ( Just for
fun ) and to see if it worked for me. Seemed to be fine.

So my question is do you know what versions of Visual Web Developer include
WAP and how does it manifest itself as far as the user is concerned ? ( IE
menu options etc )

Sorry to ask so many questions; I am researching as well but a little help
from the experts like yourself and Jaun certainly help things along.

Regards
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:OJ****************@TK2MSFTNGP04.phx.gbl...
"Goofy" <me@mine.comwrote in message
news:er**************@TK2MSFTNGP02.phx.gbl...
>No worries. Im fairly reasonable with VS2003, but I've got a copy of
'Visual Web Developer 2005 Express Edition and Im trying to make sense of
it.

Personally, I absolutely *hated* the changed compilation model in ASP.NET
2, so was absolutely delighted when WAP was released as an add-in.

It's now fully incorporated into SP1...

Dec 18 '06 #12

P: n/a
The precompiler tool isn't a Visual Studio feature.
It's an ASP.NET feature and you'll find it in the .Net 2.0 directory.

So, you *can* use it, but not from within VS 2005 Express's IDE.

There's a blog by Rick Strahl which explains how aspnet_compiler.exe works :
http://west-wind.com/WebLog/posts/2128.aspx

You can also download Rick's free compiler utility,
which provides a front-end for aspnet_compiler.exe :
http://www.west-wind.com/tools/aspnetcompiler.asp

It is *really* helpful!

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message news:Ox**************@TK2MSFTNGP02.phx.gbl...
Is the precompiler available in the express edition >?
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:uy**************@TK2MSFTNGP06.phx.gbl...
>Server-side controls no longer need to be explicitly declared in your
codebehind class, but you still have complete access to them programmatically.

Fritz Onion's article in MSDN mag explains this:
http://msdn.microsoft.com/msdnmag/is...ExtremeASPNET/

See Figure 2 and Figure 3 for examples.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message news:eR**************@TK2MSFTNGP06.phx.gbl...
>>>I see that the code behind is now a partial class. So where is the code associated with the
server controls declaration etc ?

Is this generated on the fly now, or am I missing something ?

--
Goofy



Dec 18 '06 #13

P: n/a
I see it does.
"Goofy" <me@mine.comwrote in message
news:Ox**************@TK2MSFTNGP02.phx.gbl...
Is the precompiler available in the express edition >?
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:uy**************@TK2MSFTNGP06.phx.gbl...
>Server-side controls no longer need to be explicitly declared in your
codebehind class, but you still have complete access to them
programmatically.

Fritz Onion's article in MSDN mag explains this:
http://msdn.microsoft.com/msdnmag/is...ExtremeASPNET/

See Figure 2 and Figure 3 for examples.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message
news:eR**************@TK2MSFTNGP06.phx.gbl...
>>>I see that the code behind is now a partial class. So where is the code
associated with the server controls declaration etc ?

Is this generated on the fly now, or am I missing something ?

--
Goofy



Dec 18 '06 #14

P: n/a
Thanks, I found it
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:Oj**************@TK2MSFTNGP06.phx.gbl...
The precompiler tool isn't a Visual Studio feature.
It's an ASP.NET feature and you'll find it in the .Net 2.0 directory.

So, you *can* use it, but not from within VS 2005 Express's IDE.

There's a blog by Rick Strahl which explains how aspnet_compiler.exe works
:
http://west-wind.com/WebLog/posts/2128.aspx

You can also download Rick's free compiler utility,
which provides a front-end for aspnet_compiler.exe :
http://www.west-wind.com/tools/aspnetcompiler.asp

It is *really* helpful!

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message
news:Ox**************@TK2MSFTNGP02.phx.gbl...
>Is the precompiler available in the express edition >?
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:uy**************@TK2MSFTNGP06.phx.gbl...
>>Server-side controls no longer need to be explicitly declared in your
codebehind class, but you still have complete access to them
programmatically.

Fritz Onion's article in MSDN mag explains this:
http://msdn.microsoft.com/msdnmag/is...ExtremeASPNET/

See Figure 2 and Figure 3 for examples.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message
news:eR**************@TK2MSFTNGP06.phx.gbl...
I see that the code behind is now a partial class. So where is the code
associated with the server controls declaration etc ?

Is this generated on the fly now, or am I missing something ?

--
Goofy



Dec 18 '06 #15

P: n/a
re:
what versions of Visual Web Developer include WAP
WAP only works with Visual Studio 2005, not VWD Express.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message news:uG**************@TK2MSFTNGP03.phx.gbl...
To be honest, I was not aware of Web Application Projects. Im only using the express edition here,
and it doesent look like it has WAP on it. (AFAIK).

I managed to compile the entire project using the aspnet_compile ( Just for fun ) and to see if it
worked for me. Seemed to be fine.

So my question is do you know what versions of Visual Web Developer include WAP and how does it
manifest itself as far as the user is concerned ? ( IE menu options etc )

Sorry to ask so many questions; I am researching as well but a little help from the experts like
yourself and Juan certainly help things along.

Regards
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:OJ****************@TK2MSFTNGP04.phx.gbl...
>"Goofy" <me@mine.comwrote in message news:er**************@TK2MSFTNGP02.phx.gbl...
>>No worries. Im fairly reasonable with VS2003, but I've got a copy of 'Visual Web Developer 2005
Express Edition and Im trying to make sense of it.

Personally, I absolutely *hated* the changed compilation model in ASP.NET 2, so was absolutely
delighted when WAP was released as an add-in.

It's now fully incorporated into SP1...


Dec 18 '06 #16

P: n/a
Thank you very much.

"Goofy" <me@mine.comwrote in message
news:uG**************@TK2MSFTNGP03.phx.gbl...
To be honest, I was not aware of Web Application Projects. Im only using
the express edition here, and it doesent look like it has WAP on it.
(AFAIK).

I managed to compile the entire project using the aspnet_compile ( Just
for fun ) and to see if it worked for me. Seemed to be fine.

So my question is do you know what versions of Visual Web Developer
include WAP and how does it manifest itself as far as the user is
concerned ? ( IE menu options etc )

Sorry to ask so many questions; I am researching as well but a little help
from the experts like yourself and Jaun certainly help things along.

Regards
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:OJ****************@TK2MSFTNGP04.phx.gbl...
>"Goofy" <me@mine.comwrote in message
news:er**************@TK2MSFTNGP02.phx.gbl...
>>No worries. Im fairly reasonable with VS2003, but I've got a copy of
'Visual Web Developer 2005 Express Edition and Im trying to make sense
of it.

Personally, I absolutely *hated* the changed compilation model in ASP.NET
2, so was absolutely delighted when WAP was released as an add-in.

It's now fully incorporated into SP1...


Dec 18 '06 #17

P: n/a
Does that include the Standard Edition ?
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:eP**************@TK2MSFTNGP04.phx.gbl...
re:
>what versions of Visual Web Developer include WAP

WAP only works with Visual Studio 2005, not VWD Express.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message
news:uG**************@TK2MSFTNGP03.phx.gbl...
>To be honest, I was not aware of Web Application Projects. Im only using
the express edition here, and it doesent look like it has WAP on it.
(AFAIK).

I managed to compile the entire project using the aspnet_compile ( Just
for fun ) and to see if it worked for me. Seemed to be fine.

So my question is do you know what versions of Visual Web Developer
include WAP and how does it manifest itself as far as the user is
concerned ? ( IE menu options etc )

Sorry to ask so many questions; I am researching as well but a little
help from the experts like yourself and Juan certainly help things along.

Regards
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:OJ****************@TK2MSFTNGP04.phx.gbl...
>>"Goofy" <me@mine.comwrote in message
news:er**************@TK2MSFTNGP02.phx.gbl...

No worries. Im fairly reasonable with VS2003, but I've got a copy of
'Visual Web Developer 2005 Express Edition and Im trying to make sense
of it.

Personally, I absolutely *hated* the changed compilation model in
ASP.NET 2, so was absolutely delighted when WAP was released as an
add-in.

It's now fully incorporated into SP1...



Dec 18 '06 #18

P: n/a
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:Oj**************@TK2MSFTNGP06.phx.gbl...
It is *really* helpful!
I'll second that.
Dec 18 '06 #19

P: n/a
The standard edition of VS 2005 is "Visual Studio 2005".

WAP, when it's installed, can modify VS 2005's user interface,
so its options are available in the VS IDE, but can't modify VWD's UI.

Therefore, it's only VWD *Express* which can't use WAP.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message news:%2****************@TK2MSFTNGP03.phx.gbl...
Does that include the Standard Edition ?
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:eP**************@TK2MSFTNGP04.phx.gbl...
>re:
>>what versions of Visual Web Developer include WAP

WAP only works with Visual Studio 2005, not VWD Express.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message news:uG**************@TK2MSFTNGP03.phx.gbl...
>>To be honest, I was not aware of Web Application Projects. Im only using the express edition
here, and it doesent look like it has WAP on it. (AFAIK).

I managed to compile the entire project using the aspnet_compile ( Just for fun ) and to see if
it worked for me. Seemed to be fine.

So my question is do you know what versions of Visual Web Developer include WAP and how does it
manifest itself as far as the user is concerned ? ( IE menu options etc )

Sorry to ask so many questions; I am researching as well but a little help from the experts like
yourself and Juan certainly help things along.

Regards
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:OJ****************@TK2MSFTNGP04.phx.gbl.. .
"Goofy" <me@mine.comwrote in message news:er**************@TK2MSFTNGP02.phx.gbl...

No worries. Im fairly reasonable with VS2003, but I've got a copy of 'Visual Web Developer
2005 Express Edition and Im trying to make sense of it.

Personally, I absolutely *hated* the changed compilation model in ASP.NET 2, so was absolutely
delighted when WAP was released as an add-in.

It's now fully incorporated into SP1...



Dec 18 '06 #20

P: n/a
OK, Thanks

And by the way, those articles were pretty good, so thanks for those URL's

Regards - G
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:ur**************@TK2MSFTNGP02.phx.gbl...
The standard edition of VS 2005 is "Visual Studio 2005".

WAP, when it's installed, can modify VS 2005's user interface,
so its options are available in the VS IDE, but can't modify VWD's UI.

Therefore, it's only VWD *Express* which can't use WAP.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>Does that include the Standard Edition ?
>"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:eP**************@TK2MSFTNGP04.phx.gbl...
>>re:
what versions of Visual Web Developer include WAP

WAP only works with Visual Studio 2005, not VWD Express.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message
news:uG**************@TK2MSFTNGP03.phx.gbl...
To be honest, I was not aware of Web Application Projects. Im only
using the express edition here, and it doesent look like it has WAP on
it. (AFAIK).

I managed to compile the entire project using the aspnet_compile ( Just
for fun ) and to see if it worked for me. Seemed to be fine.

So my question is do you know what versions of Visual Web Developer
include WAP and how does it manifest itself as far as the user is
concerned ? ( IE menu options etc )

Sorry to ask so many questions; I am researching as well but a little
help from the experts like yourself and Juan certainly help things
along.

Regards
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:OJ****************@TK2MSFTNGP04.phx.gbl. ..
"Goofy" <me@mine.comwrote in message
news:er**************@TK2MSFTNGP02.phx.gbl.. .
>
>No worries. Im fairly reasonable with VS2003, but I've got a copy of
>'Visual Web Developer 2005 Express Edition and Im trying to make
>sense of it.
>
Personally, I absolutely *hated* the changed compilation model in
ASP.NET 2, so was absolutely delighted when WAP was released as an
add-in.
>
It's now fully incorporated into SP1...
>




Dec 18 '06 #21

P: n/a
in the aspx page, just like in version 1.

in version 1, the aspx page inherited from the codebehind. in this case
the aspx could see and public or protected variables from the
codebehind, but the codebehind could not see any aspx variables. to
allow the codebehind to acces controls in the aspx page, they were
declared in the codebehind as protected, and inheritied by the aspx page.

the difference in version 2, is with partial classes, the codebehind and
the aspx code are like one source file (though they can be different
languages), so they can see each others variables. thus the declaring
controls as protected and hooking events is not needed.

-- bruce (sqlwork.com)
Goofy wrote:
I see that the code behind is now a partial class. So where is the code
associated with the server controls declaration etc ?

Is this generated on the fly now, or am I missing something ?
Dec 18 '06 #22

This discussion thread is closed

Replies have been disabled for this discussion.