Hi All, Ive seen an article in www.asp.net site today "New Code Compilation Features in ASP.NET Whidbey". As per this article, its suggested to write the C# code also in ASPX file itself. So that both will be compiled at runtime during development. Since Intelisence
is supported in HTML View itself, <script runat=server language=C#> can be used to write our codebehind code. Atleast by making the Code seperated from HTML, ASPX pages now Dont look messy with bot language code and html code as were in ASP/JSP. But, by introducing
Intellisence, VS.NET is mixing it both again. Y is this. I agree that there it increases the development time. But, again like ASP/JSP, ASPX pages will also contain mixup of code and go upto thousands of lines. Yours, Sankar.B Mascon Mastercard, Chennai, India
First of all are you using Whidbey already? If this is not the case, don't try the tricks in the older versions of VS.NET (2002/2003), it won't work... If you have Whidbey already, please remark it'only
alpha, so problems will occur for sure!
Hi, I dont have Whidbey / Im not trying out the new things in VS.NET 2003. I just seen the artilce "New Code Compilation Features in ASP.NET Whidbey" in www.asp.net which states that we can do the codebehind coding in the aspx page itself (With the Intellisence
support provided in Whidbey for ASPX page itsel) if we dont want to compile each time (like what we do in VS.NET 2002/2003 for each and every change we do in the codebehind). But, still if we want to use the Codebehind for all our ASPX pages, then, we Loose
the "Advantage of Runtime Compilation of ASPX " (which will have the language code block inside aspx page itself in the <script runat=server></script> block). But, if we want go with the Codebehind technology as we do now, we will be "Loosing the Advantage
of Runtime Compilation". As per the article, we need to Compile (Build/Rebuild) the application each and every time even when we do a small change in the Codebehind file. Since ive no chance of getting Whidbey now (since download is not there) Im asking u
people who are trying it now whether We can use Codebehind still using the Advantage of Runtime Compilation.i.e. no need to compile (Build/Rebuild the application) for each and every change we do in the codebehind file ? Yours, Sankar.B
Hi, Ref: http://msdn.microsoft.com/asp.net/whidbey/default.aspx?pull=/library/en-us/dnaspp/html/codecompilation.asp "One of the advantages of ASP.NET Web Forms is that because of dynamic compilation, you can easily make changes to an .aspx page, save the page,
and the page is updated, without the need for a recompile (as long as you're not using code behind)" This will def. lead to use Single file concept again like ASP/JSP which will have both code and HTML mixed up and having a messy pages with thousands of lines.
If Dynamic Compilation is supported by anyway when using Codebehind also, then, it will be useful and still makes ASP.NET applications having HTML code seperated from its coding page. Yours, Sankar.B
Hi All, My concern as per the article is "Advantage of Dynamic Compilation" and "ASPX Intellisence" in Whidbey will make future development in ASPx Pages mixed up with Code and HTML tags, which is not done so by the ASP.NET developers now with VS.NET 2002/2003.
Whether "ASP.NET Developers can Utilise the Advantage of Dynamic Compilation in Whidbey with Codebehind Technologoy Also ?" i.e: If I need Dynamic Compilation, I need to develop all in a single file i.e. Code and HTML / ASP:Tags in aspx page itself. But, if
i dont want to mixup both HTML / ASP:Tags and Code in ASPX page itself and go ahead with Codebehind Technology, I cant take advantage of "Dynamic Compilation in Whidbey (Since We need to Compile and Test the changes made in codebehind now for each and every
change we do in Codebehind). Even now also in VS.NET the Dynamic Compilation is there. If we embed the Code in script tag and HTML/ASP:Tags in the ASPX page itself, we dont have to compile and test the page for each and every change we do in the script block.
But, there is no support for Intellisence in ASPX, so no developer is developing in this way. But, since Intellisence support is given in ASPX page itself in Whidbey, everyone will start coding in the same page and slowly "Codebehind Concept" will go away
and again ASP.NET pages will have both HTML and Code mixed up in the same page as we did these many years in ASP/JSP. This is my concern. If by anyway "Dynamic Compilation' is supported even if we do coding in the Codebehind page, itll be better. Yours, Sankar.B
There is a new folder for making Dynamic Compilation better. In Whidbey there is a \Code folder where you can put all of your source codes. The code in the \Code folder will be automatically compiled to assemblies. So you can deploy your solution with the source
code to the server. You can change the code located in the \Code folder on your server, and it will be automatically compiled :)
Hi, Yes. Ive seen in one of the PDC articles, the \Code folder. 1. Is this is the default place (\Code folder) where we need to keep our Codebehind pages and our Custom Classes ? 2. If we keep our Codebehind files/ Custom Classes/ Partial Classes in this default
folder (\Code) and if we do any change in these files and without Compilation (Build/Rebuild the Solution), if we run the ASPX page, will the changes done in these files will be reflected ? Yours, Sankar.B
Whidbey supports both inline and code-beside with no problem. There are so few differences (both have intellisense finally, and neither requires extra declarations) that its simply a style issue. Both techniques can be compiled dynamically or be pre-compiled.
See my article for actual code-beside syntax and more details.
Thanks, Paul Wilson, ASPInsider, MC**
For the best .NET code, examples, and tools, visit:
WilsonDotNet.com, WilsonWebPortal.com, ORMapper.net
>1. Is this is the default place (\Code folder) where we need to keep our Codebehind pages and our Custom Classes ? No. >2. If we keep our Codebehind files/ Custom Classes/ Partial Classes in this default folder (\Code) and if we do any change in these files
and without Compilation (Build/Rebuild the Solution), if we run the ASPX page, will the changes done in these files will be reflected ? All files in the \Code folder will be compiled after changes. You don't need to manually compile your code.
jinishans
Member
220 Points
44 Posts
Codebehind Scrapped ! Again HTML and Language Code are Mixed up like ASP / JSP !
Nov 12, 2003 07:51 AM|LINK
bdesmet
Star
8255 Points
1651 Posts
Re: Codebehind Scrapped ! Again HTML and Language Code are Mixed up like ASP / JSP !
Nov 12, 2003 07:54 AM|LINK
Visit www.msdn.be, www.bartdesmet.net
jinishans
Member
220 Points
44 Posts
Re: Codebehind Scrapped ! Again HTML and Language Code are Mixed up like ASP / JSP !
Nov 12, 2003 08:07 AM|LINK
jinishans
Member
220 Points
44 Posts
Re: Codebehind Scrapped ! Again HTML and Language Code are Mixed up like ASP / JSP !
Nov 12, 2003 08:14 AM|LINK
Fredrik N
All-Star
29674 Points
5334 Posts
MVP
Re: Codebehind Scrapped ! Again HTML and Language Code are Mixed up like ASP / JSP !
Nov 12, 2003 08:49 AM|LINK
MVP, ASPInsider, WCF RIA Services Insider
My Blog
jinishans
Member
220 Points
44 Posts
Re: Codebehind Scrapped ! Again HTML and Language Code are Mixed up like ASP / JSP !
Nov 12, 2003 11:22 AM|LINK
Fredrik N
All-Star
29674 Points
5334 Posts
MVP
Re: Codebehind Scrapped ! Again HTML and Language Code are Mixed up like ASP / JSP !
Nov 12, 2003 11:36 AM|LINK
MVP, ASPInsider, WCF RIA Services Insider
My Blog
jinishans
Member
220 Points
44 Posts
Re: Codebehind Scrapped ! Again HTML and Language Code are Mixed up like ASP / JSP !
Nov 12, 2003 12:30 PM|LINK
PaulWilson
Contributor
3715 Points
745 Posts
ASPInsiders
Re: Codebehind Scrapped ! Again HTML and Language Code are Mixed up like ASP / JSP !
Nov 12, 2003 12:35 PM|LINK
For the best .NET code, examples, and tools, visit:
WilsonDotNet.com, WilsonWebPortal.com, ORMapper.net
Fredrik N
All-Star
29674 Points
5334 Posts
MVP
Re: Codebehind Scrapped ! Again HTML and Language Code are Mixed up like ASP / JSP !
Nov 12, 2003 12:57 PM|LINK
MVP, ASPInsider, WCF RIA Services Insider
My Blog