<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-12836410</id><updated>2011-11-28T05:33:37.037+05:30</updated><category term='C#'/><category term='Crystal Reports'/><category term='Visual Studio'/><category term='Games'/><category term='General'/><category term='Design Patterns'/><category term='ASP.NET'/><category term='SQL Server'/><title type='text'>interface IAsela</title><subtitle type='html'>Think Geek</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-12836410.post-3311310789934484793</id><published>2008-12-07T16:17:00.000+05:30</published><updated>2008-12-07T16:19:14.375+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>My Favorite Project</title><content type='html'>I have been working mostly as a software developer for the last 10 years. But my favorite project which I got involved during my carrier is NOT a software project. Of course it had coding involved with it, but it was a digital profile.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Year &lt;/span&gt;– 2006 / 2007&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Client &lt;/span&gt;– ODEL (through Leo Burnett)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Project &lt;/span&gt;–  ODEL wanted to have a virtual tour of their departmental store to be created and stored in a mini CD. They wanted to give that mini CD’s to participants of an international fashion show. As ODEL’s advertising agency, Leo Burnett approached us to design and develop the digital profile.  What made this project much more interesting is we had only 5 days to complete this project; So we worked almost 24/7 for 5 days.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Technology &lt;/span&gt;– Profile was totally done using macromedia Flash.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Project Team&lt;/span&gt;&lt;br /&gt;Duminda Perera – Art Director&lt;br /&gt;Asela  – Software Architect, ActionScript Coding (Main Auto Navigation)&lt;br /&gt;Chathuranga Neminda –UI Design&lt;br /&gt;Anjana Wijerathne – ActionScript Coding (Manual Navigation)&lt;br /&gt;Chaminda Prasad – ActionScript Coding (Music Player)&lt;br /&gt;And also Marsh Dodanwala from Leo Burnett was the project coordinator and Ranil Gunawardene from HPH studios composed some awesome background music for the profile.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-3311310789934484793?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/3311310789934484793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=3311310789934484793&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/3311310789934484793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/3311310789934484793'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/12/my-favorite-project.html' title='My Favorite Project'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-7701513601724875803</id><published>2008-12-03T14:16:00.004+05:30</published><updated>2008-12-03T14:23:28.704+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>My First Web Application Project</title><content type='html'>I was really bored and wondering what happened to the people I used to work with in previous companies. Then I remembered the first ever web application project I was involved in. This is a tribute to all the wonderful / talented people I worked with, in that project.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Year &lt;/span&gt;– 2000 / 2001&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Client &lt;/span&gt;– HighQ (Israel / Singapore)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Project &lt;/span&gt;– HighQ wanted to develop a full pledged Learning Management System. As the first step the wanted to have a web based question management system which will generate question papers according to predefined criteria. When a student go through the test, web application will measure various things such as how much time spent on a question, the pattern of answering etc. After completion of a paper, web application used rule based logic to identify the “illnesses” of the student and provided ‘prescriptions” (which were flash based games) to overcome their illnesses.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Technology &lt;/span&gt;– Flash front end communicates with classic ASP via JavaScript.  Classic ASP invoke methods in the DLL stored in COM+ and after applying the business rules COM+ DLL access the PL SQL stored procedures resides within the Oracle 8i Database Server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Project Team&lt;/span&gt;&lt;br /&gt;Kolitha de Silva – Project Manager, Project Leader, Technical Consultant (Classic ASP)&lt;br /&gt;Chanura Rajakaruna – Software Architect&lt;br /&gt;Asela (yeah that’s me) – COM+ middle tire Development&lt;br /&gt;Janaka Shavantha – Component / User Controls Development&lt;br /&gt;Sandaruwan Disanayaka – Database Administrator (DB Management)&lt;br /&gt;Sandun Abeweera – Database Administrator (PL SQL)&lt;br /&gt;Manjuma Salgadu – Classic ASP (Reporting)&lt;br /&gt;Suwath – Classic ASP (Communication)&lt;br /&gt;Roshan Vijaya Pradeep – Classic ASP&lt;br /&gt;Gayan Dias – Classic ASP&lt;br /&gt;Duminda Perera – Graphic / UI Design&lt;br /&gt;Mahesh Thilakshana – ActionScript / Lingo&lt;br /&gt;Nilam Zawath – Flash UI / Animations&lt;br /&gt;Aslam Ameen – HTML&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-7701513601724875803?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/7701513601724875803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=7701513601724875803&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/7701513601724875803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/7701513601724875803'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/12/my-first-web-application-project.html' title='My First Web Application Project'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-8419170251410269775</id><published>2008-11-28T07:22:00.003+05:30</published><updated>2008-11-28T07:25:49.020+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>Got ripped off by a scam - iqquizapp.com</title><content type='html'>Unfortunately I couldn’t post anything for months because I was very busy with work related assignments (2 project releases).  Now I am in Sydney for one month assignment. This post is not to boast about how good (or bad) Sydney is.&lt;br /&gt;&lt;br /&gt;I got ripped off by a website. Believe it or not, I am not the average web user who falls in to these kinds of traps. Anyway here goes the story.&lt;br /&gt;&lt;br /&gt;While I was surfing through Facebook, it recommended me to take a quiz called “How Australian are you?”  Just for fun I went through that quiz.  I accidently pushed Next button under the questioner which was actually a button related to an advert on the page, and it opened up an IQ quiz (outside of Facebook).&lt;br /&gt;&lt;br /&gt;Being curious, I completed that IQ quiz which was walk in the park (that was bit strange, because IQ quiz are supposed to be hard).  The URL was http://www.iqquizapp.com/au-1/ (and later I found that they have au-1 to au-5 questioners).&lt;br /&gt;&lt;br /&gt;After completion of the quiz, it prompted me for phone number as a verification.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_NdP1RfQGiSw/SS9PK3l7TZI/AAAAAAAAAGk/yBIW1SROUcM/s1600-h/PhoneNo.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 315px;" src="http://4.bp.blogspot.com/_NdP1RfQGiSw/SS9PK3l7TZI/AAAAAAAAAGk/yBIW1SROUcM/s400/PhoneNo.JPG" alt="" id="BLOGGER_PHOTO_ID_5273520736814452114" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I entered my aussie phone number and got a pin code via SMS.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_NdP1RfQGiSw/SS9PYpfvFfI/AAAAAAAAAGs/SgG07XfTaYM/s1600-h/PhoneNo2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 317px;" src="http://3.bp.blogspot.com/_NdP1RfQGiSw/SS9PYpfvFfI/AAAAAAAAAGs/SgG07XfTaYM/s400/PhoneNo2.JPG" alt="" id="BLOGGER_PHOTO_ID_5273520973548557810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I entered that PIN on the web and got some crappy results. As soon as I ended the pin I got an SMS saying I have subscribed to their service and they sent 3 SMS’s weekly which causes AUD 6.6 per message. And right after that I got 3 messages in a raw which reduced my pre-paid phone balance by AUD 20.&lt;br /&gt;&lt;br /&gt;Later I managed to unsubscribe and then I went back to that page. When I scroll the page down it had their conditions in small letters saying about the $6.6 per message. Actually they had that on the top of the page as well. But when there’s a flash app on a page, the eye directly goes to the flash rather than other parts of the screen.&lt;br /&gt;&lt;br /&gt;Moral of the story - Never put your Phone Number in a website unless you are really sure about that website and the website creators intentions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-8419170251410269775?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/8419170251410269775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=8419170251410269775&amp;isPopup=true' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/8419170251410269775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/8419170251410269775'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/11/got-ripped-off-by-scam-iqquizappcom.html' title='Got ripped off by a scam - iqquizapp.com'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_NdP1RfQGiSw/SS9PK3l7TZI/AAAAAAAAAGk/yBIW1SROUcM/s72-c/PhoneNo.JPG' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-7158805354229634564</id><published>2008-10-30T16:49:00.003+05:30</published><updated>2008-10-30T17:40:30.482+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Identity vs uniqueidentifier</title><content type='html'>If you are a developer working with SQL server, you have used Identity columns more than once. With SQL 7 Microsoft introduced a new data type called “uniqueidentifier”. From a top level the usage of both are the same.&lt;br /&gt;&lt;br /&gt;But there are differences as well…&lt;br /&gt;&lt;br /&gt;Identity column contains numbers where uniqueidentifier contains a GUID.&lt;br /&gt;&lt;br /&gt;If you use an identity column, when ever there is a new row added to a table which has an identity column, SQL server will assign the next identity number on the sequence (this will depend on the identity seed settings). You can easily retrieve this by using @@identity.&lt;br /&gt;&lt;br /&gt;If you have a uniqueidentifier column in your table, system won’t automatically create a value to that column. You have to use “NEWID()” SQL function to create a new GUID and then assign it to the column which is uniqueidentifier type.&lt;br /&gt;&lt;br /&gt;uniqueidentifier type is good since GUID’s are unique in space and time. So even if you merge two tables with uniqueidentifier columns, there won’t be any duplicate uniqueidentifier’s. But only constrain with uniqueidentifier is the size (16 bit).&lt;br /&gt;&lt;!-- Begin BlogToplist tracker code --&gt;&lt;br /&gt;&lt;a href="http://www.blogtoplist.com/software/" title="Software"&gt;&lt;img src="http://www.blogtoplist.com/tracker.php?u=63893" alt="Software" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-7158805354229634564?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/7158805354229634564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=7158805354229634564&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/7158805354229634564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/7158805354229634564'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/10/identity-vs-uniqueidentifier.html' title='Identity vs uniqueidentifier'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-1560791190040142550</id><published>2008-10-22T13:31:00.000+05:30</published><updated>2008-10-22T13:32:53.141+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# Random Numbers</title><content type='html'>&lt;span style="font-family: trebuchet ms;"&gt;C# random numbers are not random. According to Professor Charles Apps (or anyone who knows a little bit of maths) random numbers also has a pattern since it's developed using an algorithm. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;Traditional way...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Random r = new Random();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;string randomFlag = r.Next(0, 999999999).ToString("000000000");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;Next time when you want to generate a random number try this code instead of the traditional way ...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;public static int GetRandomNumber(int maxvalue)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            System.Security.Cryptography.RandomNumberGenerator random =&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                System.Security.Cryptography.RandomNumberGenerator.Create();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            byte[] r = new byte[1];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            random.GetBytes(r);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            double val = (double)r[0] / byte.MaxValue;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            int i = (int)Math.Round(val * maxvalue, 0);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            return i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        }&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-1560791190040142550?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/1560791190040142550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=1560791190040142550&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/1560791190040142550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/1560791190040142550'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/10/c-random-numbers.html' title='C# Random Numbers'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-2534440902040872148</id><published>2008-09-30T10:15:00.000+05:30</published><updated>2008-09-30T10:17:01.335+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>LUVNAME.COM is it a virus?</title><content type='html'>Facebook has become the largest social networking website. When a site gets popular there are more people who’ll be trying to misuse it as well.&lt;br /&gt;&lt;br /&gt;I have seen a message on my Facebook wall saying "FIND OUT WHO YOUR LOVE IS!! VISIT:  LUVNAME .COM (remove spaces) HURRY BEFORE IT'S TOO LATE!"&lt;br /&gt;&lt;br /&gt;I just ignored this message. But when the same message appeared on my wall several times on my wall (posted by different friends) I was bit concerned about this.&lt;br /&gt;&lt;br /&gt;I did some digging and found that this is some sort of an automated script which post these messages without the user knowing.&lt;br /&gt;&lt;br /&gt;There are several possibilities, how an automated script can achieve this task….&lt;br /&gt;&lt;br /&gt;1. Somehow they have found your Facebook password using a phishing site (this is the most likely scenario)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution &lt;/span&gt;– Login to your Facebook account and change your password. Make sure not to put your Facebook password in any sites other than Facebook&lt;br /&gt;&lt;br /&gt;2. You have downloaded a malicious script (virus, worm, Trojan, spy wear ) so it has recorded your password and sent back to the creator&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution &lt;/span&gt;– Run a full virus scan and a spy wear scan on your computer and remove all the malicious files.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-2534440902040872148?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/2534440902040872148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=2534440902040872148&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/2534440902040872148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/2534440902040872148'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/09/luvnamecom-is-it-virus.html' title='LUVNAME.COM is it a virus?'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-4227853247796872096</id><published>2008-09-18T17:00:00.003+05:30</published><updated>2008-09-18T17:05:14.755+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>TransactionScope Timeout</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;If you are using TransactionScope to handle transactions within your .NET code, you might find a scenario where your transactions get Timeout.  The default value is 1 minute. If you want to change the transaction timeout, you can change it in either Web.Config or App.Config file.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_NdP1RfQGiSw/SNI8mAewVKI/AAAAAAAAAGE/zcpj5qTNagY/s1600-h/Config.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_NdP1RfQGiSw/SNI8mAewVKI/AAAAAAAAAGE/zcpj5qTNagY/s400/Config.JPG" alt="" id="BLOGGER_PHOTO_ID_5247323139501741218" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The above code should be used within the Configuration section.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-4227853247796872096?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/4227853247796872096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=4227853247796872096&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/4227853247796872096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/4227853247796872096'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/09/transactionscope-timeout.html' title='TransactionScope Timeout'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_NdP1RfQGiSw/SNI8mAewVKI/AAAAAAAAAGE/zcpj5qTNagY/s72-c/Config.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-776925676521439192</id><published>2008-09-09T18:06:00.003+05:30</published><updated>2008-09-09T18:15:24.467+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>ViewState persists with ViewState disabled</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;One of my developer friends who recently moved from Win Application development to web application development wanted to know what ViewState and the benefits of using ViewState.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;I tried a simple example using a textbox , button and when user typed something and press the button it was persisted (default – viewState is enabled). I tried the same thing with ViewState disabled for the textbox and still got the same results.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;When I was doing some digging I found that the example which I used doesn’t use ViewState at all. Following example explains how the persistence of data has been done during postback.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;“One nice thing about ASP.NET is that the Web controls in a Web Form remember their values across postback. That is, if you have a TextBox Web control on a page and the user enters some value into the TextBox and posts back the page, the TextBox's Text property is automatically updated to the user's entered value. This happens because the TextBox Web control implements the IPostBackDataHandler interface, and the Page class hands off the appropriate value to the TextBox class, which then updates its Text property.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;To concretize things, imagine that we have an ASP.NET Web page with a TextBox whose ID property is set to txtName. When the page is first visited, the following HTML will be rendered for the TextBox. When the user enters a value into this TextBox (such as, "Hello, World!") and submits the form, the browser will make a request to the same ASP.NET Web page, passing the form field values back in the HTTP POST headers. These include the hidden form field values (such as __VIEWSTATE), along with the value from the txtName TextBox.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;When the ASP.NET Web page is posted back in the load postback data stage, the Page class sees that one of the posted back form fields corresponds to the IPostBackDataHandler interface. There is such a control in the hierarchy, so the TextBox's LoadPostData() method is invoked, passing in the value the user entered into the TextBox ("Hello, World!"). The TextBox's LoadPostData() method simply assigns this passed in value to its Text property.” - Source : MSDN&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;It’s a good example to try to understand things as much as you can rather than using it for granted.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-776925676521439192?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/776925676521439192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=776925676521439192&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/776925676521439192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/776925676521439192'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/09/viewstate-persists-with-viewstate.html' title='ViewState persists with ViewState disabled'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-8894370751173865143</id><published>2008-09-02T15:41:00.004+05:30</published><updated>2008-09-02T15:50:47.398+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Crystal Reports'/><title type='text'>Why drill down option is disabled in Crystal Reports</title><content type='html'>If you have tried to create a drill down report using Crystal reports, you may end up with the following screen. Unfortunately, you can’t find a single article on web how to fix this little problem.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_NdP1RfQGiSw/SL0R0m95HbI/AAAAAAAAAFU/0TVltDvlEJ4/s1600-h/Blog1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_NdP1RfQGiSw/SL0R0m95HbI/AAAAAAAAAFU/0TVltDvlEJ4/s400/Blog1.JPG" alt="" id="BLOGGER_PHOTO_ID_5241365136840138162" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;( Group Tab Disabled )&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_NdP1RfQGiSw/SL0S4msdsVI/AAAAAAAAAFc/ZOqxwZjFglA/s1600-h/Blog2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_NdP1RfQGiSw/SL0S4msdsVI/AAAAAAAAAFc/ZOqxwZjFglA/s400/Blog2.JPG" alt="" id="BLOGGER_PHOTO_ID_5241366304998142290" border="0" /&gt;&lt;/a&gt;( Report part drill down option disabled )&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The concept behind drill down is to summarize the data on the top and then drill down to the details. So when you are setting up your data connection, if you have setup summery field(s) the appropriate menu(s) and sections(s) will automatically get enabled.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-8894370751173865143?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/8894370751173865143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=8894370751173865143&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/8894370751173865143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/8894370751173865143'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/09/why-drill-down-option-is-disabled-in.html' title='Why drill down option is disabled in Crystal Reports'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_NdP1RfQGiSw/SL0R0m95HbI/AAAAAAAAAFU/0TVltDvlEJ4/s72-c/Blog1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-6302727012074758527</id><published>2008-09-02T11:03:00.004+05:30</published><updated>2008-09-09T18:20:09.804+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>Google Chrome - New Browser from Google</title><content type='html'>I do not usually post news items. But this is BIG. Google is going to launch their own Browser called Google Chrome.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_NdP1RfQGiSw/SL0k-qgeVOI/AAAAAAAAAFk/6KXZw2ob2g0/s1600-h/google-chrome-screenshot.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_NdP1RfQGiSw/SL0k-qgeVOI/AAAAAAAAAFk/6KXZw2ob2g0/s400/google-chrome-screenshot.jpg" alt="" id="BLOGGER_PHOTO_ID_5241386200310109410" border="0" /&gt;&lt;/a&gt;&lt;a href="http://news.bbc.co.uk/2/hi/technology/7593106.stm"&gt;BBC&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://googleblog.blogspot.com/2008/09/fresh-take-on-browser.html"&gt;Google Blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://books.google.com/books?id=8UsqHohwwVYC&amp;amp;printsec=frontcover#PPA2,M1"&gt;Google Books&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogoscoped.com/archive/2008-09-01-n47.html"&gt;More Info&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-6302727012074758527?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/6302727012074758527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=6302727012074758527&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/6302727012074758527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/6302727012074758527'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/09/google-chrome-new-browser-from-google.html' title='Google Chrome - New Browser from Google'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_NdP1RfQGiSw/SL0k-qgeVOI/AAAAAAAAAFk/6KXZw2ob2g0/s72-c/google-chrome-screenshot.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-7656415547263341176</id><published>2008-08-22T16:17:00.002+05:30</published><updated>2008-08-22T17:14:31.557+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>More on Strategy Pattern</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;I am not sure whether my &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://aselai.blogspot.com/2008/07/strategy-design-pattern-with-c.html"&gt;previous blog pos&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;t about Strategy Pattern had good practical examples. Since I am currently working on a module where I had to use Strategy pattern, I thought of explain more on that topic.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;My current work involves invoicing module. Unfortunately I am not at liberty to explain the whole scenario. Let’s assume that there are several invoice types which uses different calculations and logics to calculate invoices.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;For the example let’s use two simple invoice types. Fixed Invoice type has a fixed value for every month and RateBased Invoice type value always changes according to the services provided.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;InvoiceJob object is the triggering point of all the invoices and Invoice Job has the type of Invoice as well.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Let’s start with the interface definition for the algorithm objects.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public abstract class JobType&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public abstract void Run(int JobId);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;And then lets create the algorithm Objects.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public class FixedInvoice:JobType&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public override void Run(int JobId)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            //TO DO - Implement Process&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public class RateBasedInvoice:JobType&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public override void Run(int JobId)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            //&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;TO DO - Implement Process&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Now Let’s create an Invoice job Object which holds an Invoice job and which will also have a property to set which JobType Algorithm needs to be used.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public class InvoiceJob&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        private JobType jobType;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public void SetJobType(JobType newJobType)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            this.jobType = newJobType;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public void Run(int JobId)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            jobType.Run(JobId);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Now let’s have a look at how to consume this InvoiceJob class with different Algorithm objects…&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public class InvoiceProcess&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public void ProcessInvoices()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            // TO DO - Get All Invoice Jobs in to Data Table “InvoiceJobs” &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            foreach (DataRow dataRow in InvoiceJobs.Rows)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                //Get the Job Id to the Variable “InvoiceJobId”&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            // TO DO - Get the Invoice type in to “InvoiceTypeId”&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                InvoiceJob invoiceJob = new InvoiceJob();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                switch (InvoiceTypeId)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                    case 1:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                //Type 1 means Fixed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                        invoiceJob.SetJobType(new FixedInvoice());&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                        break;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                    case 2:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                //Type 2 means Ratebased&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                        invoiceJob.SetJobType(new RateBasedInvoice());&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                        break;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                invoiceJob.Run(InvoiceJobId);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-7656415547263341176?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/7656415547263341176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=7656415547263341176&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/7656415547263341176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/7656415547263341176'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/08/more-on-strategy-pattern.html' title='More on Strategy Pattern'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-8794153508945281657</id><published>2008-08-06T16:58:00.001+05:30</published><updated>2008-08-06T16:59:52.866+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>How to enable Enable "clr enabled" configuration option</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;If you are working with SQL server CLR objects there’s a higher possibility that you might encounter the following error.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;“Msg 6263, Level 16, State 1, Line 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Execution of user code in the .NET Framework is disabled. Enable "clr enabled" configuration option”&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;To overcome this, you have to reconfigure the SQL server to enable CLR objects. To do that, you can use the following commands…&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;exec sp_configure 'clr_enable','1'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;RECONFIGURE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Note : - CLR objects only works with SQL server 2005 and later versions.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms131052.aspx"&gt;CLR Objects tutorial&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-8794153508945281657?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/8794153508945281657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=8794153508945281657&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/8794153508945281657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/8794153508945281657'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/08/how-to-enable-enable-clr-enabled.html' title='How to enable Enable &quot;clr enabled&quot; configuration option'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-1150424964962193653</id><published>2008-08-05T17:23:00.003+05:30</published><updated>2008-08-05T17:28:41.429+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>More about MSN is-thatt-you.com and TST Management Inc</title><content type='html'>I had enough spare time today to do a detailed research on is-thatt-you.com website. But unfortunately other than my &lt;a href="http://aselai.blogspot.com/2008/08/suspicious-website-httpis-thatt-youcom.html"&gt;previous post &lt;/a&gt;related to is-thatt-you.com there’s nothing much available in the web. But I found that Is-thatt-you.com has few other domain names as well.&lt;br /&gt;&lt;br /&gt;datsyou.com&lt;br /&gt;thatzyou.com&lt;br /&gt;is-thatt-you.com&lt;br /&gt;is-dat-u.com.&lt;br /&gt;&lt;br /&gt;All those are phishing sites (“in computing, phishing is the criminally fraudulent process of attempting to acquire sensitive information such as usernames, passwords and credit card details, by masquerading as a trustworthy entity in an electronic communication.” - Wikipedia) which beg you to give your username and password to them. Fortunately Firefox 3 recognizes most of those as phishing sites.&lt;br /&gt;&lt;br /&gt;A search on TST management Inc which claims who own the copyright of is-thatt-you.com reveal that so called TST management have done these sorts of scams before with MySpace as well.&lt;br /&gt;&lt;br /&gt;So no matter whether you are a newbie or an elite user, next time when you are using your personal usernames and passwords make sure to check whether that is a legit site or a phishing site. Phishing filter will do 50% of the work, and the rest 50% is up to you.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Useful links&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://forums.facepunchstudios.com/showthread.php?t=509005"&gt;MySpace Scam details&lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Phishing"&gt;More about Phishing&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-1150424964962193653?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/1150424964962193653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=1150424964962193653&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/1150424964962193653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/1150424964962193653'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/08/more-about-is-thatt-youcom-and-tst.html' title='More about MSN is-thatt-you.com and TST Management Inc'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-3216236201264187079</id><published>2008-08-04T16:57:00.008+05:30</published><updated>2008-08-05T16:57:20.771+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>Suspicious website - http://is-thatt-you.com/</title><content type='html'>Today I got an offline message from one of my friends through MSN. It was a URL for a site called is-thatt-you.com. The URL was http://myusername.is-thatt-you.com&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_NdP1RfQGiSw/SJg5AQ30TjI/AAAAAAAAAFE/dD_G6vFfg-A/s1600-h/is-that-you-virus.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_NdP1RfQGiSw/SJg5AQ30TjI/AAAAAAAAAFE/dD_G6vFfg-A/s400/is-that-you-virus.jpg" alt="" id="BLOGGER_PHOTO_ID_5230993643882696242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;When I go to that web site, it prompted me for sign in using my Windows LIVE ID and password.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_NdP1RfQGiSw/SJboM8OX1sI/AAAAAAAAAE8/ODTt2obF7nM/s1600-h/is-that-you-SS.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_NdP1RfQGiSw/SJboM8OX1sI/AAAAAAAAAE8/ODTt2obF7nM/s400/is-that-you-SS.JPG" alt="" id="BLOGGER_PHOTO_ID_5230623326259893954" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I googled about is-thatt-you.com and it returned couple of results. All those said this domain looks suspicious, but none of those posts had any hardcore evidence. So I had a look at their terms and conditions of this so called is-thatt-you.com website.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;"By filling out this form, you authorize TST Management, Inc to spread the word about this 100% real and upcomming Messenger Community Site.&lt;br /&gt;You will receive your share of the credit in helping us spread the word.  This is a harmless Community site which is offering users a platform to meet each other for free&lt;br /&gt;&lt;br /&gt;We may temporarily access your MSN account to do a combination&lt;br /&gt;of the following:&lt;br /&gt;1.  Send Instant Messages to your friends promoting this site.&lt;br /&gt;2.  Introduce new entertaining sites to your friends via Instant Messages.&lt;br /&gt;&lt;br /&gt;You understand that this agreement shall prevail if there is any conflict between this&lt;br /&gt;agreement and the terms of use you accepted when you signed up with MSN. You also understand that by temporarily accessing your msn account, TST Management, Inc is NOT agreeing to MSN's terms of use and therefore not bound by them. "&lt;/blockquote&gt;&lt;br /&gt;WTF? Are we insane to give out our MSN account details to a frigging 3rd party and let them send instant messages to our friends using our own accounts?&lt;br /&gt;&lt;br /&gt;I am not sure either this is legal or ethical. But please be aware of these sort of sites.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-3216236201264187079?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/3216236201264187079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=3216236201264187079&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/3216236201264187079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/3216236201264187079'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/08/suspicious-website-httpis-thatt-youcom.html' title='Suspicious website - http://is-thatt-you.com/'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_NdP1RfQGiSw/SJg5AQ30TjI/AAAAAAAAAFE/dD_G6vFfg-A/s72-c/is-that-you-virus.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-249708244763602756</id><published>2008-08-01T11:26:00.002+05:30</published><updated>2008-08-01T11:33:12.692+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>Restore Active Desktop (Win XP) JavaScript Error</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;Have you ever encountered Active Desktop Recovery screen while working with Win XP?&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_NdP1RfQGiSw/SJKmhju3wSI/AAAAAAAAAEs/Do-_RbGnJZo/s1600-h/active_desktop.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_NdP1RfQGiSw/SJKmhju3wSI/AAAAAAAAAEs/Do-_RbGnJZo/s400/active_desktop.gif" alt="" id="BLOGGER_PHOTO_ID_5229425212788293922" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;And the worst part is, sometimes when you try to restore, you get an ugly error saying there is a JavaScript error in "desktop.htt" file and you are stuck with Active Desktop recovery screen.&lt;/span&gt;  &lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Fix&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Run Regedit&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;Navigate to:&lt;/span&gt; &lt;span style="font-family:trebuchet ms;"&gt;HKCU\Software\Microsoft\Internet Explorer\Desktop\SafeMode\Components&lt;/span&gt; &lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;br /&gt;Change the DeskHTMLVersion key from 272 (Hex: 110) to 0 and reboot. The original desktop should now be back.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-249708244763602756?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/249708244763602756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=249708244763602756&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/249708244763602756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/249708244763602756'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/08/restore-active-desktop-javascript-error.html' title='Restore Active Desktop (Win XP) JavaScript Error'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_NdP1RfQGiSw/SJKmhju3wSI/AAAAAAAAAEs/Do-_RbGnJZo/s72-c/active_desktop.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-5345691879565861324</id><published>2008-07-30T15:06:00.002+05:30</published><updated>2008-07-30T17:46:49.709+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>ASP.NET ImageButton form submission problem on Enter key press</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;I am sure most of the developers have come across creating forms with multiple textboxes and corresponding buttons.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;And if a user press enter on any of the textboxes in the form, the default button (unless not specified, it will be the first rendered button which will be the default button) on click event triggers.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;But you can easily fix this by setting UseSubmitBehavior="false" on each and every button.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;But what if you are using an imagebutton(s) in the form as well? Unfortunately imagebutton doesn’t have UseSubmitBehavior property. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;One way of fixing this is use a normal ASPX button instead of an imagebutton and then set the image as background image for that particular button using CSS.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;protected void Page_Load(object sender, EventArgs e)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            btnMyButton.Attributes.Add("style", "position: relative; background:url(" + Request.ApplicationPath + "images/refresh.jpg) no-repeat; border:none 0px; width:25px; height:25px; vertical-align:top; cursor:pointer;"); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-5345691879565861324?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/5345691879565861324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=5345691879565861324&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/5345691879565861324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/5345691879565861324'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/07/aspnet-imagebutton-form-submission.html' title='ASP.NET ImageButton form submission problem on Enter key press'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-222047609159842968</id><published>2008-07-21T17:06:00.004+05:30</published><updated>2008-07-30T17:45:48.188+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Set ASP.NET session variables with JavaScript</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;Is there any possible method to directly set ASP.NET session variable with JavaScript? NO. You cannot directly set a session variable via JavaScript. But there is a work around. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;In the early days of classic ASP, we achieved this by using a hidden frame and use a server post back behind the scene.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;But with AJAX, we no longer need hidden frames. All you have to do is, create a new page which accepts the parameters you need to set and then call that page with necessary parameters.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;JavaScript&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  var url = "SetParams.aspx?ProjectCode= " + ProjectCode;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  req = new ActiveXObject("Microsoft.XMLHTTP");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  req.open("POST", url, true);                &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  req.send();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;SetParams.aspx&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;private void Page_Load(object sender, System.EventArgs e)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  if(Request.QueryString["ProjectCode"] != null)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;     Session["ProjectCode"] =Request.QueryString["ProjectCode"].ToString();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-222047609159842968?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/222047609159842968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=222047609159842968&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/222047609159842968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/222047609159842968'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/07/set-aspnet-session-variables-with.html' title='Set ASP.NET session variables with JavaScript'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-320509921104542206</id><published>2008-07-11T10:33:00.007+05:30</published><updated>2008-07-30T17:45:33.376+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Games'/><title type='text'>How to get Perfect Achievement in Bowling Buddies</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_NdP1RfQGiSw/SHbp5oxemDI/AAAAAAAAADw/lV_nyOtl85g/s1600-h/PerfectRound.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_NdP1RfQGiSw/SHbp5oxemDI/AAAAAAAAADw/lV_nyOtl85g/s320/PerfectRound.JPG" alt="" id="BLOGGER_PHOTO_ID_5221617994389428274" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;I am sure most of you have seen the following video, and probably have tried it too.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;object width="425" height="349"&gt;&lt;param name="movie" value="http://www.youtube.com/v/r1_Vj8l7a9s&amp;amp;hl=en&amp;amp;fs=1&amp;amp;rel=0&amp;amp;border=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;embed src="http://www.youtube.com/v/r1_Vj8l7a9s&amp;amp;hl=en&amp;amp;fs=1&amp;amp;rel=0&amp;amp;border=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="349"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;br /&gt;When it comes to achieving a strike there are three obstacles.&lt;/span&gt; &lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;1.    Starting placement of the ball&lt;/span&gt; &lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;2.    If you move the mouse the ball will curve and take a different path&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;3.    keeping the ball on an average speed&lt;/span&gt;  &lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;br /&gt;You can overcome the 2nd problem by reducing the size of the screen. To overcome the 3rd you have to use the mouse wheel to shoot the ball.&lt;/span&gt;  &lt;span style="font-family:trebuchet ms;"&gt;First you have to find a starting position. &lt;/span&gt;   &lt;span style="font-family:trebuchet ms;"&gt;This initial position always works for me.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_NdP1RfQGiSw/SHbq6xg8yTI/AAAAAAAAAEA/0QKwH2BaGpA/s1600-h/BB.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_NdP1RfQGiSw/SHbq6xg8yTI/AAAAAAAAAEA/0QKwH2BaGpA/s400/BB.JPG" alt="" id="BLOGGER_PHOTO_ID_5221619113427519794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;Scroll your mouse wheel to the bottom of the page, then pick up the ball and line up for a strike (once you get a strike you'll know where) then hold the mouse steady in that position and simply scroll your mouse to the top of the page.. doing so will send the ball in a straight line down the alley every time from exactly where you line it up..once u get the hang of it u can constantly score perfect games all the time!&lt;br /&gt;&lt;br /&gt;Good luck and good bowling:&lt;/span&gt;  &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-320509921104542206?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/320509921104542206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=320509921104542206&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/320509921104542206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/320509921104542206'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/07/how-to-get-perfect-achievement-in.html' title='How to get Perfect Achievement in Bowling Buddies'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_NdP1RfQGiSw/SHbp5oxemDI/AAAAAAAAADw/lV_nyOtl85g/s72-c/PerfectRound.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-1578915739108391732</id><published>2008-07-10T12:21:00.006+05:30</published><updated>2008-07-30T17:45:09.509+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Active Directory Authentication with Custom UI</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;No matter whether you are working with a Win App or a web app, you can use the following class to authenticate a client using Active Directory and a custom User Interface.&lt;/span&gt;&lt;span style="font-weight: bold;font-family:trebuchet ms;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Class&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;using System.Text;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System.Collections;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System.DirectoryServices;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public class LdapAuthentication&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{  &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;private string _path;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;private string _filterAttribute;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public LdapAuthentication(string path)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      _path = path;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public bool IsAuthenticated(string domain, string username, string pwd)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;        string domainAndUsername = domain + @"\" + username;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;          DirectoryEntry entry = new DirectoryEntry( _path,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;          domainAndUsername, pwd);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;          try&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;          {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              // Bind to the native AdsObject to force authentication.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              object obj = entry.NativeObject;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              DirectorySearcher search = new DirectorySearcher(entry);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              search.Filter = "(SAMAccountName=" + username + ")";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              search.PropertiesToLoad.Add("cn");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              SearchResult result = search.FindOne();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              if (null == result)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                  return false;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              // Update the new path to the user in the directory&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              _path = result.Path;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              _filterAttribute = (string)result.Properties["cn"][0];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              return true;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;          }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;          catch (Exception ex)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;          {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              throw new Exception("Error authenticating user. " + ex.Message);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;          }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:trebuchet ms;" &gt;Usage of Class&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;string adPath = "LDAP://DOMAINNAME";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;LdapAuthentication adAuth = new LdapAuthentication(adPath);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;if(adAuth.IsAuthenticated(txtDomain.Text,txtUser.Text,txtPassword.Text))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      //This means the user has Authenticated&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-1578915739108391732?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/1578915739108391732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=1578915739108391732&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/1578915739108391732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/1578915739108391732'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/07/active-directory-authentication-with.html' title='Active Directory Authentication with Custom UI'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-5663868006816263030</id><published>2008-07-10T10:26:00.006+05:30</published><updated>2008-07-30T17:44:55.188+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><title type='text'>Strategy Design Pattern with C#</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;As developers we all know the pros and cons of using design patterns. So I am not going to discuss those in my post. When I started learning design patterns one of the problems I faced was, design patterns samples were mostly for ultra geeks who lives within the code. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;My objective here is to present Strategy design pattern with some real world cases where you can utilize it fully in your future coding endeavors.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Let’s imagine a case where you are supposed to build a simple payroll application, where there are three levels of employees (Worker, Executive and Manager). And also the company has three different methods (calculation logic) to calculate salary for these different types of employees.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;So without any patterns our class will be like &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;public abstract class Employee&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public virtual void CalculateSalary()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    public class Manager : Employee&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public override void CalculateSalary()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            //Manager Salary Calculation goes here&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            Console.WriteLine("Manager's Salary is X");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    public class Executive : Employee&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public override void CalculateSalary()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            //Executive Salary Calculation goes here&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            Console.WriteLine("Executive's Salary is Y");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;          &lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;With this we have to maintain separate codes for different version of the class. If the number of categories gets higher (which is the actual case in a real world scenario), code will be hard to maintain and for each and every deriving class you have to write your own code which is very tedious.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;To overcome this, we can use Strategy design pattern. With Strategy pattern we can replace the overriding codes by an algorithm object. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;With the usage of strategy pattern the code would be look like &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;public interface CalculateSalaryAlgorithm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        void CalculateSalary ();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    public class CalculateForManager : CalculateSalaryAlgorithm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public void CalculateSalary ()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            //Manager Salary Calculation goes here&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            Console.WriteLine("Manager's Salary is X");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    public class CalculateForExecutive: CalculateSalaryAlgorithm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public void CalculateSalary ()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            //Executive Salary Calculation goes here&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            Console.WriteLine("Executive's Salary is X");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    public abstract class Employee&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        private CalculateSalaryAlgorithm calculateSalaryAlgorithm;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public void SetAlgorithm(CalculateSalaryAlgorithm algorithm)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            calculateSalaryAlgorithm = algorithm;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public virtual void CalculateSalary ()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            calculateSalaryAlgorithm.CalculateSalary ();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    public class Manager : Employee&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public Manager()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            SetAlgorithm(new CalculateForManager());&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    public class Executive : Vehicle&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        public Executive()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            SetAlgorithm(new CalculateForExecutive());&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    class Program&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        static void Main(string[] args)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            Manager myManager = new Manager ();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            Executive myExecutive = new Executive ();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            myManager.CalculateSalary ();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            myManager.CalculateSalary ();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            Console.Read();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;  &lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;Happy coding!&lt;br /&gt;&lt;br /&gt;http://www.dofactory.com/Patterns/PatternStrategy.aspx&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-5663868006816263030?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/5663868006816263030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=5663868006816263030&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/5663868006816263030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/5663868006816263030'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/07/strategy-design-pattern-with-c.html' title='Strategy Design Pattern with C#'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12836410.post-8988023378715028150</id><published>2008-07-08T15:11:00.008+05:30</published><updated>2008-07-30T17:44:34.161+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Visual Studio 2008 IDE crashes with Mouse Wheel</title><content type='html'>While playing the &lt;a href="http://www.facebook.com/"&gt;Facebook &lt;/a&gt;game, &lt;a href="http://apps.facebook.com/bowlingbuddies/"&gt;Bowling Buddies&lt;/a&gt;, I reset the mouse scroll settings to one screen at a time.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_NdP1RfQGiSw/SHM4xmA8-DI/AAAAAAAAADY/RoURu5z2XXY/s1600-h/OneScreen.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp3.blogger.com/_NdP1RfQGiSw/SHM4xmA8-DI/AAAAAAAAADY/RoURu5z2XXY/s320/OneScreen.JPG" alt="" id="BLOGGER_PHOTO_ID_5220578817721825330" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And when I go back to Visual Studio and started to scroll through code view using the mouse Wheel, Visual Studio crashed. I tried several times, and the problem remained the same even after a reboot.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_NdP1RfQGiSw/SHM46_x8hoI/AAAAAAAAADg/p17Q9N8xL-Q/s1600-h/VSCrash.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_NdP1RfQGiSw/SHM46_x8hoI/AAAAAAAAADg/p17Q9N8xL-Q/s320/VSCrash.JPG" alt="" id="BLOGGER_PHOTO_ID_5220578979257026178" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then I &lt;a href="http://www.google.lk/search?hl=en&amp;amp;client=firefox-a&amp;amp;rls=org.mozilla:en-US:official&amp;amp;hs=zKU&amp;amp;sa=X&amp;amp;oi=spell&amp;amp;resnum=0&amp;amp;ct=result&amp;amp;cd=1&amp;amp;q=visual+studio+crashing+bug+if+mouse+one+screen+at+a+time&amp;amp;spell=1"&gt;googled&lt;/a&gt;, and found that it’s a known bug with Visual Studio IDE, that it doesn’t support One screen at a Time Scrolling. Now I reset the mouse wheel scroll settings to X number of lines at a time and Visual studio works perfectly.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_NdP1RfQGiSw/SHM5K-Nt0WI/AAAAAAAAADo/RDuXdWewZGM/s1600-h/XLines.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp1.blogger.com/_NdP1RfQGiSw/SHM5K-Nt0WI/AAAAAAAAADo/RDuXdWewZGM/s320/XLines.JPG" alt="" id="BLOGGER_PHOTO_ID_5220579253714538850" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12836410-8988023378715028150?l=aselai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aselai.blogspot.com/feeds/8988023378715028150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12836410&amp;postID=8988023378715028150&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/8988023378715028150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12836410/posts/default/8988023378715028150'/><link rel='alternate' type='text/html' href='http://aselai.blogspot.com/2008/07/visual-studio-2008-ide-crashes-with.html' title='Visual Studio 2008 IDE crashes with Mouse Wheel'/><author><name>KrAzY</name><uri>http://www.blogger.com/profile/17486055196070939349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://img296.imageshack.us/img296/3919/krazywo9.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_NdP1RfQGiSw/SHM4xmA8-DI/AAAAAAAAADY/RoURu5z2XXY/s72-c/OneScreen.JPG' height='72' width='72'/><thr:total>2</thr:total></entry></feed>
