April 2005 - Posts

Now, that Microsoft has bothered to post more content, there will be more regular tips of the day again.  This is kind of a cool new feature that I saw posted.  The new MaintainScrollPositionOnPostBack  can be used to maintain the position in the browser whenever a postback occurs.  This will be most useful when you have a large form or a page that is really long and there are links or whatever that cause a postback.  Now when the postback occurs, it will take the user to exactly where he or she left off.
 
To add this to a page, simply add MaintainScrollPositionOnPostBack=true to your compiler directive.
 
<%@ Page Language="C#" MaintainScrollPositionOnPostBack="true" %>
Several new directories of importance have been created in ASP.NET 2.0.  The App_Code directory (formerly the code directory in Beta 1) is used to share code between pages without using a class library.  Classes files can be placed in this directory without being precompiled and they can be used anywhere in the application.  You can even have classes of different languages in subdirectories if you want. 
 
When you start working in Visual Studio 2005, you will notice that there is no longer a references folder.  Now, when you create a reference to another assembly, it simply places that DLL in the bin folder.
If you loved the QuickStarts from ASP.NET 1.1, you will love the new ASP.NET 2.0 QuickStarts.  In 1.1, these pages served as a starting point for many new ASP.NET developers.  I recommend that you take a look at these to see what's new and to get code examples.
 
 
 
AppDev has provided some of their ASP.NET C# 2.0 Training course for free.  Check it out when you get a chance.
More Posts « Previous page