Shreeman's profileShreemanBlogLists Tools Help
    December 25

    ASP.NET 2.0 new downloads and what's on card

    I was out of blogging for a week as i was on training thus i didn't blogged and while i got time finally today i can see many downloads ,holidays special had been posted.Thus without wasting your time as a first blog entry i would like to provide the brief overview on those .please see the following:-
     
    1. ATLAS DEC CTP RELEASED :- HERE is the link get from atlas site or from here in download site abou t the new changes you can get more info here in nikhil's blog .My suggestion also download the new HOL and check the ATLAS tutorials site
     
     
    2. WINDOWS VISTA DEC CTP RELEASED:- THE windows vista DEC CTP also got released along with CIDER .Thus check out the details in VISTA HOME and here is the download link
     
    3.WEB DEPLOYMENT PROJECT FOR ASP.NET 2.0 RELEASED :-
    FOR THE DETAILS SEE follow  links :-
     
    4.MASTER PAGE AND XHTML Templates are available for download:- get it here
     
    5. ADDIN for CSS PROPERTIES WINDOW released :- download it here  get the details here
     
    6. UPCOMIGN FEATURES IN ASP.NET 2.0 from Scottgu's blog HERE
     
    7.Scottgu posted the migration tutorials from vs2003 to vs2005 :- Know more about it here
     
     
    and thats it for today.Now i can blog about other topics
     
     
      
    December 17

    PDC05 SHOWS DOWNLOADS

    If you remember my last post on PDC05 shows here I mentioned that you can watch the PDC Shows online and i has provided the link too.Now more good news as i mentioned earlier you can download the session too.check out this post for the link to download.
    Here in Michael's blog select your fav topic  to download and view  offline
     
     

    diskputput caching in asp.net 2.0

    To provide more boost to the asp.net 2.0 caching feature which although a superb feature atleast after the intregration with database cache invalidation was lackign one more feature namely the lack of surviving asp.net process recycle Dmitry has come with a utility to put the cache perssit to disk and available across app domain  .

    You ll get the deatils including the soucecode here in dimtry's blog

     

    December 14

    uisng clr profiler with asp.net 2.0

    K Scott Alen has posted a nice post on his blog on the clrprofiler for .Net 2.0 and how you can use it for asp.net 2.0.In past I had countered amny instances where the profiler was handy but somehow i had a biutter experience with asp.net and webservice and i had make it work after a few hours of struggle.
     
    However sayign so i can't deny the fact and help you can get from using Clrprofiler.Thus no wait just try your hand witht he new .NET 2.0 clrprofiler .here is the entry of Scott Alen
    December 11

    The asp.net1.1 to 2.0 Upgrade center

    Often I got question from devs and friends what are the changes and impcat of upgrading from asp.net1.1 to asp.net 2.0 .If you ae also looking for the same here is the info for you msdn has the asp.net 1.1 to 2.0 upgrade center where you can know what you need to do as well as common issues and how you can track it.
    Remember that asp.net 1.1 and 2.0 can run side by side in same IIS box but with the rich set of features provided thru asp.net 2.0 i hope you ll soon move into 2.0 and this site is your friend in that scenario
     
    December 09

    Crosspage posting and master pages with simple code

    One of the email i got after the crosspage posting is :-
    I was asked  how can i use crosspage page posting with masterpages and get the values of the previous page.
    So I thought let me give 2 simple scenario of getting the same back first with non master pages and with master pages.
    Here you go:-
     
    here is the code ith simple page without master:-

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

    <head runat="server">

    <title>Untitled Page</title>

    </head>

    <body>

    <form id="form1" runat="server">

    <div>

    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>

    </div>

    <asp:Button ID="Button1" runat="server" Text="Button" PostBackUrl="~/Default2.aspx" />

    </form>

    </body>

     

    and here is the Default2 code in pageload:-

    protected

    void Page_Load(object sender, EventArgs e)

    {

    if (IsCrossPagePostBack)

    {

    TextBox1.Text = ((TextBox)PreviousPage.FindControl("TextBox1")).Text;

    }

    }

     

    In MasterPage Scenario:-

    <%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master" CodeFile="Default.aspx.cs" Inherits="_Default" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>

    <asp:Button ID="Button1" runat="server" Text="Button" PostBackUrl="~/Default2.aspx" style="left: -296px; position: relative; top: 81px" />

    </asp:Content>

    Here is the default2  load :-in default2.cs

    protected

    void Page_Load(object sender, EventArgs e)

    {

    if (IsCrossPagePostBack)

    {

    TextBox1.Text = ((TextBox)(((ContentPlaceHolder)PreviousPage.Master.FindControl("ContentPlaceHolder1")).FindControl("TextBox1"))).Text;

    }

    }

    Note :- I have not provided the code for default2.aspx

    For details checkout here in msdn2:-

    http://msdn2.microsoft.com/library/ms178139(en-us,vs.80).aspx

    New Web Project Model Coming for vs2005

    Few Days back i had posted on the Asp.net 2.0 compile and the structure with Appp_Code and now its looks like the same was alraedy on plan and i can only say AWESOME and Would like to SALUTE Scottgu and team ...they have knew the problem of developers in migrating the 1.1 apps into 2.0 due to the new compilationa nd code model.So here comes the new WEB PROJECT MODEL from Scott gu's blog here
    The technical part wiht the same is:-From scott gu's blog again :-

    1) All code within the project will compile into a single assembly (that gets built and persisted in the \bin directory on each compile).

     

    2) All files contained within the project are defined within a project file (as well as the assembly references and other project meta-data settings).  Files under the web’s file-system root that are not defined in the project file will not be logically considered part of the web project.  You will also now be able to define classes and types anywhere in the project structure (there is no longer a need to define them under app_code).

     

    3) The compilation system uses a standard MSBuild based compilation process.  This can be extended and customized using standard MSBuild extensibility rules.

     

    Two of the big changes/improvements we are making over the VS 2003 model are:

     

    1) We will not use/require FrontPage Server Extensions (FPSE) in order to open and edit these web projects.  There also will not be any requirement to store your web projects under inetpub\wwwroot.  Instead, you can just define a standard project file for your web project anywhere on disk and add/open/manage it directly (this also means no more .webinfo files and hard-coded http:// paths in the solution file).  This should make organizing and managing your projects much easier.

     

    2) We are adding the ability to optionally use the Cassini-based built-in web-server with these projects (alternatively you can obviously also use IIS).  You will be able to create a new web project using this model, add a few pages, hit F5 to compile the code-behinds and other classes into a single assembly, and automatically launch Cassini to run and debug it.  All of this will also work in a non-admin user account (so you can login to Windows and develop as a normal user). 

     
     The looks and feels are also Awsome. 
    December 07

    Deleting ASP.NET 2.0 Application Sub-Directories Shuts Down the AppDomain

    Got this important info from ted carters blog today ..thus if you are seeing this as unusual then do read ted's post here :
    The issue was the change of behavior in asp.net 2.0 in monitoring the root thus deleting the Sub-directores in the root ll shutdown the appdomain and it ll recreated upon the first request.If you still need the old 1.1 behior ten you need to create a ditrectory junction using Linkd.exe .
    see Ted's entry here for more details.
     
    December 05

    The LOng Awaited Transactional FIleSYSTEM

    After the Volatiule Resource manager its the turn for the transactional Filesystem in Windows Vista and Now transaction comes into the KERNEL and Almost anything can be part of transaction yahoo...HOWEVER don't beat me if i say you can even rollback the email you sent someday  .
     
    BAck to the line SUrender explaining and showing the TRanmsactional ssy in VIsta a must watch out .Check HEre for more http://channel9.msdn.com/Showpost.aspx?postid=142120
     
     
    December 04

    CrossPage Posting In ASP.NET 2.0 and HAndling MultiSource

    As you Know the Asp.Net1.1 model was built in with Self posting that is Autopostback of forms and was a single form model although there are hooks like Paul Wilson's multiform(i ll rather say it hooks ..hope Paul; u don't mind .Developers from ASP Background always found this a s a limitation as they tend s to post (Submit )to a different Page .Microsoft provides few Changes in this arena to provide the facility of Crosspage posting and the Wizard control to handle such scenario an demands.

     

    So how Cross page posting works: - here is the desc from the Quick start site

     

    Cross page posting sets action of the form in Page 1
     When the Button is clicked, the post goes from Page 1 to Page 2
     Page 2 retains viewstate from Page 1

     When PreviousPage accessed, viewstate is re-populated to an instance of Page 1

     Page 1 then executes up to its LoadComplete phase (excludes rendering)

     At this point, Page 2 may access the values of controls in Page 1

     

    Now for differentiating the post back and crosspage post back you can check  like (if (!Page.IsCrossPagePostBack)

    {
       handle a normal request here
    }

    Also Note that you can Postback to different Application

    as well although the previouspage would be NULL here

    See for the info to the quickstart site.

     

    However still you can't directly access the previous page control and you need to do like

    (Textbox)Page.PreviousPage.FindControl to get the val.

     

    Saying all these more question arises what happen when i need to submit (postback) to same page from multiple sources..Now how can i handle the same????

     

    I am not going to provide the in-depth behavior here as Fritz and Scott Allen already had written the workarounds...

    Read the same here 2 wonderful posts on the subject:-

     

    Multi-source cross page posting

    Design Considerations for Cross Page Post Backs in ASP.NET 2.0 

     

     

    However still you can't directly access the previous page control and you need to do like

    (TextBox)Page.PreviousPage.FindControl to get the val.

     

     

    ALSO you might think how you ll get the values in master pages scenario.Let say you submitted to a differnet page and now you wants to get the previous page control values.In Master pages scenario you need to first fidn the container an dthen use the findcontrol to get the value of the previous page.hope this helps

     

    ATLAS DEMO And Video By Dan WAhlin

    If you are looking a for a intro into the ATLAS and how AJAX is implemented in ATLAS not that
    DanWahlin has posted cool video demo with soucecode demonstrating ATLAS features .Which Include Webservice Call from the Javascript usign the Atlas controls and displaying the result immediately to user and also using the VirtualEarthmap control similar to google's  one .Watch the cool and Explore the ATLAS .
     
    Find the links for the same Below
    Link : Video
    Link : Code
     
    Update :-see more here
     

    The importance of APP_CODE folder in ASP.NET 2.0 (Beaware of few Facts)

    IN ASP.NET 2.0 you will find a new folder called APP_CODE .The Purpose of this folder is to share resources thru out the app...That is it can contain source code for utility classes and business objects (.cs..etc)which you want to compile as part of your application.In dynamic compilation upon the first request the codes in this folder are compiled and those get recompiled if any code changes happen. Further you can get strongly typed by placing arbitary type.

     

    As I told the code in this folder is accessible thru out to Ur application it gives a certain advantage for code managing.

     

    The above features is a part of the New Compilation model in asp.net 2.0 .Compilation of ASP.NET 2.0 no longer produce a Single Assembly (As many Devs provided feedback that a huge assembly is taking quite lot of time for a huge application.).Thus in 2.0 we have now multiple assemblies may be based on the directory structure except the root (Yet needed to be sure ).That is 1 assembly for the Root and subsequent assemblies for the directory struct (one for each).

     

    However There are few points needed to taken care before using the App_Code which otherwise create many doubts on your mind (at least I was thinking it’s a missing feature, bydesign or I am wrong for a whileJ).

     

    The issue is if you are putting a class (say a1.cs) outside the App_Code and if you are trying to access the same in codebehind file (say webform1.cs) it ll produce the Compilation error as it no longer recognize ur class in CodeBehind.The same is the story the reverse side that is if you are trying to access the CodeBehind or UserControl class inside the Class (say a1.cs ) in App_Code the same ll be the result Compilation Error.

    I found that Classes in the Different directory other then App_Code are producing this behavior.

    Thus Beware of this if you are migrating any 1.1 apps to 2.0 byhand make sure to place the file appropriately that is place the .cs (utility classes  )in App_code and look at the workaround below:-

     

    So now the question arises what is the workaround and why this happens

     

    The workaround is simple that is add a reference <%@ Reference … … %> to the reqd classes.However if you don’t have a provision to reference then what you ll do???One solution for the same would be to create a base class put it in App_Code and inherits from it.

     Coming to the design the best Guess for this behavior is seems by design and since all Directory compiled to individual assembly and all have a reference bydefault to the app_code Again providing a Reference from App_Code Classes might causes a circular references.

     

    The Questions here are there are problem here when I am developing controls and it can put a certain limitation on me when  i need to ref a class in anotrher directory  .Further I guess if I am putting a class outside the app_code and not in any directory(in root only) then it should be part of the Root assembly but since i am not able access the same class in any codebehind which is in the RootDirectory I need to more digged into the compilation model.

     Update

    I am editing this entry as i found quite a few hit on this entry.Thus just a point to mention is that although the above behavior is true we can now have the old behvaior with the new Webproject model shipped in to handle the compilation in alittle different way.For the new compilation check the Fritz onion's article in msdn and for the new Webproject model check my post here

     

    10 must addins everydeveloper should have

    After the 10 must tools every developer should have its now turn for the  10 must addins everydeveloper should have.
     
     
  • NUnit to write unit tests
  • NDoc to create code documentation
  • NAnt to build your solutions
  • CodeSmith to generate code
  • FxCop to police your code
  • Snippet Compiler to compile small bits of code
  • Two different switcher tools, the ASP.NET Version Switcher and the Visual Studio .NET Project Converter
  • Regulator to build regular expressions
  • .NET Reflector to examine assemblies
  • Addins:- http://msdn.microsoft.com/msdnmag/issues/05/12/VisualStudioAddins/default.aspx

    TestDriven.NET
    GhostDoc
    Paster
    CodeKeep
    PInvoke.NET
    VSWindowManager PowerToy
    WSContractFirst
    VSMouseBindings
    CopySourceAsHTML
    Cache Visualizer

     

    December 03

    New In Transaction :Volatile ReSource Mgr and More

    In past I had  posted on the new transactional faetures including the promotable transaction as well as what's new in transaction in 2.0.
    In the same line I had mention how transaction can spawn multiple thread(thx Jim Jhonson).
     
    However if you are of view that only BE data would be the part of transaction its no longer and the longhron ..sorry vista transaction is much more then that..
    Now the transaction can be utilize for otehr non BE operation Too and Transactional FileSytem is no lonegr remains a secret.
     
    Before I write anyhting more read the beutiful articles on the same line:-
     
     
    Jim's Transactional filesystem and bring transaction to FS here
     
     
     
     

    Nikhil's WebDevelopement helper

    For answering My friend's query on is there  any new tools avavilble which helps him in debugging the ajax be=ase developent .I thought initially of the script debugger as well as the native .net debugger.However while discussing the same I thought whyn't made a search (Sorry Nikhil i m not a regular reader of ur blog but would like to be.. atleast the tool you provided is wonderful.Yes i am talking about the Webdevelopement halper provided by nikhil and if you are doing Ajax developement you ll find it useful.