<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>.NET 4</title>
        <link>http://geekswithblogs.net/rajeshpillai/category/10985.aspx</link>
        <description>.net 4</description>
        <language>en-US</language>
        <copyright>Rajesh Pillai</copyright>
        <managingEditor>thinkrajesh@yahoo.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>VS 2010 IDE Features in a nutshell</title>
            <link>http://geekswithblogs.net/rajeshpillai/archive/2010/03/29/vs-2010-ide-features-in-a-nutshell.aspx</link>
            <description>&lt;div&gt;Going through a VS 2010 IDE Features.  We will explore each feature  in subsequent posts.  The post are documented as being reviewed by me.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;
&lt;table border="1" style="display: inline; border-collapse: collapse; font-size: 1em;"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td class="ms-rtetablecells" style="vertical-align: top;"&gt;
            &lt;ul&gt;
                &lt;li&gt;Breakpoint Labeling&lt;/li&gt;
                &lt;li&gt;Breakpoint Searching&lt;/li&gt;
                &lt;li&gt;Breakpoint Import/Export&lt;/li&gt;
                &lt;li&gt;Dynamic Data Tooling&lt;/li&gt;
                &lt;li&gt;WPF Tree Visualizer&lt;/li&gt;
                &lt;li&gt;Call Hierarchy&lt;/li&gt;
                &lt;li&gt;Improved WPF Tooling&lt;/li&gt;
                &lt;li&gt;Historical Debugging&lt;/li&gt;
                &lt;li&gt;Mini-Dump Debugging&lt;/li&gt;
                &lt;li&gt;Quick Search&lt;/li&gt;
                &lt;li&gt;Better Multi-Monitor Support&lt;/li&gt;
                &lt;li&gt;Highlight References&lt;/li&gt;
            &lt;/ul&gt;
            &lt;/td&gt;
            &lt;td class="ms-rtetablecells" style="vertical-align: top;"&gt;
            &lt;ul&gt;
                &lt;li&gt;Parallel Stacks Window&lt;/li&gt;
                &lt;li&gt;Parallel Tasks Window&lt;/li&gt;
                &lt;li&gt;Document Map Margin&lt;/li&gt;
                &lt;li&gt;Generate from Usage&lt;/li&gt;
                &lt;li&gt;Concurrency Profiler&lt;/li&gt;
                &lt;li&gt;Inline Call Tree&lt;/li&gt;
                &lt;li&gt;Extensible Test Runner&lt;/li&gt;
                &lt;li&gt;MVC Tooling&lt;/li&gt;
                &lt;li&gt;Web Deploy&lt;/li&gt;
                &lt;li&gt;JQuery IntelliSense&lt;/li&gt;
                &lt;li&gt;SharePoint Tooling&lt;/li&gt;
                &lt;li&gt;HTML Snippets&lt;/li&gt;
                &lt;li&gt;Web.config Transformation&lt;/li&gt;
                &lt;li&gt;ClickOnce Enhancements for MS Office&lt;/li&gt;
            &lt;/ul&gt;
            &lt;p&gt; &lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;VS is an editor as well as a platform for development and this is  only more true with VS 2010.  As an editor there is improved forcus on  writing code, understanding code, navigating and publishing code.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;VS Shell has been completely rewritten using WPF extending huge  benefits.  The start page has been rewritten using XAML, so it is easy  to customize.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Support new support for Silverlight, MFC, F# , Azure and extended  support for Office 2010, Sharepoint.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Has a good Extension Manager as well.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Enjoy Coding !!! &lt;/div&gt; &lt;img src="http://geekswithblogs.net/rajeshpillai/aggbug/138967.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rajesh Pillai</dc:creator>
            <guid>http://geekswithblogs.net/rajeshpillai/archive/2010/03/29/vs-2010-ide-features-in-a-nutshell.aspx</guid>
            <pubDate>Mon, 29 Mar 2010 10:42:55 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/rajeshpillai/comments/138967.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/rajeshpillai/archive/2010/03/29/vs-2010-ide-features-in-a-nutshell.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/rajeshpillai/comments/commentRss/138967.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/rajeshpillai/services/trackbacks/138967.aspx</trackback:ping>
        </item>
        <item>
            <title>c# 4.0 Part 1</title>
            <link>http://geekswithblogs.net/rajeshpillai/archive/2009/11/28/csharp41.aspx</link>
            <description>&lt;h1&gt;c# 4.0 Part 1&lt;/h1&gt;
&lt;p&gt;&lt;br /&gt;
The following are some of the new features and few interesting things you can do with c# 4.0.&lt;br /&gt;
&lt;br /&gt;
- Named and Optional Parameters&lt;br /&gt;
- ExpandoObject&lt;br /&gt;
- Interface with Python (and example)&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;Program 1&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;
class Program
{
   // Optional parameters should be at the end
   static void PrintMessage(string name = "World", string greeting = "Hello")
   {
       Console.WriteLine("{0} {1}", greeting, name);
   } 
   static void Main (string[] args)
   {
       PrintMessage("World", "Hello");  // prints "Hello World"
       PrintMessage(greeting:"Goodbye");  // prints "Goodbye World"

   }
}
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;Program 2&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
- Dynamic Invocation&lt;/p&gt;
&lt;pre&gt;

class Person
{
   public string FirstName {get;set;}
   public string LastName {get;set;}
}

class Program
{
   static void Main (string[] args)
   {
       var person = new Person();
       person.FirstName = "Rajesh";
       person.LastName = "Pillai";
     
       object o = person;
       // o.GetType().InvokeMember(....);   older method of late binding
     
       // hold ref. to almost anything, but more extensible (like  interface with python or ruby
       dynamic dp = person; 
     
       // The below code compiles "even though FullName is not declared".  You get runtime exception
       Console.WriteLine(dp.FullName);
     
   }
}
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;Program 3&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;

// Build Person object at runtime
using System.Dynamic;
class Program
{
   static void Main (string[] args)
   {
       // ExpandoObject :  similar to javascript object works (add dynamic prop and funcs
       dynamic dp = new ExpandoObject();
     
       // Dynamically create "FirstName"
       dp.FirstName = "Rajesh";
       dp.LastName = "Pillai";
     
       Console.WriteLine("{0} {1}", dp.FirstName, dp.LastName);
     
       // Add methods  (methods need to be delegate)
       dp.Print = new Action(delegate ()
       {
           Console.WriteLine("{0} {1}", dp.FirstName, dp.LastNmae);
       });
     
       // OR use lambda syntax
       dp.PrintPretty = new Action(() =&amp;gt;
       {
           Console.WriteLine("{0} {1}", dp.FirstName, dp.LastNmae);
       });
     
     
       dp.Print();
       dp.PrintPretty();
         
   }
}
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;Program 4&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Reference with other language IronPyton 2.6 CTP for .NET 4.0 Beta 1&lt;/p&gt;
&lt;pre&gt;

using IronPython.Hosting;
class Program
{
   static void Main (string[] args)
   {
       var py = Python.CreateEngine();  // may be used for end user scripting customization
     
       // UseFile-&amp;gt;ScriptScope is similar to ExpandoObject
       dynamic sample = py.Runtime.UseFile("Sample.py");  // refer the python file
       dynamic sum =  sample.add(5, 6);
     
       Console.WriteLine(sum);
       Console.WriteLine(sum.GetType());  // System.Int32
 

       dynamic sum1 =  sample.add(5.6, 6.7);
     
       Console.WriteLine(sum1);
       Console.WriteLine(sum1.GetType());  // System.Double
     
   }
}
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;
// some python code&lt;br /&gt;
Sample.py  (add two numbers)&lt;br /&gt;
------------------------------&lt;/p&gt;
&lt;pre&gt;

def add(x,y):
   return x + y&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/rajeshpillai/aggbug/136593.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rajesh Pillai</dc:creator>
            <guid>http://geekswithblogs.net/rajeshpillai/archive/2009/11/28/csharp41.aspx</guid>
            <pubDate>Sat, 28 Nov 2009 10:35:40 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/rajeshpillai/comments/136593.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/rajeshpillai/archive/2009/11/28/csharp41.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/rajeshpillai/comments/commentRss/136593.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/rajeshpillai/services/trackbacks/136593.aspx</trackback:ping>
        </item>
        <item>
            <title>Tip : ASP.NET 4 Setting Client IDs</title>
            <link>http://geekswithblogs.net/rajeshpillai/archive/2009/11/28/settingclientid.aspx</link>
            <description>&lt;h1&gt;ASP.NET 4 Setting Client IDs&lt;/h1&gt;
&lt;p&gt;Another most wanted feature of asp.net 4 is the ability control client ID generation.  At least I am happy with this.  With prior&lt;br /&gt;
version of asp.net it was always difficult control the control id generation though not impossible.  Why is this important?  If you&lt;br /&gt;
can control ID generation then the markup size may dramatially reduce which may result in improved performance.  The gain&lt;br /&gt;
may around 15% reduction in terms of markup size in case of complicated nested pages.  &lt;/p&gt;
&lt;p&gt;The new ClientIDMode property addresses this long standing issue in ASP.NET.  Knowing the id attribute for rendered&lt;br /&gt;
elements are important if your application uses client script that references these elements.&lt;/p&gt;
&lt;p&gt;The new CLientIDMode property lets you specify more precisely how the client ID is generated for controls.  You can set the&lt;br /&gt;
ClientIDMode property for any control, including for the page.  Following are the possible settings&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;AutoID  &lt;br /&gt;
    This is the same as earlier versions of asp.net.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
    &lt;li&gt;Static  &lt;br /&gt;
    This specifies that the ClientID value will be the same as the ID without concatenating the IDs of parent naming&lt;br /&gt;
    containers.  This can be useful in Web user controls.  &lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
    &lt;li&gt;Predictable&lt;br /&gt;
    This option is primarily for use in data controls that use repeating templates.  It concatenates the ID properties&lt;br /&gt;
    of the control's naming containers, but generated ClientID values do not contain strings like "ctlxxx".  This setting&lt;br /&gt;
    works in conjuction with the ClientIDRowSuffix propertyof the control.  You set the ClientIDRowSuffix property to&lt;br /&gt;
    the name of a data field, and the vlaue of that field is used as the suffix for the generated ClientID value.  It's &lt;br /&gt;
    recommended to use the primary key of a data record as the ClientIDRowSuffix value.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
    &lt;li&gt;Inherit&lt;br /&gt;
    This setting is the default behaviour for controls.  It specifie that a control's ID generation is the same as its parent.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;ClientIDMode can be set at the page or control level or in the configuration.  To set it at the page level refer the below example&lt;/p&gt;
&lt;p&gt;&amp;lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"&lt;br /&gt;
                      ClientIDMode = "Predictbale" %&amp;gt;&lt;/p&gt;
&lt;p&gt;The following example shows hwo to To set it in the configuration file &lt;br /&gt;
&amp;lt;system.web&amp;gt;&lt;br /&gt;
       &amp;lt;pages clientIDMode ="Predictable"&amp;gt;&amp;lt;/pages&amp;gt;&lt;br /&gt;
&amp;lt;/system.web&amp;gt;&lt;/p&gt;
&lt;p&gt;For detailed reading refer&lt;br /&gt;
&lt;a href="http://www.asp.net/LEARN/whitepapers/aspnet4/default.aspx"&gt;www.asp.net/LEARN/whitepapers/aspnet4/default.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have found this feature very handy.  Hope you will like it too.   &lt;br /&gt;
&lt;br /&gt;
Happy Programming !!!&lt;/p&gt; &lt;img src="http://geekswithblogs.net/rajeshpillai/aggbug/136592.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rajesh Pillai</dc:creator>
            <guid>http://geekswithblogs.net/rajeshpillai/archive/2009/11/28/settingclientid.aspx</guid>
            <pubDate>Sat, 28 Nov 2009 10:16:41 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/rajeshpillai/comments/136592.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/rajeshpillai/archive/2009/11/28/settingclientid.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/rajeshpillai/comments/commentRss/136592.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/rajeshpillai/services/trackbacks/136592.aspx</trackback:ping>
        </item>
        <item>
            <title>Tip: ASP.NET 4 Permanently Redirecting a page</title>
            <link>http://geekswithblogs.net/rajeshpillai/archive/2009/11/28/tip-asp.net-4-permanently-redirecting-a-page.aspx</link>
            <description>&lt;h1&gt;ASP.NET 4 Permanently Redirecting a page&lt;/h1&gt;
&lt;p&gt;You may have faced this problem of moving pages in a web applications around which can leat to an &lt;br /&gt;
accumulation of state links in search engines.  Traditionally developers have handled requests to old URL's by using&lt;br /&gt;
Response.Redirect method to forward request to new URL.  &lt;br /&gt;
&lt;br /&gt;
However as you may be aware of the Redirect method issues an HTTP 302 Found status (temporary redirect) response&lt;br /&gt;
, which results in an extra HTTP round trip to the server when users attempt to access the old URL's.  This has a performance&lt;br /&gt;
implication as well because of the round trip.&lt;br /&gt;
&lt;br /&gt;
ASP.NET 4 adds a new RedirectPermannent helper method which makes it easy to issue HTTP 301 Moved Permanently&lt;br /&gt;
responses.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: rgb(128, 128, 0);"&gt;&lt;em&gt;RedirectPermanent("/newlocation/oldcontent.aspx")&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
With this addition the search engines and other user agents that recognizse permanent redirects will store the new URL&lt;br /&gt;
that is associated with the content, which eliminates the unnecessary round trip made by the browser for temporary redirects.&lt;br /&gt;
&lt;br /&gt;
You can verify this by observing the request in the Fiddler.  For me I think this feature is pretty useful in migrating application&lt;br /&gt;
from old website to the new one.  Will definitely save a lot of headache.&lt;br /&gt;
 &lt;/p&gt; &lt;img src="http://geekswithblogs.net/rajeshpillai/aggbug/136591.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rajesh Pillai</dc:creator>
            <guid>http://geekswithblogs.net/rajeshpillai/archive/2009/11/28/tip-asp.net-4-permanently-redirecting-a-page.aspx</guid>
            <pubDate>Sat, 28 Nov 2009 09:46:42 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/rajeshpillai/comments/136591.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/rajeshpillai/archive/2009/11/28/tip-asp.net-4-permanently-redirecting-a-page.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/rajeshpillai/comments/commentRss/136591.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/rajeshpillai/services/trackbacks/136591.aspx</trackback:ping>
        </item>
        <item>
            <title>Tip: ASP.NET 4.0 State Compression</title>
            <link>http://geekswithblogs.net/rajeshpillai/archive/2009/11/28/tip-asp.net-4.0-state-compression.aspx</link>
            <description>&lt;h1&gt;ASP.NET 4.0 State Compression&lt;/h1&gt;
&lt;p&gt;Session state compression was always a worry in the past.  With asp.net 4.0 this feature is built into the framework.&lt;br /&gt;
Just modify your web.config with the following changes and you are ready to go.  Now there will be less data travelling &lt;br /&gt;
through the wire.&lt;/p&gt;
&lt;pre class="code_block"&gt;
&amp;lt;sessionState
  mode="SqlServer"
  sqlConnectionString="data source=dbserver;Initial Catalog=aspnetstate"
  allowCustomSqlDatabase="true"
  compressionEnabled="true"
/&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Just add the "compressionEnabled="true" to sessionState config.  The compression is done by&lt;br /&gt;
.NET framework System.IO.Compression.GZipStream class.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/rajeshpillai/aggbug/136590.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rajesh Pillai</dc:creator>
            <guid>http://geekswithblogs.net/rajeshpillai/archive/2009/11/28/tip-asp.net-4.0-state-compression.aspx</guid>
            <pubDate>Sat, 28 Nov 2009 09:34:04 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/rajeshpillai/comments/136590.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/rajeshpillai/archive/2009/11/28/tip-asp.net-4.0-state-compression.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/rajeshpillai/comments/commentRss/136590.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/rajeshpillai/services/trackbacks/136590.aspx</trackback:ping>
        </item>
    </channel>
</rss>
