Next version of VS has code inline?

  • Thread starter Thread starter bruce.1
  • Start date Start date
B

bruce.1

It's my understanding that the next version of Visual Studio and ASP.NET
will have the code-behind inline with the HTML, in the same file. It's
also my understanding that Visual Studio will break-up the display so
the .NET code will be shown on a screen separate from the HTML.

What I'm wondering is how this will work when the file must be shared
with and used by a front-end web designer, that's using Dreamweaver or
whatever. Could they mess-up the .NET code? And how will Dreamweaver
handle the display of the .NET code?

Thanks for your help.
 
Bruce:
I think you are confused about how the new page model works in ASP.Net 2.0.
There are still two physically separate files. What's changing is that
instead of the aspx being a class which inherits from thh codebehind...the
aspx and the codebehind are the same class. This is possible due to the new
Partial classes being introduced in the .Net framework. This will also
enable much richer intellisense support in the ASPX editor.

So they aren't in the same file...but they are in the same class...which is
far more powerful....also it isn't just some designer/IDE hack, but actually
a well-thought out implementation...therefore dreamweaver shouldn't have any
problems as what we know now as "codebehind" will still exist...

Karl
 
Answers inline --


bruce.1 said:
It's my understanding that the next version of Visual Studio and ASP.NET
will have the code-behind inline with the HTML, in the same file. It's
also my understanding that Visual Studio will break-up the display so
the .NET code will be shown on a screen separate from the HTML.

The new model is call CodeBeside, which still uses two files, if you desire.
In the 2.0 Framework, both the tagged page (ASPX) and the CodeBeside page
(optional - aspx.cs or aspx.vb, etc.) are compiled to a single class. If you
use the default, you will have a single file, but you can use two files
instead (I still prefer it).
What I'm wondering is how this will work when the file must be shared
with and used by a front-end web designer, that's using Dreamweaver or
whatever. Could they mess-up the .NET code? And how will Dreamweaver
handle the display of the .NET code?

Yes, it is possible they can mess it up, so I would still use two files in
2.0. The page designer is much better in 2.0 and FrontPage is becomming a
good design tool to use in conjuction with Visual Studio. In addition, there
is a free Express version of the web tool that can be used by your
designers. I would still have two files, however.


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

*************************************************
Think outside the box!
*************************************************
 
By default, the IDE creates one file. You have to specifically tell it to
create two files if you wish CodeBeside versus embedded code in the page.

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

*************************************************
Think outside the box!
*************************************************
 
Actually, these answers are true for Beta 1 of the product, but changes
have been announced and implemented. The final product will still have
a code-behind file. The tag in the @Page directive will be "CodeFile",
and the aspx will inherit from the code file. The OnInit in the
code-behind that we are familiar with today will not be there. Nor
will variable declarations for controls. These pieces will be in a
system-generated partial class that will merge with the code file on
compile. Then the aspx will inherit from the product of this.

For those _wishing_ to write their code in the aspx file, the IDE will
offer rich intellisense support to facilitate this. For teams using
html designers for the aspx, developers will want to use the code file
for all code and keep the aspx straight markup.

Best regards,
Jeffrey Palermo
Blog: http://www.jeffreypalermo.com
 
Back
Top