<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>Sonam Singh</title>
        <link>http://geekswithblogs.net/sonam/Default.aspx</link>
        <description> </description>
        <language>en-US</language>
        <copyright>sonam</copyright>
        <managingEditor>sonamsingh_19@yahoo.co.in</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Sonam Singh</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/sonam/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>MS Tech Ed 2011 Coming Soon</title>
            <category>.Net</category>
            <category>Fun</category>
            <category>ASP.net</category>
            <category>Robotics</category>
            <link>http://geekswithblogs.net/sonam/archive/2011/02/25/ms-tech-ed-2011-coming-soon.aspx</link>
            <description>&lt;p&gt;Microsoft Tech ed 2010 was a great success.&lt;br /&gt;
Infact  Most of such conferences always provide a great place to meet other  technology enthusiasts and ofcourse,whats in the pipeline for future products of a company or field..&lt;/p&gt;
&lt;p&gt;And yet again,MS Tech ed India is coming on 23-25 march  in Banglore,India.Well,the place is  ofcourse right suited for any IT/Computing conference.After all,Its Silicon Valley of India..&lt;/p&gt;
&lt;p&gt;From Last year.I remember  a session by Harish about  “Building pure client side apps with  Jquery and Microsoft Ajax .”&lt;/p&gt;
&lt;p&gt;Here’s the video:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://live.viasilverlight.com/TechEdOnDemand/Breakouts/TheWebSimplified1/Session4/AjaxClientSideApps.wmv"&gt;http://live.viasilverlight.com/TechEdOnDemand/Breakouts/TheWebSimplified1/Session4/AjaxClientSideApps.wmv&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;At that time only,I got to know that jquery is so easy to use for  ajax or client side templating.Though I prefer jquery over  Microsoft Ajax many folds.UpdatePanel  is Dead for sure in my view.&lt;br /&gt;
I believe,Web forms will be dead sooner or later with ASP.Net  MVC  gaining share many folds.(TODO:Learn MVC).&lt;/p&gt;
&lt;p&gt;The new standard is surely:JQUERY .&lt;/p&gt;
&lt;p&gt;Between,Last years videos and ppt’s  are available to browse and download:&lt;br /&gt;
&lt;a href="http://microsoftteched.in/2010/downloads.aspx"&gt;http://microsoftteched.in/2010/downloads.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After going through Tech Ad 2011 session agendas : &lt;a href="http://www.microsoft.com/india/teched2011/agenda.aspx"&gt;http://www.microsoft.com/india/teched2011/agenda.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Few of my personal choices to watch would be:&lt;/p&gt;
&lt;p&gt;Day 1: a) Identity And Access Control in the Cloud &lt;br /&gt;
       b)Windows 7 at  Home:Digitizing your Home.(Sounds cool.)&lt;br /&gt;
       c) And ofcourse,Jquery and MS ajax(Lets see if MS can do something that’s not already happening with their version Of Ajax)..&lt;/p&gt;
&lt;p&gt;Day 2:  a) Lap Around Silverlight 5 and Html 5 as I have heard some hot talks that html5 will kill Silverlight,(I don’t see it in near future though).&lt;/p&gt;
&lt;p&gt;       b) Html 5 more than “Html 5”…Google will be seeing this one.&lt;/p&gt;
&lt;p&gt;Day3: a) Cross Browser applications in Azure&lt;br /&gt;
      b)VS 2010 sessions of automated testing azure apps etc.&lt;/p&gt;
&lt;p&gt;Windows Phone 7 sessions will surely be of more interest now after MS-Nokia Deal.&lt;/p&gt;
&lt;p&gt;Though,Personally,I would want atleast some worth of  sessions on MS  future in Robotics,AI.Perhaps  I am looking at wrong place..(When is PDC?)&lt;/p&gt;
&lt;p&gt;And Since,Bill Gates  consider Robotics as the next big thing,&lt;/p&gt;
&lt;p&gt;Refer  this one : &lt;a href="http://www.cs.virginia.edu/robins/A_Robot_in_Every_Home.pdf"&gt;http://www.cs.virginia.edu/robins/A_Robot_in_Every_Home.pdf&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I am sure,they wont loose this new hot spot to competitors,  like how google rules in Online  Search now.Robotics and AI will surely provide a big battlefield  for future.See,What IBM is doing with IBM Watson.&lt;/p&gt;
&lt;p&gt;OR see this, &lt;a href="http://www.sciencedaily.com/releases/2011/02/110218083711.htm"&gt;http://www.sciencedaily.com/releases/2011/02/110218083711.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;this is cool only if you can control your mind.Atleast,I’ll prefer regular driving (I would devote my mind seeing  people,places which we see on road).thats what jouney makes “cool”.:P.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
 &lt;/p&gt; &lt;img src="http://geekswithblogs.net/sonam/aggbug/144116.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sonam</dc:creator>
            <guid>http://geekswithblogs.net/sonam/archive/2011/02/25/ms-tech-ed-2011-coming-soon.aspx</guid>
            <pubDate>Fri, 25 Feb 2011 13:52:11 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/sonam/comments/144116.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/sonam/archive/2011/02/25/ms-tech-ed-2011-coming-soon.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/sonam/comments/commentRss/144116.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Whats new in My Life:Robotics,Azure</title>
            <category>Fun</category>
            <link>http://geekswithblogs.net/sonam/archive/2010/03/20/whats-new-in-my-liferoboticsazure.aspx</link>
            <description>&lt;p&gt;AZURE:&lt;/p&gt;  &lt;p&gt;I haven’t blogged from long time.I was actually busy with doing some Azure.&lt;/p&gt;  &lt;p&gt;For any starters with Azure,I would recommend to go with Neil:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://nmackenzie.spaces.live.com/Blog/cns!B863FF075995D18A!564.entry"&gt;http://nmackenzie.spaces.live.com/Blog/cns!B863FF075995D18A!564.entry&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Awesome content.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Another thing that has come in my interests:Robotics&lt;/p&gt;  &lt;p&gt;Yes,I am finally reading up on robotics, specially the mobile robotics.&lt;/p&gt;  &lt;p&gt;Since,I don’t have any prof to guide yet,I am doing it independently by reading research papers and books.&lt;/p&gt;  &lt;p&gt;My first robot is not autonomous but i am actually making it for RoboWars.&lt;/p&gt;  &lt;p&gt;I got inspired by this video of Steve jobs and I think,I love to work on robotics.Perhaps ,thats my love.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=Hd_ptbiPoXM"&gt;http://www.youtube.com/watch?v=Hd_ptbiPoXM&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Cya&lt;/p&gt; &lt;img src="http://geekswithblogs.net/sonam/aggbug/138638.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sonam</dc:creator>
            <guid>http://geekswithblogs.net/sonam/archive/2010/03/20/whats-new-in-my-liferoboticsazure.aspx</guid>
            <pubDate>Sun, 21 Mar 2010 06:46:44 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/sonam/comments/138638.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/sonam/archive/2010/03/20/whats-new-in-my-liferoboticsazure.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/sonam/comments/commentRss/138638.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Capturing optional groups in regular expressions?</title>
            <category>.Net</category>
            <category>Fun</category>
            <category>C#</category>
            <link>http://geekswithblogs.net/sonam/archive/2009/12/24/capturing-optional-groups-in-regular-expressions.aspx</link>
            <description>&lt;p&gt;  string input =&lt;span style="color: #ff6600"&gt; @"cool  man dog no dude yes fight son";&lt;/span&gt;&lt;br /&gt;
  string pattern = &lt;span style="color: #ff6600"&gt;@"cool (?&amp;lt;hello&amp;gt;((.)* ))   (?&amp;lt;h&amp;gt;( (dude)?)) (?(h)(?&amp;lt;dude&amp;gt;((.)*)))";&lt;/span&gt;&lt;br /&gt;
            &lt;br /&gt;
       MatchCollection matches = Regex.Matches(input, pattern, RegexOptions.ExplicitCapture&lt;br /&gt;
              | RegexOptions.IgnorePatternWhitespace);&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
            foreach (Match match in matches)&lt;br /&gt;
            {&lt;br /&gt;
                Console.WriteLine("dude=" + match.Groups["dude"].Value);&lt;br /&gt;
                Console.WriteLine("hello=" + match.Groups["hello"].Value);&lt;br /&gt;
                Console.ReadLine();&lt;br /&gt;
            }&lt;br /&gt;
/*Output-&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
dude=&lt;br /&gt;
hello=  man dog no dude yes fight son&lt;/p&gt;
&lt;p&gt;*/&lt;/p&gt;
&lt;p&gt;But the required output is:&lt;/p&gt;
&lt;p&gt;/*Output-&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
dude=yes fight son&lt;br /&gt;
hello=  man dog no&lt;/p&gt;
&lt;p&gt;*/&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
The target is that i want to capture "strings that have cool as first 'word'  and have 'dude' word as optional in between".&lt;br /&gt;
Now,I want string that follows word "cool" ("man dog no") until "dude" word comes or end comes.&lt;br /&gt;
if "dude" word comes,I want the string that follows word "dude".&lt;/p&gt;
&lt;p&gt;Can anybody explain me why the output is not correct or where i am wrong?&lt;br /&gt;
Thanks in advance.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/sonam/aggbug/137214.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sonam</dc:creator>
            <guid>http://geekswithblogs.net/sonam/archive/2009/12/24/capturing-optional-groups-in-regular-expressions.aspx</guid>
            <pubDate>Thu, 24 Dec 2009 19:05:21 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/sonam/comments/137214.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/sonam/archive/2009/12/24/capturing-optional-groups-in-regular-expressions.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/sonam/comments/commentRss/137214.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Adding controls dynamically in ASP.Net?</title>
            <category>ASP.net</category>
            <link>http://geekswithblogs.net/sonam/archive/2009/10/04/adding-controls-dynamically-in-asp.net.aspx</link>
            <description>&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;The Problem scenario is like this:&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;I have a button and a textbox on a asp.net page:&lt;/font&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: #a31515; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;asp&lt;/span&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;:&lt;/span&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: #a31515; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;Panel&lt;/span&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt; &lt;span style="COLOR: red"&gt;ID&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="Panel1"&lt;/span&gt; &lt;span style="COLOR: red"&gt;runat&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;           &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;                &lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;asp&lt;/span&gt;&lt;span style="COLOR: blue"&gt;:&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;TextBox&lt;/span&gt; &lt;span style="COLOR: red"&gt;ID&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="GroupName"&lt;/span&gt; &lt;span style="COLOR: red"&gt;runat&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: red"&gt;Width&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="352px” /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;                &lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;asp&lt;/span&gt;&lt;span style="COLOR: blue"&gt;:&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;Button&lt;/span&gt; &lt;span style="COLOR: red"&gt;ID&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="CreateGroup"&lt;/span&gt; &lt;span style="COLOR: red"&gt;runat&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: red"&gt;Text&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="Create"&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;                &lt;/span&gt;&lt;span style="COLOR: red"&gt;onclick&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="CreateGroup_Click"&lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;                      &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;asp&lt;/span&gt;&lt;span style="COLOR: blue"&gt;:&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;Panel&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&amp;lt;&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: #a31515; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;asp&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;:&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: #a31515; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;PlaceHolder&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt; &lt;span style="COLOR: red"&gt;ID&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="PlaceHolder1"&lt;/span&gt; &lt;span style="COLOR: red"&gt;runat&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="server"&lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;   &lt;/span&gt;&lt;span style="COLOR: blue"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;When I click the button a label should be added dynamically to the placeholder located in the page:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;The code in click event handler is as:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;protected&lt;/span&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; CreateGroup_Click(&lt;span style="COLOR: blue"&gt;object&lt;/span&gt; sender, &lt;span style="COLOR: #2b91af"&gt;EventArgs&lt;/span&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;          &lt;/span&gt;&lt;span style="COLOR: green"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: green; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;span style="COLOR: #2b91af"&gt;Label&lt;/span&gt; label = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;Label&lt;/span&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;label.Text = GroupName.Text;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;label.ID = GroupName.Text;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;PlaceHolder1.Controls.Add(label);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;Its working but the problem is only last label are added to placeholder not the previous ones like:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;If I put “Computer” in texbox and click,then the label is added .fine.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;But If I put again “science” and click,then the label with “science” is added but the previous label is not rendered.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;Any guesses,solutions?&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font color="#000000"&gt;Well..here are some workarounds:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font color="#000000"&gt;You can use this:SEE THE EXPLANATION WHY ITS HAPPENING:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font face=""&gt;&lt;/font&gt;&lt;o:p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font color="#000000" face=""&gt;&lt;a href="http://igregor.net/post/2007/12/24/Adding-Controls-to-an-ASPNET-form-Dynamically.aspx"&gt;http://igregor.net/post/2007/12/24/Adding-Controls-to-an-ASPNET-form-Dynamically.aspx&lt;/a&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font color="#000000"&gt;Or this:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font color="#000000" face=""&gt;&lt;a href="http://stackoverflow.com/questions/113392/dynamically-added-controls-in-asp-net"&gt;http://stackoverflow.com/questions/113392/dynamically-added-controls-in-asp-net&lt;/a&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;a href="http://www.4guysfromrolla.com/articles/092904-1.aspx"&gt;http://www.4guysfromrolla.com/articles/092904-1.aspx&lt;br /&gt;
&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font color="#000000"&gt;Or the best solution is &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font color="#000000"&gt;Avoid dynamically creating controls.Actually creating controls dynamically is not the problem but maintaining there state might be.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font color="#000000"&gt;Instead of storing dynamically added controls in ViewState,&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font color="#000000"&gt;You can use a collection to store them and store it in ViewState[Updated] . But I would again say,Avoid such things as much as possible..&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font color="#000000"&gt;If you get any better workaround ,Please do point me to that.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font color="#0000ff"&gt;In my opinion,The best Solution will be the solution which will add the controls just like they are added at design time.But design time is different than runtime..Which occurs after compilation.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;font color="#ff0000"&gt;Please read the second comments that follows this post(Some nice cons of static variables in ASP.Net pages&lt;/font&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;font color="#000000"&gt;I am pasting here as i really liked the "Disadvantages of static variables in ASP.NET"&lt;/font&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;font color="#00ff00"&gt;"&lt;/font&gt;&lt;font color="#000000"&gt;You can use a collection to store them and declare it as static"  I need to caution against this. I have learned some hard lessons with this.&lt;br /&gt;
&lt;br /&gt;
I have many developers use static variables in their ASP.NET pages and NOT realize thast every user shares that variable.&lt;br /&gt;
&lt;br /&gt;
If I have static array of strings that a button click adds to, and I have 2 users click that button, there will be 1 array 2 items in that array. A page where this is the intended affect desireable is rare.. and probally badly designed :).&lt;br /&gt;
&lt;br /&gt;
The implications of adding a Control as a static member would be much, much worse. (GC collection and a threading nightmare!)&lt;br /&gt;
&lt;br /&gt;
Storing Meta data using a client-specific storage, like Viewstate may be the way to go. &lt;br /&gt;
&lt;/font&gt;&lt;br /&gt;
&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/o:p&gt;&lt;/span&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;o:p&gt;&lt;font color="#000000" size="3"&gt; &lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;&lt;o:p&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/sonam/aggbug/135306.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sonam</dc:creator>
            <guid>http://geekswithblogs.net/sonam/archive/2009/10/04/adding-controls-dynamically-in-asp.net.aspx</guid>
            <pubDate>Mon, 05 Oct 2009 10:58:14 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/sonam/comments/135306.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/sonam/archive/2009/10/04/adding-controls-dynamically-in-asp.net.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/sonam/comments/commentRss/135306.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Setting "WindowStyle=None" hides taskbar on maximizing</title>
            <category>WPF</category>
            <category>C#</category>
            <link>http://geekswithblogs.net/sonam/archive/2009/07/21/setting-windowstylenone-hides-taskbar-on-maximizing.aspx</link>
            <description>&lt;br /&gt;
If you ever tried to make irregular windows in wpf and used setting windowstyle=none,You might have used some code like this to enable minimising,maximising properties for the window:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: rgb(255, 102, 0);"&gt;        private void Minimize_Click(object sender, RoutedEventArgs e)&lt;/span&gt;&lt;br style="color: rgb(255, 102, 0);" /&gt;
&lt;span style="color: rgb(255, 102, 0);"&gt;        {&lt;/span&gt;&lt;br style="color: rgb(255, 102, 0);" /&gt;
&lt;br style="color: rgb(255, 102, 0);" /&gt;
&lt;span style="color: rgb(255, 102, 0);"&gt;            this.WindowState = WindowState.Minimized;&lt;/span&gt;&lt;br style="color: rgb(255, 102, 0);" /&gt;
&lt;br style="color: rgb(255, 102, 0);" /&gt;
&lt;span style="color: rgb(255, 102, 0);"&gt;        }&lt;/span&gt;&lt;br /&gt;
&lt;br style="color: rgb(255, 0, 0);" /&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;        private void Maximize_Click(object sender, RoutedEventArgs e)&lt;/span&gt;&lt;br style="color: rgb(255, 0, 0);" /&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;        {&lt;/span&gt;&lt;br style="color: rgb(255, 0, 0);" /&gt;
&lt;br style="color: rgb(255, 0, 0);" /&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;            this.WindowState = WindowState.Maximized;&lt;/span&gt;&lt;br style="color: rgb(255, 0, 0);" /&gt;
&lt;br style="color: rgb(255, 0, 0);" /&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;        }&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
But on maximizing  ,the window hides the taskbar.i.e it goes fullscreen.&lt;br /&gt;
To avoid that issue,You can use this code and yes,it works like a charm.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://blogs.msdn.com/llobo/archive/2006/08/01/Maximizing-window-_2800_with-WindowStyle_3D00_None_2900_-considering-Taskbar.aspx"&gt;http://blogs.msdn.com/llobo/archive/2006/08/01/Maximizing-window-_2800_with-WindowStyle_3D00_None_2900_-considering-Taskbar.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"&gt;
&lt;pre class="code"&gt;    public override void OnApplyTemplate()&lt;br /&gt;        {&lt;br /&gt;            System.IntPtr handle = (new WinInterop.WindowInteropHelper(this)).Handle;&lt;br /&gt;            WinInterop.HwndSource.FromHwnd(handle).AddHook(new WinInterop.HwndSourceHook(WindowProc));&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private static System.IntPtr WindowProc(&lt;br /&gt;              System.IntPtr hwnd,&lt;br /&gt;              int msg,&lt;br /&gt;              System.IntPtr wParam,&lt;br /&gt;              System.IntPtr lParam,&lt;br /&gt;              ref bool handled)&lt;br /&gt;        {&lt;br /&gt;            switch (msg)&lt;br /&gt;            {&lt;br /&gt;                &lt;font style="background-color: rgb(255, 255, 0);"&gt;&lt;font color="#000000"&gt;case 0x0024:&lt;/font&gt;&lt;span style="font-size: 10pt; color: green; font-family: Consolas;"&gt;&lt;font color="#000000"&gt;/* WM_GETMINMAXINFO */&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;                    WmGetMinMaxInfo(hwnd, lParam);&lt;br /&gt;                    handled = true;&lt;br /&gt;                    break;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            return (System.IntPtr)0;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private static void WmGetMinMaxInfo(System.IntPtr hwnd, System.IntPtr lParam)&lt;br /&gt;        {&lt;br /&gt;            &lt;br /&gt;            MINMAXINFO mmi = (MINMAXINFO)Marshal.PtrToStructure(lParam, typeof(MINMAXINFO));&lt;br /&gt;&lt;br /&gt;            &lt;font color="#000000" style="background-color: rgb(255, 255, 0);"&gt;// Adjust the maximized size and position to fit the work area of the correct monitor&lt;br /&gt;&lt;/font&gt;            int MONITOR_DEFAULTTONEAREST =0x00000002;&lt;br /&gt;            System.IntPtr monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);&lt;br /&gt;&lt;br /&gt;            if (monitor != System.IntPtr.Zero)&lt;br /&gt;            {&lt;br /&gt;                &lt;br /&gt;                MONITORINFO monitorInfo = new MONITORINFO();&lt;br /&gt;                GetMonitorInfo(monitor, monitorInfo);&lt;br /&gt;                RECT rcWorkArea = monitorInfo.rcWork;&lt;br /&gt;                RECT rcMonitorArea = monitorInfo.rcMonitor;&lt;br /&gt;                mmi.ptMaxPosition.x = Math.Abs(rcWorkArea.left - rcMonitorArea.left);&lt;br /&gt;                mmi.ptMaxPosition.y = Math.Abs(rcWorkArea.top - rcMonitorArea.top);&lt;br /&gt;                mmi.ptMaxSize.x = Math.Abs(rcWorkArea.right - rcWorkArea.left);&lt;br /&gt;                mmi.ptMaxSize.y = Math.Abs(rcWorkArea.bottom - rcWorkArea.top);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            Marshal.StructureToPtr(mmi, lParam, true);&lt;br /&gt;        }&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;As seen above the code basically handles the &lt;span style="font-size: 10pt; color: green; font-family: Consolas;"&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;WM_GETMINMAXINFO&lt;/strong&gt;&lt;/font&gt; &lt;/span&gt;message. The sample project code is also included. Have Fun. :)&lt;/p&gt;
&lt;p mce_keep="true"&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: A better way to get the handle to the window is to use the SourceInitialized event. This would also avoid calling ApplyTemplate everytime the window template is changedon the fly. Thanks to Hamid for pointing out the better solution. The attached project is now updated.&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;win.SourceInitialized +=&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;new&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;/font&gt;&lt;font size="2" color="#008080"&gt;EventHandler&lt;/font&gt;&lt;font size="2"&gt;(win_SourceInitialized);&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2" color="#0000ff"&gt;void&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;win_SourceInitialized(&lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;object&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;sender,&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;/font&gt;&lt;font size="2" color="#008080"&gt;EventArgs&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;e)&lt;br /&gt;
{&lt;br /&gt;
   System.&lt;/font&gt;&lt;font size="2" color="#008080"&gt;IntPtr&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;handle = (&lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;new&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;WinInterop.&lt;/font&gt;&lt;font size="2" color="#008080"&gt;WindowInteropHelper&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;this&lt;/font&gt;&lt;font size="2"&gt;)).Handle;&lt;br /&gt;
   WinInterop.&lt;/font&gt;&lt;font size="2" color="#008080"&gt;HwndSource&lt;/font&gt;&lt;font size="2"&gt;.FromHwnd(handle).AddHook(&lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;new&lt;/font&gt;&lt;font size="2"&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;WinInterop.&lt;/font&gt;&lt;font size="2" color="#008080"&gt;HwndSourceHook&lt;/font&gt;&lt;font size="2"&gt;(WindowProc));&lt;br /&gt;
}&lt;/font&gt;&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt; &lt;img src="http://geekswithblogs.net/sonam/aggbug/133639.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sonam</dc:creator>
            <guid>http://geekswithblogs.net/sonam/archive/2009/07/21/setting-windowstylenone-hides-taskbar-on-maximizing.aspx</guid>
            <pubDate>Wed, 22 Jul 2009 11:49:48 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/sonam/comments/133639.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/sonam/archive/2009/07/21/setting-windowstylenone-hides-taskbar-on-maximizing.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/sonam/comments/commentRss/133639.aspx</wfw:commentRss>
        </item>
        <item>
            <title>What happened to my vacations</title>
            <category>.Net</category>
            <category>WPF</category>
            <category>Internship</category>
            <category>Fun</category>
            <category>C#</category>
            <link>http://geekswithblogs.net/sonam/archive/2009/07/21/what-happened-to-my-vacations.aspx</link>
            <description>College is opening tommorow and I am thinking what i have done in past 1 and half months of vacations.&lt;br /&gt;
&lt;br /&gt;
The only thing i can remember is bluz,my open source project.&lt;br /&gt;
Where is that p2p thing i decided earlier?&lt;br /&gt;
All the research papers about skype,overlay networks ,guntella etc are lying there on disk as it is.i have read them only once.I have read not understood..&lt;img src="/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/wink_smile.gif" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
The positive side of vacations is:&lt;br /&gt;
1)I learned a lot about WPF,Blend etc.&lt;br /&gt;
2) I am participating in win7 contest based on above experience.&lt;br /&gt;
3)I met shaun,my  new co-developer of bluz..&lt;br /&gt;
4)I have got some books of ASP.Net by bill ,scott and  WPF book by Mathew macdonald..&lt;br /&gt;
&lt;br /&gt;
And now i have some web 2.0 ideas that i hope to implement as a way of parcticing this ASP.net stuff.Thats a business idea,So you might  see something interesting on web soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So,If i look back that way,I think it was more rewarding than any of internship i could get.&lt;br /&gt;
&lt;br /&gt;
Now ,its my last year of  graduation,My targets include:&lt;br /&gt;
1)Enjoy it fully.I know thats hard but i'll have to make this year remeberable .&lt;br /&gt;
2)Implement business ideas.(I love making money in humanatic way).&lt;br /&gt;
3)Make final year Project.&lt;br /&gt;
The 3rd one is where i'll cut my efforts ,Becoz i don't think that really matters as compared to my learning.Also,I don't see potential partners for a cool. .Net team to make a cool project at the college.&lt;br /&gt;
&lt;br /&gt;
cya guys,&lt;br /&gt;
cheers&lt;br /&gt;
&lt;br /&gt; &lt;img src="http://geekswithblogs.net/sonam/aggbug/133640.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sonam</dc:creator>
            <guid>http://geekswithblogs.net/sonam/archive/2009/07/21/what-happened-to-my-vacations.aspx</guid>
            <pubDate>Wed, 22 Jul 2009 05:20:28 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/sonam/comments/133640.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/sonam/archive/2009/07/21/what-happened-to-my-vacations.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/sonam/comments/commentRss/133640.aspx</wfw:commentRss>
        </item>
        <item>
            <title>I am gonna win this contest</title>
            <category>.Net</category>
            <category>WPF</category>
            <category>C#</category>
            <link>http://geekswithblogs.net/sonam/archive/2009/07/21/i-am-gonna-win-this-contest.aspx</link>
            <description>&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" class="Apple-style-span"&gt;&lt;span style="font-family: -webkit-monospace; font-size: 13px; white-space: pre-wrap;" class="Apple-style-span"&gt;Hii guys,&lt;br /&gt;
Just heard about this &lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://www.code7contest.com/"&gt;https://www.code7contest.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
If you have  a little experience with MS .Net and you are as empty as me,Have a look over it.&lt;br /&gt;
&lt;br /&gt;
The prizes are awesome and mouth watering .You will have to grasp a little about the windows 7 techonolgies though .But you can do that for atleast 17777$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I am getting ready with a killer app idea..yes it  is a a killer idea,Either it will Kill MS or my Laptop.lol!(Sorry bill,its a metaphor,don't take it serious.)&lt;br /&gt;
&lt;br /&gt;
And the best thing is that ,My Last 2-3 months of WPF experience is what gonna be tested.&lt;br /&gt;
The deadline is short but thats good for me ,I am entering with an optimistic mind,Hope to see you guys at LA soon..&lt;br /&gt;
&lt;br /&gt;
cheer with a beer.(I don't drink though)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;img src="http://geekswithblogs.net/sonam/aggbug/133616.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sonam</dc:creator>
            <guid>http://geekswithblogs.net/sonam/archive/2009/07/21/i-am-gonna-win-this-contest.aspx</guid>
            <pubDate>Tue, 21 Jul 2009 19:57:10 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/sonam/comments/133616.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/sonam/archive/2009/07/21/i-am-gonna-win-this-contest.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/sonam/comments/commentRss/133616.aspx</wfw:commentRss>
        </item>
        <item>
            <title>New Open Source Project-Bluz(Next Generation Media Player)</title>
            <category>.Net</category>
            <category>Internship</category>
            <category>Fun</category>
            <category>C#</category>
            <link>http://geekswithblogs.net/sonam/archive/2009/07/15/new-open-source-project-bluznext-generation-media-player.aspx</link>
            <description>&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" class="Apple-style-span"&gt;&lt;span style="border-collapse: collapse; font-family: verdana; font-size: 11px; white-space: pre-wrap;" class="Apple-style-span"&gt;hi guys.&lt;br /&gt;
&lt;br /&gt;
I  have just released a pre beta release of next generation media player bluz.&lt;br /&gt;
&lt;br /&gt;
Link is here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://code.google.com/p/bluz/"&gt;&lt;br /&gt;
&lt;/a&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" class="Apple-style-span"&gt;&lt;span style="border-collapse: collapse; font-family: verdana; font-size: 11px; white-space: pre-wrap;" class="Apple-style-span"&gt;&lt;a href="http://code.google.com/p/bluz/"&gt;http://code.google.com/p/bluz/&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" class="Apple-style-span"&gt;&lt;span style="border-collapse: collapse; font-family: verdana; font-size: 11px; white-space: pre-wrap;" class="Apple-style-span"&gt;Its based on vlc libraries and bass and a couple of others for various tasks.&lt;br /&gt;
Its in c#,WPF but if any of you would like to contribute through any means.&lt;br /&gt;
The UI is purely in XAML,I am not a good designer,Even all icons are made in XAML.&lt;br /&gt;
.&lt;br /&gt;
If any of you would like to contribute through coding various modules or helping me develop the website,it would be nice of you to make it a hit on windows OS.&lt;br /&gt;
&lt;br /&gt;
Atleast,U guys can check out and report any bugs you find to me directly..&lt;br /&gt;
&lt;br /&gt;
It requires .Net 3.5&lt;br /&gt;
Have a nice day.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Screenshots:&lt;br /&gt;
&lt;br /&gt;
&lt;img alt="" src="http://handsonwpf.files.wordpress.com/2009/07/mjlook.jpg?w=450&amp;amp;h=281" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img alt="" src="http://handsonwpf.files.wordpress.com/2009/07/2009-07-07_0259.png?w=450&amp;amp;h=270" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;img src="http://geekswithblogs.net/sonam/aggbug/133506.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sonam</dc:creator>
            <guid>http://geekswithblogs.net/sonam/archive/2009/07/15/new-open-source-project-bluznext-generation-media-player.aspx</guid>
            <pubDate>Wed, 15 Jul 2009 20:49:56 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/sonam/comments/133506.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/sonam/archive/2009/07/15/new-open-source-project-bluznext-generation-media-player.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/sonam/comments/commentRss/133506.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Extracting Album art  from An Audio File</title>
            <category>.Net</category>
            <category>WPF</category>
            <category>C#</category>
            <link>http://geekswithblogs.net/sonam/archive/2009/06/11/extracting-album-from-an-audio-file.aspx</link>
            <description>I have moved the tagging features for my media player application from MediaInfo to taglib-sharp.&lt;br /&gt;
because taglib-sharp provides writing of tags back to audio files too..&lt;br /&gt;
As a matter of fact,&lt;br /&gt;
Everything else was fine but,it took me whole half day to figure out how to display an image (album art) from taglib-sharp.&lt;br /&gt;
&lt;br /&gt;
I thought to finally post this workaround.&lt;br /&gt;
&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;span style="color: rgb(51, 102, 255);"&gt;     TagLib.File file = TagLib.File.Create((FilePath); //FilePath is the audio file location&lt;/span&gt;&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;span style="color: rgb(51, 102, 255);"&gt;                 TagLib.IPicture pic=file.Tag.Pictures[0];  //pic contains data for image.&lt;/span&gt;&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;span style="color: rgb(51, 102, 255);"&gt;                 MemoryStream stream = new MemoryStream(pic.Data.Data);  /create an in memory stream&lt;/span&gt;&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;span style="color: rgb(51, 102, 255);"&gt;               Image im = new Image();&lt;/span&gt;&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;span style="color: rgb(51, 102, 255);"&gt;               BitmapFrame bmp = BitmapFrame.Create(stream);&lt;/span&gt;&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;span style="color: rgb(51, 102, 255);"&gt;               im.Source = bmp;&lt;/span&gt;&lt;br style="color: rgb(51, 102, 255);" /&gt;
&lt;span style="color: rgb(51, 102, 255);"&gt; &lt;/span&gt;now u can use this image as a normal image..:)..i.e transformation,animation should be possible as usual.&lt;br /&gt;
&lt;br /&gt;
cheers, i didn't  got any  post on web till now even after searching Novell's Repositories..Hopefully it helps to somebody out there .&lt;br /&gt;
&lt;br /&gt;
            &lt;br /&gt;
  &lt;img src="http://geekswithblogs.net/sonam/aggbug/132745.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sonam</dc:creator>
            <guid>http://geekswithblogs.net/sonam/archive/2009/06/11/extracting-album-from-an-audio-file.aspx</guid>
            <pubDate>Thu, 11 Jun 2009 15:27:41 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/sonam/comments/132745.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/sonam/archive/2009/06/11/extracting-album-from-an-audio-file.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/sonam/comments/commentRss/132745.aspx</wfw:commentRss>
        </item>
        <item>
            <title>I got task for summers:Study p2p architectures</title>
            <category>.Net</category>
            <category>Fun</category>
            <category>C#</category>
            <category>p2p</category>
            <link>http://geekswithblogs.net/sonam/archive/2009/05/03/i-got-task-for-summersstudy-p2p-architectures.aspx</link>
            <description>This is in continuation to my last post in which i was confused of "what  to do in summers".&lt;br /&gt;
After a lot of thinking,I have got the answer.&lt;br /&gt;
I'll study/research on &lt;span style="color: rgb(255, 0, 0);"&gt;"p2p architectures and there use in enterprises"...&lt;/span&gt;Lets see how it goes,i have semester exams next week and i have downloaded a lot of  books/technical papers to get started. ..&lt;br /&gt;
&lt;br /&gt;
p2p will help me distinguish my music player from others in the market...&lt;br /&gt;
&lt;br /&gt;
I'll also look at using the p2p library &lt;span style="color: rgb(0, 0, 255);"&gt;"Brunet" &lt;/span&gt;which is not much publicized as gnutella ...You can see the work here:.&lt;br /&gt;
.&lt;br /&gt;
&lt;a href="http://github.com/johnynek/brunet/tree/master"&gt;http://github.com/johnynek/brunet/tree/master&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Its a work by Sir ,Oscar  BoyKin at UCLA(University of California)..For a weath of softwares and knowledge/he blogs at:&lt;br /&gt;
&lt;a href="http://boykin.acis.ufl.edu/"&gt;http://boykin.acis.ufl.edu/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I'll make my player a true web 2.0 social app..doing some homework in p2p architectures will be good for my summers...&lt;br /&gt;
&lt;br /&gt;
And I'll keep posting tuts/links or any cool things that i'll encounter in my p2p research.I am really excited for it.&lt;br /&gt;
&lt;br /&gt;
Have a happy coding. &lt;img src="http://geekswithblogs.net/sonam/aggbug/131688.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sonam</dc:creator>
            <guid>http://geekswithblogs.net/sonam/archive/2009/05/03/i-got-task-for-summersstudy-p2p-architectures.aspx</guid>
            <pubDate>Sun, 03 May 2009 12:14:44 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/sonam/comments/131688.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/sonam/archive/2009/05/03/i-got-task-for-summersstudy-p2p-architectures.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/sonam/comments/commentRss/131688.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>
