Thursday, March 22, 2012

Web Developer 2005 - Where has all the code gone ?

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"Goofy" <me@.mine.com> wrote in message
news:eRUeSUpIHHA.4928@.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
OK, so does it create the designer.cs on the fly when you do a build and
then delete it ?
"Mark Rae" <mark@.markNOSPAMrae.com> wrote in message
news:%23no$bapIHHA.3312@.TK2MSFTNGP03.phx.gbl...
> "Goofy" <me@.mine.com> wrote in message
> news:eRUeSUpIHHA.4928@.TK2MSFTNGP06.phx.gbl...
>
> It's in the designer.cs files
>
> Yes
>
"Goofy" <me@.mine.com> wrote in message
news:OYGBjdpIHHA.1468@.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...
Server-side controls no longer need to be explicitly declared in your
codebehind class, but you still have complete access to them programmaticall
y.
Fritz Onion's article in MSDN mag explains this:
http://msdn.microsoft.com/msdnmag/i.../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 espaol : http://asp.net.do/foros/
===================================
"Goofy" <me@.mine.com> wrote in message news:eRUeSUpIHHA.4928@.TK2MSFTNGP06.phx.gbl...darkred">
>I see that the code behind is now a partial class. So where is the code ass
ociated with the server
>controls declaration etc ?
> Is this generated on the fly now, or am I missing something ?
> --
> Goofy
>
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" <mark@.markNOSPAMrae.com> wrote in message
news:euyVjgpIHHA.536@.TK2MSFTNGP02.phx.gbl...
> "Goofy" <me@.mine.com> wrote in message
> news:OYGBjdpIHHA.1468@.TK2MSFTNGP04.phx.gbl...
>
> 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...
>
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 th
e 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/i.../ExtremeASPNET/
Also, this MSDN article:
http://msdn.microsoft.com/library/d...br />
nals.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 espaol : http://asp.net.do/foros/
===================================
"Goofy" <me@.mine.com> wrote in message news:eGsPF0pIHHA.4712@.TK2MSFTNGP04.phx.gbl...darkred">
> 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 hav
e also looked in the
> projects directory, I have checked my folder options to enusre that its no
t hiding the files but
> it aint there.
> I also cant find the dll output file either, this is confusing the hell ou
t of me. !
>
> "Mark Rae" <mark@.markNOSPAMrae.com> wrote in message news:euyVjgpIHHA.536@.
TK2MSFTNGP02.phx.gbl...
>
"Goofy" <me@.mine.com> wrote in message
news:eGsPF0pIHHA.4712@.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...
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" <mark@.markNOSPAMrae.com> wrote in message
news:OvAGvXqIHHA.2456@.TK2MSFTNGP06.phx.gbl...
> "Goofy" <me@.mine.com> wrote in message
> news:eGsPF0pIHHA.4712@.TK2MSFTNGP04.phx.gbl...
>
> Apologies - I assumed you were using Web Application Projects, which
> creates the designer files - you clearly aren't, so you won't see them...
>
> Again, you won't see one if you're not using WAP until you either publish
> or precompile your site...
>
Does that include the Standard Edition ?
"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:eP4dJHrIHHA.1064@.TK2MSFTNGP04.phx.gbl...
> re:
> 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 espaol : http://asp.net.do/foros/
> ===================================
> "Goofy" <me@.mine.com> wrote in message
> news:uGOlpErIHHA.3312@.TK2MSFTNGP03.phx.gbl...
>

0 comments:

Post a Comment