Thursday 18 february 4 18 /02 /Feb 12:09
New Improvements in Dotnet 3.5 and VS 2008:
    Below is the queck summary lis of sever of new improvements of Dotnet 3.5, there is lot of more thing, I haven't had chance to add them

  • Multi Targetting
    • VS 2008 supports to create the applications with different Dotnet Framework versions, whenever you createting a New Project on VS 2008, it will shows you select the framework version for that project.
  • Rich Web Designer and CSS Support, Split view mode
    • To design a Web Page in VS 2005 have only 2 view modes i.e. Source (shows the HTML code) and Design (design mode of the Page). In the VS 2008 we have 3 view modes Source, Design and Split (like Dreamweaver software)
  • CSS style Manager
    •  VS 2008 supports a new tool window inside the IDE called "Manage Styles".  This shows all of the CSS stylesheets, and their corresponding rules, for the page you are currently editing.  It can be used both when you are in design-view, as well as when you are in source view on a page
  • Fullly Nested Master Page support
    • The good news is that VS 2008 fully supports nested master pages, and makes using them super easy.  Going forward I recommend that almost all ASP.NET projects should advantage of this feature - since it can add tremendous flexibility to the UI of your projects.
  • Javascript Intelisence
    • One of the things you'll notice immediately when you start typing within a script block is the richer support that Visual Studio 2008 now has for JavaScript keywords and language features
    • Obviously you get full intellisense support within external JavaScript files, just like you do within script blocks inside .htm and .aspx files.
  • Java script Debugging
    • One of the other JavaScript features that in VS 2008 is the much-improved support for JavaScript debugging.
      VS 2008 makes this much better by adding new support that allows you to set client-side JavaScript breakpoints directly within your server-side .aspx and .master source files
  • Creating Re-Usable ASP.NET AJAX Behaviors, Controls and Libraries
  • Automatic Properties
    • (get and set Properties), Object Initializers (set the Properties values), and Collection Initializers (List collection initialization)
    • One of the things that I think we will really love that are some of the new language features and improvements that are coming to both VB and C#.  These language changes are going to improve our development experience in both subtle and dramatic ways, and will really improve productivity and reduce the amount of code we need to type.
  • Extension Methods
    • Extension methods allow developers to add new methods to the public contract of an existing CLR type, without having to sub-class it or recompile the original type
    • Ex :
      public static class myclass
      {
          public static Dataview tablesort(Datatable dt, string sortcolumn, string sortdirection)
          {
              dt.DefaultView.sort = sortcolumn + " " + sortdirection
              return dt.DefaultView
          }
         
         Public bool emptyornot(string st_text)
         {
             if(st_text == "" || st_text == NULL)
                return false;
             else
               return true;
         }
      }

      public class mainclass
      {
          public void bindgrid()
          {
              DataTable dt = getdata();
              gv_details.Datasource = dt.tablesort(dt, ViewState["sortColumn"].ToString(), ViewState["sortDirection"].ToString());
              dv_details.Databind();
          }

          public void validate()
          {
               bool result = txtuname.emptyornot();
          }
      }

  • Lambda Expressions
    • Provide a complete functinal syntax of writing for anonymous methods, these are useful when writing LINQ expressions
    • Ex : Class :

      public class address
      {
          public string hno {get; set;}
          public string street{get; set;}
          public string city {get; set;}
          public int pinno {get; set;}
      }


      add data

      List <address> addresses = new List<address>
      {
          new address {hno = "18/a/1",street="3/1",city ="Hyd",pinno =500080}
          new address {hno = "10/s/3",street="2/a/1",city ="Hyd",pinno =500004}
          new address {hno = "102/r/1",street="5",city ="Secbad",pinno =500102}
      };


      IEnumerable<address> result = addresses.where(a => a.city == "Hyd");

      here (a => a.city == "Hyd") is Lamda Expression, using this Lamda expression to specify the filter to use when retriving the address
      In C# a lambda expression is syntactically written as a parameter list, followed by a => token, and then followed by the expression


      Query Syntax (LINQ : Language Integrated Query )

      It's declarative shorthand for expressing the queries using LINQ query operators. It offers a syntax that increases the readability and clarity of expressing query in the code, and it can be easy to read and write correctly.


      public class address
      {
          public string hno {get; set;}
          public string street{get; set;}
          public string city {get; set;}
          public int pinno {get; set;}
      }


      add data

      List <address> addresses = new List<address>
      {
          new address {hno = "18/a/1",street="3/1",city ="Hyd",pinno =500080}
          new address {hno = "10/s/3",street="2/a/1",city ="Hyd",pinno =500004}
          new address {hno = "102/r/1",street="5",city ="Secbad",pinno =500102}
      };


      Qury syntax to fetch the address which have city startwith "H" and also sort by pinno

      IEnumerable<address> result = from a in addresses
                      where a.city.Startswith("H")
                      Orderby a.pinno descending
                      select a;

      from the above code, that want to perform a "LINQ" query aginnext the addreee collection, so that we used ther parameter "a" to represent the each item of Address.

      public class newaddress
      {
          public string fuladdress {get; set;}
          public int pinno {get; set;}
      }

      IEnumerable<address> result = from a in addresses
                      where a.city.Startswith("H")
                      Orderby a.pinno descending
                      select new newaddress {
                      fuladdress  = a.hno +", "+ a.street +", "+a.city,
                      pinno = a.pinno};  
       
  • Anonymous Types
    • Anonymous types are a convenient language feature of C# and VB that enable developers to concisely define inline CLR types within code, without having to explicitly define a formal class declaration of the type.

      we've introduced the "var" keyword, we can start to use it to refer to anonymous types.

      var addresses = new {hno = "18-10/2", street="3/1",city="Hyd",pinno=500080 }

      when ever use the addresses. then the hno,street,city,pinno properties appeared autometically for the addresses. the type of these properties is Anonymous
By Balavardhan Reddy - Posted in: ASP.Net
Write comment - See the 26 comments
Home

My Blog

Profile

  • Balavardhan Reddy
  • Balavardhan Reddy Narani
  • Male
  • Life SSRS ASP.Net SQL Server Good Quotes
  • Software Eng.. From India..

Categories

Random pictures

  • 5.jpg
  • 6.gif
  • 9.jpg
  • 2.jpg
  • 4.gif

Recent comments

Recommend

Links

Create your blog for free on over-blog.com - Contact - Terms of Service - Earn Royalties - Report abuse - Most commented articles