<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CEYFSXY_eSp7ImA9WxBSFUU.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159</id><updated>2009-12-23T09:28:38.841-06:00</updated><title>Kenny Hsu's Blog</title><subtitle type="html">My .Net programming notes.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://kennyshu.blogspot.com/" /><link rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>80</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/KennyHsuBlog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry gd:etag="W/&quot;DEIEQXw_cSp7ImA9WxBSEUg.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-2632510319345406965</id><published>2009-12-11T14:31:00.005-06:00</published><updated>2009-12-18T11:15:00.249-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-18T11:15:00.249-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><title>[ASP.Net]Dynamically assign your page's background image</title><summary type="html">I would like to change/assign a page's background image depends on some conditions, and here is they way I do.1.Assign an id to the body and add the runat="server" to it.2.Add the following code to your code-behind (you can put it in the Page_Load event)if (ConfigurationManager.ConnectionStrings["MyWebsite"].ConnectionString.Contains("test"))    body1.Style.Add("background-image", @"url(Images/&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/NcTrOidFOG8" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/2632510319345406965/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=2632510319345406965" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/2632510319345406965?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/2632510319345406965?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/NcTrOidFOG8/aspnetdynamically-assign-your-pages.html" title="[ASP.Net]Dynamically assign your page's background image" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_rIYUnPohNkY/SyKvT-aK9QI/AAAAAAAAAzY/XcymM9xQ5lU/s72-c/body.JPG" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/12/aspnetdynamically-assign-your-pages.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0AGRX04eyp7ImA9WxBSFUU.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-5617893743023016656</id><published>2009-12-02T09:25:00.009-06:00</published><updated>2009-12-23T09:22:04.333-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-23T09:22:04.333-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>[C# 2.0] Get and Check Daylight Saving Time (DST)</title><summary type="html">Here is the way to get the DST:using System.Globalization;public static DataTable GenerateDST(int startYear, int endYear){    DataTable dt = new DataTable();    //get the current timezone    TimeZone oTimeZone = TimeZone.CurrentTimeZone;    DaylightTime oDST;    dt.Columns.Add("Year");    dt.Columns.Add("Start Date");    dt.Columns.Add("End Date");    for (int i = startYear; i &lt;= endYear; i++)&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/-H_pnmRiQWo" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/5617893743023016656/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=5617893743023016656" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/5617893743023016656?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/5617893743023016656?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/-H_pnmRiQWo/c-20-get-and-check-daylight-saving-time.html" title="[C# 2.0] Get and Check Daylight Saving Time (DST)" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_rIYUnPohNkY/SxaJUOFmaVI/AAAAAAAAAzA/vwYLdD75NH4/s72-c/DST.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/12/c-20-get-and-check-daylight-saving-time.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQHRH88cCp7ImA9WxNaF0U.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-706697209469910041</id><published>2009-11-09T09:54:00.005-06:00</published><updated>2009-12-02T13:32:15.178-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-02T13:32:15.178-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Winform" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><title>[C#]My simple version of Captcha</title><summary type="html">This is my own version of Captcha.  It's easy and simple.  You can improve it with your ideas or needs.using (Bitmap bmp = new Bitmap(90, 30)){    int x1 = 0;    int y1 = 0;    int x2 = 0;    int y2 = 0;    int x3 = 0;    int y3 = 0;    int intNoiseWidth = 25;    int intNoiseHeight = 15;    Random rdn = new Random();    Graphics g = Graphics.FromImage(bmp);    //set the font style    Font font = &lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/pJccZoCv8aA" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/706697209469910041/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=706697209469910041" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/706697209469910041?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/706697209469910041?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/pJccZoCv8aA/cmy-simple-version-of-captcha.html" title="[C#]My simple version of Captcha" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_rIYUnPohNkY/Svg7ZPNuuMI/AAAAAAAAAyw/bwU9D7hShnU/s72-c/Captcha.gif" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/11/cmy-simple-version-of-captcha.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEFSHk9eip7ImA9WxNUGE0.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-4045472788332767931</id><published>2009-11-05T11:31:00.004-06:00</published><updated>2009-11-09T15:03:39.762-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-09T15:03:39.762-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Winform" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>[C#][WinForm]Prevent same process to be executed more than once at the same time: a simple approach</title><summary type="html">This is a simple and easy way to do it if your requirement is simple.  Otherwise you should use Mutex.using System.Diagnostics;private void Form1_Load(object sender, EventArgs e){    try    {        string strModuleName = Process.GetCurrentProcess().MainModule.ModuleName;        string strProcessName = Path.GetFileNameWithoutExtension(strModuleName);        Process[] aryProcess = &lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/m8UvMzMJ1jc" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/4045472788332767931/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=4045472788332767931" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/4045472788332767931?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/4045472788332767931?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/m8UvMzMJ1jc/cwinformprevent-same-process-to-be.html" title="[C#][WinForm]Prevent same process to be executed more than once at the same time: a simple approach" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/11/cwinformprevent-same-process-to-be.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEMRXk4cSp7ImA9WxNUFEk.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-8176263973166942127</id><published>2009-10-19T22:46:00.004-05:00</published><updated>2009-11-05T11:38:04.739-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-05T11:38:04.739-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>[C#]Simple windows registry manipulation</title><summary type="html">using Microsoft.Win32;//Attempt to open the key.RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Play\WindowPosition");//The key doesn't exist if it returns null.if (key == null){    //Create &amp; open it.    key = Registry.CurrentUser.CreateSubKey(@"Software\Play\WindowPos");    key.SetValue("PositionX", Location.X);    key.SetValue("PositionY", Location.Y);}else{    //Get value    &lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/TNmKZfE1ePA" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/8176263973166942127/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=8176263973166942127" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/8176263973166942127?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/8176263973166942127?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/TNmKZfE1ePA/cmanipulate-windows-registry.html" title="[C#]Simple windows registry manipulation" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/10/cmanipulate-windows-registry.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcBRHo5fSp7ImA9WxNWGU0.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-2834070123364967142</id><published>2009-10-18T16:27:00.006-05:00</published><updated>2009-10-18T16:57:35.425-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-18T16:57:35.425-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Freeware" /><title>GetWords</title><summary type="html">Name: GetWordsVersion: 1.3Platform: Windows with .Net Framework 2.0 installedIntroduction:Fetch words from the given article. It will fetch, sort, remove duplicated words.  It will ignore the word that less than 3 characters like am, is, as... etc.How to use:1.Paste anything you want to parse on the left-hand side textbox.2.Click the "Get Words!" button, and the result will show on the right-hand&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/xh_36A6MpZI" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/2834070123364967142/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=2834070123364967142" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/2834070123364967142?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/2834070123364967142?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/xh_36A6MpZI/getwords.html" title="GetWords" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_rIYUnPohNkY/SszEuPciIPI/AAAAAAAAAx8/6qPD-5pCceY/s72-c/GetWords.JPG" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/10/getwords.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMFRXY4eSp7ImA9WxNaF0U.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-2837120301361133872</id><published>2009-10-07T09:27:00.007-05:00</published><updated>2009-12-02T13:33:34.831-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-02T13:33:34.831-06:00</app:edited><title>KB: You must call the Bind method before performing this operation.</title><summary type="html">I got this error message: "You must call the Bind method before performing this operation." when using the UDP protocol to communicate with another application.  Here is the simplified code.......IPAddress serverIP = IPAddress.Parse("xx.xx.xx.xx");IPEndPoint serverEP = new IPEndPoint(serverIP, 12345);UdpClient client = new UdpClient();//start listeningclient.BeginReceive(new AsyncCallback(&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/LaAKn-p8lEs" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/2837120301361133872/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=2837120301361133872" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/2837120301361133872?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/2837120301361133872?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/LaAKn-p8lEs/kb-you-must-call-bind-method-before.html" title="KB: You must call the Bind method before performing this operation." /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/10/kb-you-must-call-bind-method-before.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8FRn8yfCp7ImA9WxNXGEg.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-8854516097376508518</id><published>2009-10-06T14:32:00.002-05:00</published><updated>2009-10-06T14:36:57.194-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-06T14:36:57.194-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Winform" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>[C#][Winform]Show Confirm window</title><summary type="html">In ASP.Net you can popup a confirm window easily.  See this and this.  How to do the same thing in windows form?  Here is the easiliest way I know:if (MessageBox.Show("Are you sure you want to delete it?","Confirm", MessageBoxButtons.YesNo) == DialogResult.Yes){    //......}&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/zWdE761oYoI" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/8854516097376508518/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=8854516097376508518" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/8854516097376508518?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/8854516097376508518?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/zWdE761oYoI/cwinformshow-confirm-window.html" title="[C#][Winform]Show Confirm window" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/10/cwinformshow-confirm-window.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMBRn48fyp7ImA9WxNQEkU.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-466353059725700018</id><published>2009-09-16T14:02:00.010-05:00</published><updated>2009-09-18T10:24:17.077-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-18T10:24:17.077-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Freeware" /><title>I Am Busy! 1.0</title><summary type="html">Name: I Am Busy!Version: 1.0OS: Windows with .Net Framework 2.0 installed.Introduction:Want to take a break with an excuse? :)How to use:Just click on the "OK" button once you set the title, showing message, total running time and refresh interval (or run it with the default value). You can take a break then.The program will close automatically after the given time is reached.&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/bLZqmDzWLpY" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/466353059725700018/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=466353059725700018" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/466353059725700018?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/466353059725700018?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/bLZqmDzWLpY/i-am-busy-10.html" title="I Am Busy! 1.0" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_rIYUnPohNkY/SrFBeUM510I/AAAAAAAAAxQ/3BxXy8nRbSo/s72-c/IAmBusy1.JPG" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/09/i-am-busy-10.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMCSHk7eyp7ImA9WxNaF0U.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-8410885847645710658</id><published>2009-08-27T09:31:00.004-05:00</published><updated>2009-12-02T13:34:29.703-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-02T13:34:29.703-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Winform" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>[Winform] Set ComboBox's value by the given value</title><summary type="html">Here is the same purpose of the DropDownList control.  Here is the same thing for the winform ComboBox control.internal static void SetDropDownByText(ComboBox cbox, string text){    if (cbox != null)    {        DataTable dt = (DataTable)cbox.DataSource;        for (int i = 0; i &lt; dt.Rows.Count; i++)        {            if ((string)dt.Rows[i][cbox.DisplayMember] == text)            {&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/W7ouH_OOwYw" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/8410885847645710658/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=8410885847645710658" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/8410885847645710658?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/8410885847645710658?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/W7ouH_OOwYw/winform-set-comboboxs-value-by-given.html" title="[Winform] Set ComboBox's value by the given value" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/08/winform-set-comboboxs-value-by-given.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIERHg5fSp7ImA9WxNaF0U.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-1124448855825950058</id><published>2009-07-14T14:15:00.012-05:00</published><updated>2009-12-02T13:35:05.625-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-02T13:35:05.625-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>Serialize/Deserialize object to binary format</title><summary type="html">My original goal is to serialize List and List object, but I believe this method can be applied to other type of objects.using System.Runtime.Serialization.Formatters.Binary;public string SerializeObject(object data){    BinaryFormatter formatter = new BinaryFormatter();    using (MemoryStream ms = new MemoryStream())    {        //this is the key: serialize        formatter.Serialize(ms, data);&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/7dTn1eHcL6g" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/1124448855825950058/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=1124448855825950058" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/1124448855825950058?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/1124448855825950058?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/7dTn1eHcL6g/serializedeserialize-list-object-to.html" title="Serialize/Deserialize object to binary format" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/07/serializedeserialize-list-object-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkAESXYyeip7ImA9WxJVE0o.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-3905390720424547465</id><published>2009-06-30T09:13:00.006-05:00</published><updated>2009-06-30T10:11:48.892-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-30T10:11:48.892-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tips" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL 2005" /><title>Tips: Prevent SSRS report chaching</title><summary type="html">There are many ways to turn off the report cache, but many of them need you to have enough privilege to change the settings. There is one approach that everyone can do: from the url.Append this commend to the end of the url:&amp;rc:emissionTime=633819525738564717The number should be random, and you can do like this:"http://.....&amp;rc:emissionTime=" + DateTime.Now.Ticks;The it's the same trick like this&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/9LCs4rZhBGM" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/3905390720424547465/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=3905390720424547465" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/3905390720424547465?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/3905390720424547465?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/9LCs4rZhBGM/tips-prevent-ssrs-report-chaching.html" title="Tips: Prevent SSRS report chaching" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/06/tips-prevent-ssrs-report-chaching.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UDRnc9eSp7ImA9WxJWE0g.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-6107355362022668194</id><published>2009-06-18T13:51:00.001-05:00</published><updated>2009-06-18T13:54:37.961-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-18T13:54:37.961-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Others" /><title>[eBook]Improving .NET Application Performance and Scalability</title><summary type="html">A very good book from MS would like to share with everyone: Improving .NET Application Performance and Scalability  You can also read it on-line.&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/3o1wTzHZo9U" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/6107355362022668194/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=6107355362022668194" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/6107355362022668194?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/6107355362022668194?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/3o1wTzHZo9U/ebookimproving-net-application.html" title="[eBook]Improving .NET Application Performance and Scalability" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/06/ebookimproving-net-application.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YMSH4_fSp7ImA9WxJVE0o.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-13722378200921400</id><published>2009-06-17T15:08:00.009-05:00</published><updated>2009-06-30T09:13:09.045-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-30T09:13:09.045-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tips" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>Tips: Use String.IsNullOrEmpty() instead of != "" to check empty string</title><summary type="html">According to FxCop's recommendation, use String.IsNullOrEmpty() is a good approach to check the String is empty or not.Case 1://No goodstrUsername != ""Case 2://BetterstrUsername.Length != 0Case 3://The Best!String.IsNullOrEmpty(strUsername)Reason: Equals requires more MSIL instructions than the other two.  Length will throw an exception is the string is null.  IsNullOrEmpty has the same &lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/7oz6ZjB21zI" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/13722378200921400/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=13722378200921400" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/13722378200921400?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/13722378200921400?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/7oz6ZjB21zI/tips-use-stringisnullorempty-instead-of.html" title="Tips: Use String.IsNullOrEmpty() instead of != &quot;&quot; to check empty string" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/06/tips-use-stringisnullorempty-instead-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkAGR3c6cSp7ImA9WxBTFEs.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-7999895631738364782</id><published>2009-06-10T14:06:00.025-05:00</published><updated>2009-12-10T11:05:26.919-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-10T11:05:26.919-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><title>Download a single file from the remote FTP site (Updated)</title><summary type="html">Three approaches to download a file from FTP server: WebRequest, FtpWebRequest, and WebClient. Here are the examples:url = "ftp://xxx.xxx.xxx.xxx/test.txt"WebRequestusing System.Net;  //don't forget thispublic string DownloadFile(string url, string username, string pw){    string strResult = "";    try    {        //According to the rule below, we should pass Uri object instead of string.        &lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/2814N6uVyYw" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/7999895631738364782/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=7999895631738364782" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/7999895631738364782?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/7999895631738364782?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/2814N6uVyYw/download-single-file-from-remote-ftp.html" title="Download a single file from the remote FTP site (Updated)" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/06/download-single-file-from-remote-ftp.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YFQXg9eCp7ImA9WxJWE0g.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-1450096583810138481</id><published>2009-06-02T11:54:00.003-05:00</published><updated>2009-06-18T13:51:50.660-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-18T13:51:50.660-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Others" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><title>ASP.Net: State Management</title><summary type="html">I strongly recommend this document (from MS) if you would like to truly understand this topic.&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/ewffDai48Kk" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/1450096583810138481/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=1450096583810138481" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/1450096583810138481?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/1450096583810138481?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/ewffDai48Kk/aspnet-state-management.html" title="ASP.Net: State Management" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/06/aspnet-state-management.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEAQX07fCp7ImA9WxJQFk0.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-3110026779801044901</id><published>2009-05-29T08:48:00.012-05:00</published><updated>2009-05-29T09:17:20.304-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-29T09:17:20.304-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><title>ASP.Net: Browser Capabilities</title><summary type="html">I learn from Ramp Up. This is useful if you want to know client support javascript or not.HttpBrowserCapabilities browser = Request.Browser;Label1.Text = "Browser Capabilities\n"  + "Type = " + browser.Type + "\n"  + "Name = " + browser.Browser + "\n"  + "Version = " + browser.Version + "\n"  + "Major Version = " + browser.MajorVersion + "\n"  + "Minor Version = " + browser.MinorVersion + "\n"  +&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/735KRvrRP7E" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/3110026779801044901/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=3110026779801044901" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/3110026779801044901?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/3110026779801044901?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/735KRvrRP7E/aspnet-browser-capabilities.html" title="ASP.Net: Browser Capabilities" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/05/aspnet-browser-capabilities.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIFQXoyeCp7ImA9WxJQFk8.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-3481498003220431321</id><published>2009-05-22T11:51:00.009-05:00</published><updated>2009-05-29T14:15:10.490-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-29T14:15:10.490-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="Tips" /><title>Javascript: Get client's TimeZone</title><summary type="html">How to know client's time and time zone? The simplest way that can do this is using the javascript.&lt;script type="text/javascript"&amp;gt;function displayTime(){  var localTime = new Date();  //this one will give you the GMT offset  var timezone = localTime.getTimezoneOffset()/60 * (-1);  var div = document.getElementById("div1");  div.innerText = "GMT" + timezone;}&lt;/script&amp;gt; Or simply use&lt;script type="&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/gfbk2ZNoqI8" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/3481498003220431321/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=3481498003220431321" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/3481498003220431321?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/3481498003220431321?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/gfbk2ZNoqI8/javascript-get-clients-timezone.html" title="Javascript: Get client's TimeZone" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/05/javascript-get-clients-timezone.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YNSXs_cSp7ImA9WxJQFkw.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-75198183119986281</id><published>2009-05-13T14:59:00.013-05:00</published><updated>2009-05-29T10:33:18.549-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-29T10:33:18.549-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tips" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL 2005" /><title>SQL 2005: T-SQL Get table name or Stored Procedure name</title><summary type="html">How to get all the tables' name?Select * From sysobjects Where type = 'U'Order By nameChange the type to 'P' and you will get all the Stored Procedures.Change the type to 'F' and you will get all the UDF (User-Defined Function).More details from here.Another way to get the tables:Select *From sys.tablesHow to get the content of stored procedures?Select text From syscomments Where id = (Select id &lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/-LEtl7hkNnk" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/75198183119986281/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=75198183119986281" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/75198183119986281?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/75198183119986281?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/-LEtl7hkNnk/sql-2005-t-sql-tips.html" title="SQL 2005: T-SQL Get table name or Stored Procedure name" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/05/sql-2005-t-sql-tips.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IAR3k8eCp7ImA9WxJQFEo.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-8928082751090006615</id><published>2009-05-12T15:52:00.004-05:00</published><updated>2009-05-27T20:52:26.770-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-27T20:52:26.770-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><title>MultiThread in ASP.Net</title><summary type="html">How to use multithread in ASP.Net web form?  Here is what I did:private void MethodA(List&lt;string&amp;gt; data){    //runing some stuff    //create a new thread to call another method    ThreadPool.SetMaxThreads(5, 5);    ThreadPool.QueueUserWorkItem(new WaitCallback(MethodB), data);    //keep running your original logic    //.......}private void MethodB(object parameters){    //cast to the correct data &lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/hzJ__l_UZKQ" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/8928082751090006615/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=8928082751090006615" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/8928082751090006615?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/8928082751090006615?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/hzJ__l_UZKQ/multithread-in-aspnet.html" title="MultiThread in ASP.Net" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/05/multithread-in-aspnet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UBRXs_eSp7ImA9WxNUGEU.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-413559805694358286</id><published>2009-05-12T14:14:00.007-05:00</published><updated>2009-11-10T13:27:34.541-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-10T13:27:34.541-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><title>[ASP.Net]Set TextBox to ReadOnly</title><summary type="html">Set TextBox's ReadOnly property to "True" will cause many side effects.  How to retain all the functionalities and also have the ReadOnly function turn on?  Here is the better way to do this compare with setting the ReadOnly property directly.TextBox1.Attributes.Add("readonly", "readonly");Let me know if you have better approach. :)&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/W1_9ONrseFc" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/413559805694358286/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=413559805694358286" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/413559805694358286?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/413559805694358286?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/W1_9ONrseFc/set-textbox-to-readonly.html" title="[ASP.Net]Set TextBox to ReadOnly" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/05/set-textbox-to-readonly.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEACRn47fip7ImA9WxJREEQ.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-2123639819860793425</id><published>2009-04-27T11:06:00.007-05:00</published><updated>2009-05-11T20:46:07.006-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-11T20:46:07.006-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><title>Javascript debugging in Visual Studio 2005</title><summary type="html">How to debug (set a breakpoint) javascript in Visual Studio 2005 without installing 3rd party tools/softwares?First, make sure you uncheck the following settings.Second, put the keyword "debugger" in your javascript code like this:function Set(){  debugger;  //this is just like a breakpoint  var control = document.getElementById('Button1');  //......}After doing this, you will have full ability &lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/5_N1XRijp70" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/2123639819860793425/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=2123639819860793425" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/2123639819860793425?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/2123639819860793425?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/5_N1XRijp70/javascript-debug-in-visual-studio-2005.html" title="Javascript debugging in Visual Studio 2005" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_rIYUnPohNkY/SfXeoiMeZXI/AAAAAAAAAtg/1O0PMsKOCfQ/s72-c/IEsettings.JPG" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/04/javascript-debug-in-visual-studio-2005.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUEARXo5eCp7ImA9WxJVEEs.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-6829197998878922837</id><published>2009-04-24T14:18:00.003-05:00</published><updated>2009-06-26T20:54:04.420-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-26T20:54:04.420-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL 2005" /><title>SQL 2005 Paging</title><summary type="html">You can find many ways to implement the paging in the stored procedures.  Here is the one that I learned from my colleague.Create PROCEDURE [dbo].[getMemberInfo] (@pageNumber int = 1, --which page you want to fetch@rowsPerPage int = 50 --how many rows per page)ASBEGIN SET NOCOUNT ON; Declare @startRowIndex int,  @endRowIndex int Set @startRowIndex = ((@pageNumber - 1) * @rowsPerPage) + 1 Set @&lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/_Qjaj6p-lSE" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/6829197998878922837/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=6829197998878922837" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/6829197998878922837?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/6829197998878922837?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/_Qjaj6p-lSE/sql-2005-paging.html" title="SQL 2005 Paging" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/04/sql-2005-paging.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UBSH85cSp7ImA9WxJTGEk.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-2356197229359850075</id><published>2009-04-16T14:02:00.012-05:00</published><updated>2009-04-27T11:20:59.129-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-27T11:20:59.129-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><title>How to prevent users from keying in numbers</title><summary type="html">I saw a pretty neat javascript to prevent (or only allow) users from keying numbers.  This works for both IE and Firefox. Here is the scripts:function onKeyPressBlockNumbers(e){  //e.keyCode is for IE; e.which is for Firefox  var key = window.event ? e.keyCode : e.which;  var keychar = String.fromCharCode(key);  reg = /\d/;  return !reg.test(keychar);}This one is the oppsite purpose:function &lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/TVXwjnDcfJM" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/2356197229359850075/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=2356197229359850075" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/2356197229359850075?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/2356197229359850075?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/TVXwjnDcfJM/preventing-users-key-in-numbers.html" title="How to prevent users from keying in numbers" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/04/preventing-users-key-in-numbers.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQNR3k4fip7ImA9WxVaFk4.&quot;"><id>tag:blogger.com,1999:blog-257501392534895159.post-4448605298471303897</id><published>2009-04-13T10:38:00.003-05:00</published><updated>2009-04-13T10:43:16.736-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-13T10:43:16.736-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Cryptography" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>AES File Encryption/Decryption</title><summary type="html">public string AESforFile(string inputFilename, string outputFilename, string key, string IV, bool toEncrypt){  try  {    using (FileStream fsInput = new FileStream(inputFilename, FileMode.Open, FileAccess.Read))    {      using (FileStream fsOutput = new FileStream(outputFilename, FileMode.Create, FileAccess.Write))      {        RijndaelManaged oAES = new RijndaelManaged();        &lt;img src="http://feeds.feedburner.com/~r/KennyHsuBlog/~4/KPrEKxg5Hos" height="1" width="1"/&gt;</summary><link rel="replies" type="application/atom+xml" href="http://kennyshu.blogspot.com/feeds/4448605298471303897/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=257501392534895159&amp;postID=4448605298471303897" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/4448605298471303897?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/257501392534895159/posts/default/4448605298471303897?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/KennyHsuBlog/~3/KPrEKxg5Hos/aes-file-encryptiondecryption.html" title="AES File Encryption/Decryption" /><author><name>Kenny Hsu</name><uri>http://www.blogger.com/profile/09636040327211268566</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="15462080382933433847" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://kennyshu.blogspot.com/2009/04/aes-file-encryptiondecryption.html</feedburner:origLink></entry></feed>
