<?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:blogger='http://schemas.google.com/blogger/2008' 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-7105475797094350105</id><updated>2024-10-16T07:31:49.897-07:00</updated><category term="Excel exports"/><category term="LINQ"/><category term="Page Breaks"/><category term="Page Names"/><category term="Programming"/><category term="Query"/><category term="Reporting"/><category term="SSRS 2012"/><category term="VB.NET"/><title type='text'>Manu&#39;s Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>40</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-954239557635887766</id><published>2016-07-16T23:12:00.004-07:00</published><updated>2016-07-16T23:12:43.183-07:00</updated><title type='text'>Simple Code to get First Day of Week and Last Day of Week</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I wanted a simple and quick way to get the start of week and end of week to do some data processing for the week. Here is a simple three line code that can help achieve this.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;        DateTime dt  = DateTime.Now();
        DateTime FirstDayofWeek = dt.AddDays(-(int)dt.DayOfWeek);
        DateTime LastDayofWeek = FirstDayofWeek.AddDays(6);
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Hope it helps, Thanks!!!&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/954239557635887766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2016/07/simple-code-to-get-first-day-of-week.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/954239557635887766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/954239557635887766'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2016/07/simple-code-to-get-first-day-of-week.html' title='Simple Code to get First Day of Week and Last Day of Week'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-6765176385865198226</id><published>2016-07-14T06:45:00.001-07:00</published><updated>2016-07-14T06:45:41.141-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel exports"/><category scheme="http://www.blogger.com/atom/ns#" term="Page Breaks"/><category scheme="http://www.blogger.com/atom/ns#" term="Page Names"/><category scheme="http://www.blogger.com/atom/ns#" term="Reporting"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS 2012"/><title type='text'>Get PageNames in SSRS for SubReports.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
I was recently presented with a situation where i need to place chart on one sheet and data in other sheet when exported to excel in SSRS. I tried to use page break after the chart and inserted a sub report.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
When i did that, i noticed that that page names cannot be set for sub reports. In order to acheive something like below. I looked at work arounds to make the page names as shown in below image.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYwtjGyJj6ZGkpe_4Mu95ydjfXOlTefv1G06_HICh2Fq5Ci24bZ-E0yB84T2OTamP-KRTsmmYQuJW0e_VMvxaMGOs9pLXOFshjESLv2GckM63FtqoxTGRA8f9FaAoyUCVW3yYLGIAACAs5/s1600/1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;35&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYwtjGyJj6ZGkpe_4Mu95ydjfXOlTefv1G06_HICh2Fq5Ci24bZ-E0yB84T2OTamP-KRTsmmYQuJW0e_VMvxaMGOs9pLXOFshjESLv2GckM63FtqoxTGRA8f9FaAoyUCVW3yYLGIAACAs5/s400/1.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I noticed that the PageName property is available one tablix and rectangles. So i just placed a rectangle and set its PageName as &quot;&lt;b&gt;Other Custom Name 1&lt;/b&gt;&quot; and then insert the subreport within this rectangle control and then the exported excel sheet hast the custom names as expected.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin8USdd3vAU_wnPdKlNm3k2woObA0D_FpccZjVOmwRf4Ic7vNz9PijHM2MsFttNnn6khp6_dDjWj9WFksn2GpAn7xcNCJpFaN4QrTZFVvbpDZGciJ_IPNNUNZkQuMaVluozRgMTBIMMQm8/s1600/2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;228&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin8USdd3vAU_wnPdKlNm3k2woObA0D_FpccZjVOmwRf4Ic7vNz9PijHM2MsFttNnn6khp6_dDjWj9WFksn2GpAn7xcNCJpFaN4QrTZFVvbpDZGciJ_IPNNUNZkQuMaVluozRgMTBIMMQm8/s640/2.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Let me know if you &amp;nbsp;have any other work arounds or if you found this post helpful.&lt;br /&gt;
&lt;br /&gt;
Thank you.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/6765176385865198226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2016/07/get-pagenames-in-ssrs-for-subreports.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/6765176385865198226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/6765176385865198226'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2016/07/get-pagenames-in-ssrs-for-subreports.html' title='Get PageNames in SSRS for SubReports.'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYwtjGyJj6ZGkpe_4Mu95ydjfXOlTefv1G06_HICh2Fq5Ci24bZ-E0yB84T2OTamP-KRTsmmYQuJW0e_VMvxaMGOs9pLXOFshjESLv2GckM63FtqoxTGRA8f9FaAoyUCVW3yYLGIAACAs5/s72-c/1.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-7906376145296174043</id><published>2016-07-05T07:43:00.002-07:00</published><updated>2016-07-05T07:43:36.686-07:00</updated><title type='text'>Difference between a KeyPress and KeyDown Events</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
The KeyDown event triggers for all the keys where as KeyPress only works for the character keys.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
If you press Key A, then it will fire KeyDown as well as KeyPress event.&lt;br /&gt;
&lt;br /&gt;
If you press Shift,Ctrl, Escape or BackSpace keys then only KeyDown is the only&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Refer:&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.windows.forms.control.keypress.aspx&quot; target=&quot;_blank&quot;&gt;MSDN Link&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/7906376145296174043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2016/07/difference-between-keypress-and-keydown.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/7906376145296174043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/7906376145296174043'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2016/07/difference-between-keypress-and-keydown.html' title='Difference between a KeyPress and KeyDown Events'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-6108668993438969158</id><published>2016-06-16T05:53:00.002-07:00</published><updated>2016-06-16T07:07:46.143-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LINQ"/><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><category scheme="http://www.blogger.com/atom/ns#" term="Query"/><category scheme="http://www.blogger.com/atom/ns#" term="VB.NET"/><title type='text'>Filter datatable using LINQ in VB.NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; margin: 0cm 0cm 0pt; text-align: left;&quot;&gt;
&lt;strong style=&quot;background-color: transparent; font-size: 13.2px;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;Below is a simple LINQ that you can use to filter the DataTable.&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; margin: 0cm 0cm 0pt; text-align: left;&quot;&gt;
&lt;strong style=&quot;background-color: transparent; font-size: 13.2px;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; margin: 0cm 0cm 0pt; text-align: left;&quot;&gt;
&lt;strong style=&quot;background-color: transparent; font-size: 13.2px;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; margin: 0cm 0cm 0pt; text-align: left;&quot;&gt;
&lt;strong style=&quot;background-color: transparent; font-size: 13.2px;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;AsEnumerable() method to return the input type DataTable as IEnumerable.&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; margin: 0cm 0cm 0pt; text-align: left;&quot;&gt;
&lt;strong style=&quot;background-color: transparent; font-size: 13.2px;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;strong style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 18.48px;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;CopyToDataTable() method takes the results of the filtered query and copies into a new DataTable that you can use to work with the filtered data.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; margin: 0cm 0cm 0pt; text-align: center;&quot;&gt;
&lt;strong style=&quot;font-size: 13.2px;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: blue; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;-------------------------------------------------------------------------&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; margin: 0cm 0cm 0pt; text-align: left;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: blue; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&amp;nbsp;filteredTable&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: blue; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;As&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #2b91af; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;DataTable&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&amp;nbsp;= (&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: blue; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;From&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&amp;nbsp;n&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: blue; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;In&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&amp;nbsp;dt.AsEnumerable()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;strong style=&quot;background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 18.48px;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: blue; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;Where&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&amp;nbsp;n.Field(&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: blue; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;Of&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #2b91af; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;Int32&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;)(&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #a31515; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;) = 1&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 18.48px;&quot;&gt;&lt;strong style=&quot;font-size: 13.2px; line-height: 18.48px;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: blue; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;Select&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&amp;nbsp;n).CopyToDataTable()&lt;/span&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;strong style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 18.48px;&quot;&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 18.48px;&quot;&gt;
&lt;/strong&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;strong style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: blue; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;-------------------------------------------------------------------------&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;strong style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 18.48px;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;
&lt;strong style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 18.48px;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: black; font-family: &amp;quot;consolas&amp;quot;;&quot;&gt;Feel free to leave your comments or suggestions. Thank you.&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/6108668993438969158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2016/06/filter-datatable-using-linq-in-vbnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/6108668993438969158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/6108668993438969158'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2016/06/filter-datatable-using-linq-in-vbnet.html' title='Filter datatable using LINQ in VB.NET'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-1702448030227479683</id><published>2013-10-30T13:34:00.000-07:00</published><updated>2015-11-25T10:59:36.277-08:00</updated><title type='text'>Adding Handlers for Controls {Code}</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Public Class Userdetails&lt;br /&gt;
Dim cnn As SqlConnection = New SqlConnection(My.Settings.ConnectionString)&lt;br /&gt;
Dim strSQL As String&lt;br /&gt;
Private pUserId As Integer&lt;br /&gt;
Private pNewUser As Boolean = False&lt;br /&gt;
Private IsDirty As Boolean = False&lt;br /&gt;
Private Sub AddSaveHandlers(ByVal c As Control)&lt;br /&gt;
For Each ctrl As Control In c.Controls&lt;br /&gt;
If ctrl.Controls.Count &amp;gt; 0 Then&lt;br /&gt;
AddSaveHandlers(ctrl)&lt;br /&gt;
End If&lt;br /&gt;
Select Case ctrl.GetType.Name.ToUpper&lt;br /&gt;
Case &quot;TEXTBOX&quot;, &quot;COMBOBOX&quot;&lt;br /&gt;
AddHandler ctrl.TextChanged, AddressOf SetPromptSaveTrue&lt;br /&gt;
Case &quot;CHECKBOX&quot;&lt;br /&gt;
AddHandler CType(ctrl, CheckBox).CheckStateChanged, AddressOf SetPromptSaveTrue&lt;br /&gt;
End Select&lt;br /&gt;
Next&lt;br /&gt;
End Sub&lt;br /&gt;
Private Sub SetPromptSaveTrue(ByVal sender As System.Object, ByVal e As System.EventArgs)&lt;br /&gt;
IsDirty = True&lt;br /&gt;
End Sub&lt;br /&gt;
Private Sub Userdetails_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
AddSaveHandlers(Me)&lt;br /&gt;
End Sub&lt;br /&gt;
Private Sub Userdetails_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing&lt;br /&gt;
Dim savedata As DialogResult&lt;br /&gt;
If IsDirty Then&lt;br /&gt;
savedata = MessageBox.Show(&quot;Do you want to save your changes?&quot;, &quot;Save Changes&quot;, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1)&lt;br /&gt;
Select Case savedata&lt;br /&gt;
Case Windows.Forms.DialogResult.Yes&lt;br /&gt;
Call btnSave_Click(sender, e)&lt;br /&gt;
Case Windows.Forms.DialogResult.Cancel&lt;br /&gt;
e.Cancel = True&lt;br /&gt;
Case Else&lt;br /&gt;
IsDirty = False&lt;br /&gt;
End Select&lt;br /&gt;
End If&lt;br /&gt;
End Sub&lt;br /&gt;
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click&lt;br /&gt;
End Sub&lt;br /&gt;
Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click&lt;br /&gt;
Me.Close()&lt;br /&gt;
End Sub&lt;br /&gt;
End Class&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/1702448030227479683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2013/10/adding-handlers-for-controls-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/1702448030227479683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/1702448030227479683'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2013/10/adding-handlers-for-controls-code.html' title='Adding Handlers for Controls {Code}'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-1429954911065769816</id><published>2013-10-30T13:28:00.002-07:00</published><updated>2013-10-30T13:31:25.993-07:00</updated><title type='text'>VSS Writers and associated Services</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #e69138;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Hand&lt;span style=&quot;font-family: inherit;&quot;&gt;y&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 17px;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: large;&quot;&gt;reference linking VSS Writers to Services&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 786px;&quot;&gt;
&lt;colgroup&gt;&lt;col style=&quot;width: 212pt;&quot; width=&quot;283&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 109pt;&quot; width=&quot;145&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 269pt;&quot; width=&quot;358&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;
&lt;tbody&gt;
&lt;tr height=&quot;21&quot; style=&quot;height: 15.75pt;&quot;&gt;
&lt;td height=&quot;21&quot; style=&quot;height: 15.75pt; width: 212pt;&quot; width=&quot;283&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #783f04;&quot;&gt;VSS Writer&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/td&gt;
&lt;td style=&quot;border-width: 109pt;&quot; width=&quot;145&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #783f04;&quot;&gt;Service Name&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/td&gt;
&lt;td style=&quot;border-width: 269pt;&quot; width=&quot;358&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #783f04;&quot;&gt;Service Display Name&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr height=&quot;21&quot; style=&quot;height: 15.75pt;&quot;&gt;
&lt;td height=&quot;21&quot; style=&quot;height: 15.75pt; width: 212pt;&quot; width=&quot;283&quot;&gt;&lt;br /&gt;
ASR Writer&lt;/td&gt;
&lt;td style=&quot;border-width: 109pt;&quot; width=&quot;145&quot;&gt;VSS&lt;/td&gt;
&lt;td style=&quot;border-width: 269pt;&quot; width=&quot;358&quot;&gt;Volume Shadow Copy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr height=&quot;21&quot; style=&quot;height: 15.75pt;&quot;&gt;
&lt;td height=&quot;21&quot; style=&quot;height: 15.75pt; width: 212pt;&quot; width=&quot;283&quot;&gt;BITS Writer&lt;/td&gt;
&lt;td style=&quot;border-width: 109pt;&quot; width=&quot;145&quot;&gt;BITS&lt;/td&gt;
&lt;td style=&quot;border-width: 269pt;&quot; width=&quot;358&quot;&gt;Background Intelligent&lt;br /&gt;
Transfer Service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr height=&quot;21&quot; style=&quot;height: 15.75pt;&quot;&gt;
&lt;td height=&quot;21&quot; style=&quot;height: 15.75pt; width: 212pt;&quot; width=&quot;283&quot;&gt;&lt;br /&gt;
COM+ REGDB Writer&lt;/td&gt;
&lt;td style=&quot;border-width: 109pt;&quot; width=&quot;145&quot;&gt;VSS&lt;/td&gt;
&lt;td style=&quot;border-width: 269pt;&quot; width=&quot;358&quot;&gt;Volume Shadow Copy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr height=&quot;21&quot; style=&quot;height: 15.75pt;&quot;&gt;
&lt;td height=&quot;21&quot; style=&quot;height: 15.75pt; width: 212pt;&quot; width=&quot;283&quot;&gt;IIS Config Writer&lt;/td&gt;
&lt;td style=&quot;border-width: 109pt;&quot; width=&quot;145&quot;&gt;AppHostSvc&lt;/td&gt;
&lt;td style=&quot;border-width: 269pt;&quot; width=&quot;358&quot;&gt;Application Host Helper&lt;br /&gt;
Service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr height=&quot;21&quot; style=&quot;height: 15.75pt;&quot;&gt;
&lt;td height=&quot;21&quot; style=&quot;height: 15.75pt; width: 212pt;&quot; width=&quot;283&quot;&gt;&lt;br /&gt;
IIS Metabase Writer&lt;/td&gt;
&lt;td style=&quot;border-width: 109pt;&quot; width=&quot;145&quot;&gt;IISADMIN&lt;/td&gt;
&lt;td style=&quot;border-width: 269pt;&quot; width=&quot;358&quot;&gt;IIS Admin Service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr height=&quot;21&quot; style=&quot;height: 15.75pt;&quot;&gt;
&lt;td height=&quot;21&quot; style=&quot;height: 15.75pt; width: 212pt;&quot; width=&quot;283&quot;&gt;Microsoft Exchange Writer&lt;/td&gt;
&lt;td style=&quot;border-width: 109pt;&quot; width=&quot;145&quot;&gt;MSExchangeIS&lt;/td&gt;
&lt;td style=&quot;border-width: 269pt;&quot; width=&quot;358&quot;&gt;Microsoft Exchange&lt;br /&gt;
Information Store&lt;/td&gt;
&lt;/tr&gt;
&lt;tr height=&quot;21&quot; style=&quot;height: 15.75pt;&quot;&gt;
&lt;td height=&quot;21&quot; style=&quot;height: 15.75pt; width: 212pt;&quot; width=&quot;283&quot;&gt;Microsoft Hyper-V VSS Writer&lt;/td&gt;
&lt;td style=&quot;border-width: 109pt;&quot; width=&quot;145&quot;&gt;vmms&lt;/td&gt;
&lt;td style=&quot;border-width: 269pt;&quot; width=&quot;358&quot;&gt;Hyper-V Virtual Machine&lt;br /&gt;
Management&lt;/td&gt;
&lt;/tr&gt;
&lt;tr height=&quot;21&quot; style=&quot;height: 15.75pt;&quot;&gt;
&lt;td height=&quot;21&quot; style=&quot;height: 15.75pt; width: 212pt;&quot; width=&quot;283&quot;&gt;Registry Writer&lt;/td&gt;
&lt;td style=&quot;border-width: 109pt;&quot; width=&quot;145&quot;&gt;VSS&lt;/td&gt;
&lt;td style=&quot;border-width: 269pt;&quot; width=&quot;358&quot;&gt;Volume Shadow Copy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr height=&quot;21&quot; style=&quot;height: 15.75pt;&quot;&gt;
&lt;td height=&quot;21&quot; style=&quot;height: 15.75pt; width: 212pt;&quot; width=&quot;283&quot;&gt;&lt;br /&gt;
Shadow Copy Optimization Writer&lt;/td&gt;
&lt;td style=&quot;border-width: 109pt;&quot; width=&quot;145&quot;&gt;VSS&lt;/td&gt;
&lt;td style=&quot;border-width: 269pt;&quot; width=&quot;358&quot;&gt;Volume Shadow Copy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr height=&quot;21&quot; style=&quot;height: 15.75pt;&quot;&gt;
&lt;td height=&quot;21&quot; style=&quot;height: 15.75pt; width: 212pt;&quot; width=&quot;283&quot;&gt;&lt;br /&gt;
System Writer&lt;/td&gt;
&lt;td style=&quot;border-width: 109pt;&quot; width=&quot;145&quot;&gt;CryptSvc&lt;/td&gt;
&lt;td style=&quot;border-width: 269pt;&quot; width=&quot;358&quot;&gt;Cryptographic Services&lt;/td&gt;
&lt;/tr&gt;
&lt;tr height=&quot;21&quot; style=&quot;height: 15.75pt;&quot;&gt;
&lt;td height=&quot;21&quot; style=&quot;height: 15.75pt; width: 212pt;&quot; width=&quot;283&quot;&gt;&lt;br /&gt;
WMI Writer&lt;/td&gt;
&lt;td style=&quot;border-width: 109pt;&quot; width=&quot;145&quot;&gt;Winmgmt&lt;/td&gt;
&lt;td style=&quot;border-width: 269pt;&quot; width=&quot;358&quot;&gt;Windows Management&lt;br /&gt;
Instrumentation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/1429954911065769816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2013/10/vss-writers-and-associated-services.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/1429954911065769816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/1429954911065769816'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2013/10/vss-writers-and-associated-services.html' title='VSS Writers and associated Services'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-1714015337114355420</id><published>2013-10-17T11:40:00.000-07:00</published><updated>2013-10-17T11:40:08.217-07:00</updated><title type='text'>Convert a Base64  String into a PDF File</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Recently I had the need to decode a Base64 string and make a PDF of it.&amp;nbsp; Usually I would&#39;ve written a small utility app, but this time I rolled with powershell:&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;br /&gt;
&lt;pre class=&quot;csharpcode&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18px;&quot;&gt;function decodeBase64IntoPdf([&lt;span class=&quot;kwrd&quot; style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;]$base64EncodedString)
{
    $bytes = [System.Convert]::FromBase64String($base64EncodedString)
    [IO.File]::WriteAllBytes(&lt;span class=&quot;str&quot; style=&quot;color: #a31515;&quot;&gt;&quot;C:\Users\medmondson\Desktop\file.pdf&quot;&lt;/span&gt;, $bytes)
}&lt;/pre&gt;
&lt;br style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;I&#39;m impressed with how quickly I can knock out a script like this (yes they&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;are&lt;/i&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;.NET assemblies) without having to load a new VS solution. Of course a lot more could be done to this (file format via an argument for example) but I thought I&#39;d share it raw as I know I&#39;ll need to use it again one day.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://www.matthewedmondson.info/2013/10/recently-i-had-need-to-decode-base64.html&quot; rel=&quot;nofollow&quot;&gt;From Matt&#39;s Blog&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/1714015337114355420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2013/10/convert-base64-string-into-pdf-file.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/1714015337114355420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/1714015337114355420'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2013/10/convert-base64-string-into-pdf-file.html' title='Convert a Base64  String into a PDF File'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-2085830766575213808</id><published>2010-05-27T08:06:00.000-07:00</published><updated>2010-05-27T08:10:07.151-07:00</updated><title type='text'>Ajax ModalPopup Extender Example.</title><content type='html'>There is a nice example at &lt;a href=&quot;http://www.aspdotnetcodes.com/Ajax_ModalPopup_PostBack_GridView.aspx&quot;&gt;HERE&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/2085830766575213808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2010/05/ajax-modalpopup-extender-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/2085830766575213808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/2085830766575213808'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2010/05/ajax-modalpopup-extender-example.html' title='Ajax ModalPopup Extender Example.'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-5061500486197040405</id><published>2010-05-25T11:58:00.000-07:00</published><updated>2010-05-25T12:00:29.310-07:00</updated><title type='text'></title><content type='html'>&lt;span id=&quot;ctl00_cphContent_repArticle_ctl00_lblBody&quot;&gt;&lt;p&gt;&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;Why Invisible Column?  &lt;/span&gt;&lt;/b&gt; &lt;/u&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;One might ask that why should I use an  invisible column in the first place. There are many reasons of making  the column  invisible. You might want to use a column as the primary key which  retrieves the  value from the database and display it using the GridView control.  Since,  primary key is a confidential data you want might to hide it from the  users.  Another reason of making the column invisible is that you might want to  have  some additional information to save an extra trip to the database.  Please note  that the second scenario should not be used to display many columns as  this will  increase the View State and thus the size of the page large.  &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;Using the DataKeys Property:&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;The simplest way to access the primary  key is  by using DataKeys property of the GridView control. DataKeys property  represents  the column which is to be used as the primary key. In this article I  will use my  custom database &quot;&lt;b&gt;Tasks&lt;/b&gt;&quot; and display the columns &quot;&lt;b&gt;Title&lt;/b&gt;&quot;, &quot;&lt;b&gt;Description&lt;/b&gt;&quot;,   &quot;&lt;b&gt;DateCreated&lt;/b&gt;&quot; in the GridView control. Apart from the columns  from the  database the GridView also contains a CheckBox Template Column which is  used to  check the tasks which are completed. Take a look at the HTML below to  have a  clear idea. &lt;/span&gt;&lt;/p&gt;  &lt;table style=&quot;border-collapse: collapse;color:#111111;&quot; id=&quot;AutoNumber1&quot; bg border=&quot;1&quot; border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;   &lt;tbody&gt;&lt;tr&gt;     &lt;td width=&quot;100%&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;     &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;GridView&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;gvInComplete&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;server&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;AutoGenerateColumns&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;False&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;CellPadding&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;=&quot;4&quot;&lt;/span&gt;&lt;/span&gt;&lt;p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;ForeColor&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;#333333&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;GridLines&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;None&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;DataKeyNames&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;b&gt;=&quot;TaskID&quot;&lt;/b&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;FooterStyle&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;BackColor&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;#990000&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;Font-Bold&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;True&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;ForeColor&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;White&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier  New;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;Columns&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;BoundField&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;DataField&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;Title&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;HeaderText&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;Title&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier  New;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;BoundField&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;DataField&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;Description&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;HeaderText&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;Description&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier  New;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;BoundField&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;DataField&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;DateCreated&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;HeaderText&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;     &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&quot;Date Created&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;TemplateField&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;HeaderText&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;=&quot;Select&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;ItemTemplate&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;CheckBox&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;chkSelect&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;server&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;ItemTemplate&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;TemplateField&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;Columns&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;    &lt;/span&gt;     &lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;GridView&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;    &lt;/span&gt;     &lt;p&gt; &lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;As, you can see in the code above the &lt;b&gt; DataKeyNames&lt;/b&gt; property is set to &quot;&lt;b&gt;TaskID&lt;/b&gt;&quot; which, is the  primary key in  the table. Now, let&#39;s see how we can access all the &lt;b&gt;TaskID&lt;/b&gt; of the  rows  which are checked using the &lt;b&gt;CheckBoxes&lt;/b&gt;. &lt;/span&gt;&lt;/p&gt;  &lt;table id=&quot;AutoNumber1&quot; style=&quot;border-collapse: collapse;color:#111111;&quot; bg border=&quot;0&quot; border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;   &lt;tbody&gt;&lt;tr&gt;     &lt;td width=&quot;100%&quot;&gt;     &lt;span style=&quot;font-family:Courier New;font-size:85%;color:#008080;&quot;&gt;DataKey&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;      key;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;     &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;GridViewRow&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;      row &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;in&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;      gvInComplete.Rows)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;bool&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;      result = ((&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;CheckBox&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;)row.FindControl(&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;&quot;chkSelect&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;)).Checked;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;font-size:85%;color:#0000ff;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;      (result)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;key  = gvInComplete.DataKeys[row.RowIndex];&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;Response.Write((&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;font-size:85%;color:#0000ff;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;)key.Value);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;} &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;In the code above I am iterating  through all  the rows in the GridView control. If I find a row that is checked then I  gets  the primary key of the row using the GridView &lt;b&gt;DataKeys&lt;/b&gt;  collection. The  Row class property &lt;/span&gt;&lt;span style=&quot;font-family:Courier New;font-size:85%;&quot;&gt;RowIndex&lt;/span&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;  will contain the index of the current row.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;This is pretty simple right! But what  if I want  to access another column which is not a primary key. This can be done by  using a  Template Column inside the GridView control. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;Accessing Invisible Column Using  Template  Field:&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;To access the invisible column using  Template  Field is very straight forward. All you need to do is to make the  Template Field  invisible and use the control inside the Template Field to access the  values.  Check out the following HTML code: &lt;/span&gt;&lt;/p&gt;  &lt;table style=&quot;border-collapse: collapse;color:#111111;&quot; id=&quot;AutoNumber2&quot; bg border=&quot;0&quot; border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;   &lt;tbody&gt;&lt;tr&gt;     &lt;td width=&quot;100%&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier  New;&quot;&gt;&lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;TemplateField&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;Visible&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;False&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;     &lt;/span&gt;     &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;ItemTemplate&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;Label&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;lblTaskID&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&quot;server&quot;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#ff0000;&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;=&#39;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;%#      Eval(&quot;TaskID&quot;) %&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;ItemTemplate&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;TemplateField&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;In the above HTML code I have simply  defined a  Label control inside the &lt;/span&gt;&lt;span style=&quot;font-family:Courier New;font-size:85%;&quot;&gt;ItemTemplate&lt;/span&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;  property of the Template Field. The Template Field is made invisible so,  the  user will not see it on when it is bound to the GridView control. You  can access  the &lt;b&gt;TaskID&lt;/b&gt; using the following code: &lt;/span&gt;&lt;/p&gt;  &lt;table style=&quot;border-collapse: collapse;color:#111111;&quot; id=&quot;AutoNumber2&quot; bg border=&quot;0&quot; border cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;   &lt;tbody&gt;&lt;tr&gt;     &lt;td width=&quot;100%&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;&lt;span style=&quot;font-family:Courier  New;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;      taskID = 0;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;     &lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; task = &lt;/span&gt;     &lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;     &lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;Task&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;();     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;      (&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;GridViewRow&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; row     &lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;in&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;      gvInComplete.Rows)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;font-size:85%;color:#0000ff;&quot;&gt;bool&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;      result = ((&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;CheckBox&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;)      row.FindControl(&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;&quot;chkSelect&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;)).Checked;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New;font-size:85%;color:#0000ff;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;      (result)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;taskID  = &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;     &lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;Convert&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;.ToInt32(((&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#008080;&quot;&gt;Label&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;)row.FindControl(&lt;/span&gt;&lt;span style=&quot;font-size:85%;color:#800000;&quot;&gt;&quot;lblTaskID&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;)).Text);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;task.UpdateTask(taskID);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;    &lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;In the above code I am simply iterating  through  the GridView rows and when I find that the checkbox is checked then I  get the  value from the Label control which in this case is &lt;b&gt;TaskID&lt;/b&gt;. After,  I get  the TaskID I can perform any function on it in my case &lt;b&gt;UpdateTask.&lt;/b&gt;  &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;I hope you liked the article, happy  coding!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size:78%;&quot;&gt;Copied From:http://www.highoncoding.com/Articles/178_Access%20GridView%20Invisible%20Columns.aspx&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size:78%;&quot;&gt;This is just for educational purpose only....&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Verdana;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/5061500486197040405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2010/05/why-invisible-column-one-might-ask-that.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/5061500486197040405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/5061500486197040405'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2010/05/why-invisible-column-one-might-ask-that.html' title=''/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-8316281188839669844</id><published>2010-05-18T07:25:00.000-07:00</published><updated>2010-05-18T07:26:07.191-07:00</updated><title type='text'>Sending Email From Web Page using asp.net</title><content type='html'>Hope this link will help you find the solution you are looking &lt;br /&gt;&lt;br /&gt;http://www.4guysfromrolla.com/articles/072606-1.aspx</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/8316281188839669844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2010/05/sending-email-from-web-page-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/8316281188839669844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/8316281188839669844'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2010/05/sending-email-from-web-page-using.html' title='Sending Email From Web Page using asp.net'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-7587834565370698469</id><published>2010-05-10T07:06:00.000-07:00</published><updated>2010-05-10T07:19:59.967-07:00</updated><title type='text'>Adding Images to Hyperlinks in Grid view.</title><content type='html'>&lt;hr size=&quot;1&quot; width=&quot;90%&quot;&gt;  &lt;p&gt;A &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/HyperLinkFieldClass.aspx&quot; target=&quot;_blank&quot;&gt;HyperLinkField&lt;/a&gt;  enables authors to display text or image hyperlinks that users can  click to navigate to another page. &lt;/p&gt;  &lt;p&gt;The text or image of the hyperlink can either be static — the same  for every row — or obtained from a field in the data source. &lt;/p&gt;  &lt;p&gt;Similarly, the target page for the hyperlink can be a single page for  all the hyperlinks, or a URL derived from the data source. &lt;/p&gt;  &lt;div class=&quot;header&quot;&gt;&lt;h4&gt;To add a hyperlink field&lt;/h4&gt;&lt;/div&gt;  &lt;ol&gt;&lt;li&gt;Set the &lt;b&gt;GridView&lt;/b&gt; control&#39;s &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/GridViewclassautogeneratecolumns.aspx&quot; target=&quot;_blank&quot;&gt;AutoGenerateColumns&lt;/a&gt;  property to &lt;cite&gt;false&lt;/cite&gt;.  &lt;pre class=&quot;snippet&quot;&gt;&lt;asp:GridView id=&quot;myGrid&quot; runat=&quot;server&quot;&lt;br /&gt;  &lt;b&gt;autogeneratecolumns&lt;/b&gt;=false&lt;br /&gt;  ...&lt;br /&gt;&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Within the &lt;b&gt;GridView&lt;/b&gt; declaration, declare a &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/GridViewClassColumns.aspx&quot; target=&quot;_blank&quot;&gt;&lt;columns&gt;&lt;/a&gt;  element.&lt;/li&gt;&lt;li&gt;Within the &lt;b&gt;Columns&lt;/b&gt; element, define the &lt;b&gt;&lt;asp:hyperlinkfield&gt;&lt;/b&gt;  you intend to display, specifying at the very least the required &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/hyperlinkfieldclassdatatextfield.aspx&quot; target=&quot;_blank&quot;&gt;DataTextField&lt;/a&gt;  and &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/hyperlinkfieldclassdatanavigateurlfields.aspx&quot; target=&quot;_blank&quot;&gt;DataNavigateUrlFields&lt;/a&gt;  properties.&lt;/li&gt;&lt;li&gt;Optionally set the &lt;b&gt;HyperLinkField&lt;/b&gt; control&#39;s other  properties, such as the &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/datacontrolfieldclassheadertext.aspx&quot; target=&quot;_blank&quot;&gt;HeaderText&lt;/a&gt;  and &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/hyperlinkfieldclassdatanavigateurlformatstring.aspx&quot; target=&quot;_blank&quot;&gt;DataNavigateUrlFormatString&lt;/a&gt;.  For syntax, see &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/aspnet/syntax/GridViewwebcontrol.aspx?pageno=6&quot; target=&quot;_blank&quot;&gt;GridView  Control Syntax&lt;/a&gt;.  &lt;pre class=&quot;snippet&quot;&gt;&lt;columns&gt;&lt;br /&gt;&lt;br /&gt;  &lt;asp:&lt;b&gt;hyperlinkfield&lt;/b&gt; headertext=&quot;Title&quot;&lt;br /&gt;     datatextfield=&quot;title&quot;&lt;br /&gt;     datanavigateurlfields=&quot;title_id&quot;&lt;br /&gt;     datanavigateurlformatstring=&quot;details_title.aspx?titleid={0}&quot; /&gt;&lt;br /&gt;&lt;br /&gt;  ...&lt;br /&gt;&lt;br /&gt;&lt;/columns&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;  &lt;table class=&quot;thumbs&quot; width=&quot;33%&quot;&gt; &lt;tbody&gt;&lt;tr align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;td&gt;&lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/demos/GridViewHyperLinkField.aspx&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://authors.aspalliance.com/aspxtreme/shared/images/GridViewHyperLinkField.gif&quot; alt=&quot;&quot; border=&quot;1&quot; height=&quot;75&quot; width=&quot;100&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;caption&quot;&gt;GridView  HyperLinkField Example&lt;/div&gt;  &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/demos/GridViewHyperLinkField.aspx&quot; target=&quot;_blank&quot;&gt;Run  Sample&lt;/a&gt; | &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/shared/viewsrc.aspx?path=/aspxtreme/sys/web/ui/webcontrols/demos/GridViewHyperLinkField.aspx.src&quot; target=&quot;_blank&quot;&gt;View Source&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;The &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/HyperLinkFieldClass.aspx&quot; target=&quot;_blank&quot;&gt;HyperLinkField&lt;/a&gt;  class itself does not have a member that directly supports using  images. The &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/webforms/controls/hyperlink.aspx&quot; target=&quot;_blank&quot;&gt;HyperLink&lt;/a&gt;  controls that are rendered in the column, though, include an &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/HyperLinkClassImageUrl.aspx&quot; target=&quot;_blank&quot;&gt;ImageUrl&lt;/a&gt;  property that can be set programmatically during the &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/GridViewClassRowDataBound.aspx&quot; target=&quot;_blank&quot;&gt;RowDataBound&lt;/a&gt;  event of the &lt;b&gt;GridView&lt;/b&gt; control to render image links. &lt;/p&gt;  &lt;div class=&quot;header&quot;&gt;&lt;h4&gt;To setup a hyperlink field to display images&lt;/h4&gt;&lt;/div&gt;  &lt;ol&gt;&lt;li&gt;Set the &lt;b&gt;GridView&lt;/b&gt; control&#39;s &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/GridViewclassautogeneratecolumns.aspx&quot; target=&quot;_blank&quot;&gt;AutoGenerateColumns&lt;/a&gt;  property to &lt;cite&gt;false&lt;/cite&gt;.     &lt;/li&gt;&lt;li&gt;Assign the handler that will receive control when the rows  are bound to data ( in effect, when the &lt;b&gt;GridView&lt;/b&gt;&#39;s &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/GridViewclassrowdatabound.aspx&quot; target=&quot;_blank&quot;&gt;RowDataBound&lt;/a&gt;  event occurs ).  &lt;pre class=&quot;snippet&quot;&gt;&lt;asp:GridView id=&quot;myGrid&quot; runat=&quot;server&quot;&lt;br /&gt;  &lt;b&gt;autogeneratecolumns&lt;/b&gt;=false&lt;br /&gt;  ...&lt;br /&gt;  &lt;b&gt;onRowDataBound&lt;/b&gt;=&quot;getImages&quot;&lt;br /&gt;&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Proceed as with using text links above, except omit the &lt;b&gt;Text&lt;/b&gt;  and &lt;b&gt;DataTextField&lt;/b&gt; properties.  &lt;pre class=&quot;snippet&quot;&gt;&lt;columns&gt;&lt;br /&gt;&lt;br /&gt;  &lt;asp:&lt;b&gt;hyperlinkfield&lt;/b&gt;&lt;br /&gt;     datanavigateurlfields=&quot;planId&quot;&lt;br /&gt;     datanavigateurlformatstring=&quot;plan_details.aspx?id={0}&quot; /&gt;&lt;br /&gt;&lt;br /&gt;  ...&lt;br /&gt;&lt;br /&gt;&lt;/columns&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Define the handler for the event ( see demo ).&lt;/li&gt;&lt;/ol&gt;  &lt;p&gt;The following example shows how to set up a &lt;b&gt;HyperLinkField&lt;/b&gt; to  display a column of image links in a &lt;b&gt;GridView&lt;/b&gt; control. &lt;/p&gt;  &lt;table class=&quot;thumbs&quot; width=&quot;33%&quot;&gt; &lt;tbody&gt;&lt;tr align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;td&gt;&lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/demos/HyperLinkFieldImageUrl.aspx&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://authors.aspalliance.com/aspxtreme/shared/images/HyperLinkFieldImageUrl.gif&quot; alt=&quot;&quot; border=&quot;1&quot; height=&quot;75&quot; width=&quot;100&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;caption&quot;&gt;Dynamically  Generated HyperLinkField Images&lt;/div&gt;  &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/demos/HyperLinkFieldImageUrl.aspx&quot; target=&quot;_blank&quot;&gt;Run  Sample&lt;/a&gt; | &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/shared/viewsrc.aspx?path=/aspxtreme/sys/web/ui/webcontrols/demos/HyperLinkFieldImageUrl.aspx.src&quot; target=&quot;_blank&quot; &gt;View Source&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;!-- &lt;p&gt;When the user clicks a hyperlink in the column, the page you specify in the &lt;b&gt;URL&lt;/b&gt; box is invoked. To pass data to the target page, enter a value for the &lt;b&gt;URL Field&lt;/b&gt; box ( the &lt;i&gt;DataNavigateUrlField&lt;/i&gt; property ) specifying the data field you wish to pass and define a format for the URL in the &lt;b&gt;URL Format String&lt;/b&gt; box ( the &lt;b&gt;DataNavigateUrlFormatString&lt;/b&gt; property ). The value of the &lt;b&gt;URL Field&lt;/b&gt; box will be substituted for the token &amp;quot;{0}&amp;quot; of the URL format string at run time. &lt;/p&gt;    &lt;p&gt;If you provide information in the &lt;b&gt;URL Field&lt;/b&gt; box, it is passed to the target page as a query string. In the target page you can get the value passed from the hyperlink by examining the contents of the &lt;b&gt;QueryString&lt;/b&gt; parameter. In a Web Forms page ( .aspx file ), you can do this in the &lt;b&gt;Page_Load&lt;/b&gt; event. The following example shows how you can get the value passed to the target page: &lt;/p&gt;    &lt;pre class=&quot;snippet&quot;&gt;&lt;html&gt;  &lt;head&gt;  &lt;script language=&quot;&amp;quot;C&amp;quot;&quot; runat=&quot;&amp;quot;server&amp;quot;&quot;&gt;     string id;     void Page_Load ( object src, EventArgs e ) {        id = Request.QueryString [ &amp;quot;id&amp;quot; ];     }  &lt;/script&gt;  &lt;/head&gt;  &lt;body&gt;     &lt;h3&gt;Information passed from GridView&lt;/h3&gt;     &lt;p&gt;You selected &lt;u&gt;Item &lt;%= id &gt;&lt;/u&gt;&lt;/p&gt;  &lt;/body&gt;  &lt;/html&gt;&lt;/pre&gt; --&gt;  &lt;p&gt;For additional information, see &lt;a href=&quot;http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/HyperLinkFieldClass.aspx&quot; target=&quot;_blank&quot;&gt;HyperLinkField&lt;/a&gt;  in the class library.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size:78%;&quot;&gt;This Article is copied from URL:http://authors.aspalliance.com/aspxtreme/webforms/controls/addinghyperlinkfieldstogridview.aspx&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size:78%;&quot;&gt;This is for Educational Purposes Only.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/7587834565370698469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2010/05/adding-images-to-hyperlinks-in-grid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/7587834565370698469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/7587834565370698469'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2010/05/adding-images-to-hyperlinks-in-grid.html' title='Adding Images to Hyperlinks in Grid view.'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-4759525574365204864</id><published>2010-05-07T13:05:00.000-07:00</published><updated>2010-05-07T13:07:09.876-07:00</updated><title type='text'>Another Way to Change Gridview Row Color on Mouse-Over</title><content type='html'>A need little feature that can jazz up any Gridview is adding a  color-change when the mouse is over a row. Thanks to our good friend (or  nemesis depending on your point of view) JavaScript, setting up such a  thing is only a few lines of code away.&lt;br /&gt;&lt;br /&gt;First, setup your Gridview. I’m sure you’ve done this thousands of  times, so I won’t bore you with the code of setting up or populating  this guy.  Add an OnRowCreated event to your GridView. This will run for  each row created in your Gridview and allow you to add the necessary  JavaScript. &lt;pre class=&quot;csharpcode&quot;&gt;&lt;asp:gridview id=&quot;&lt;span&quot; class=&quot;str&quot;&gt;&quot;gvNews&quot;&lt;/span&gt;&lt;br /&gt;       runat=&lt;span class=&quot;str&quot;&gt;&quot;server&quot;&lt;/span&gt;&lt;br /&gt;       AutoGenerateColumns=&lt;span class=&quot;str&quot;&gt;&quot;False&quot;&lt;/span&gt;&lt;br /&gt;       DataKeyNames=&lt;span class=&quot;str&quot;&gt;&quot;BlogID&quot;&lt;/span&gt;&lt;br /&gt;       DataSourceID=&lt;span class=&quot;str&quot;&gt;&quot;SqlDataSource1&quot;&lt;/span&gt;&lt;br /&gt;       AllowPaging=&lt;span class=&quot;str&quot;&gt;&quot;True&quot;&lt;/span&gt;&lt;br /&gt;       PageSize=&lt;span class=&quot;str&quot;&gt;&quot;20&quot;&lt;/span&gt;&lt;br /&gt;       BorderStyle=&lt;span class=&quot;str&quot;&gt;&quot;None&quot;&lt;/span&gt;&lt;br /&gt;       BorderWidth=&lt;span class=&quot;str&quot;&gt;&quot;0px&quot;&lt;/span&gt;&lt;br /&gt;       Width=&lt;span class=&quot;str&quot;&gt;&quot;100%&quot;&lt;/span&gt;&lt;br /&gt;       CellPadding=&lt;span class=&quot;str&quot;&gt;&quot;10&quot;&lt;/span&gt;&lt;br /&gt;       CellSpacing=&lt;span class=&quot;str&quot;&gt;&quot;4&quot;&lt;/span&gt;&lt;br /&gt;       ShowHeader=&lt;span class=&quot;str&quot;&gt;&quot;False&quot;&lt;/span&gt;&lt;br /&gt;       OnRowCreated=&lt;span class=&quot;str&quot;&gt;&quot;gvNews_OnRowCreated&quot;&lt;/span&gt;&lt;br /&gt;       &gt;&lt;br /&gt;&lt;/asp:GridView&gt;&lt;/pre&gt; In your code behind, you will need to add a handler for this event. For  my example, I’m using alternating background colors on rows (which you  should do too, it makes things so much more readable). This causes me to  add a couple extra lines so that I make sure I’m setting my rows back  to the correct color on MouseOut. &lt;pre class=&quot;csharpcode&quot;&gt;    &lt;span class=&quot;kwrd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; gvNews_OnRowCreated(&lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt; sender, GridViewRowEventArgs e)&lt;br /&gt;   {&lt;br /&gt;       &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (e.Row.RowType == DataControlRowType.DataRow)&lt;br /&gt;       {&lt;br /&gt;           &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (e.Row.RowState == DataControlRowState.Alternate)&lt;br /&gt;           {&lt;br /&gt;               e.Row.Attributes.Add(&lt;span class=&quot;str&quot;&gt;&quot;onmouseover&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;this.style.backgroundColor=&#39;#FFFFE1&#39;;&quot;&lt;/span&gt;);&lt;br /&gt;               e.Row.Attributes.Add(&lt;span class=&quot;str&quot;&gt;&quot;onmouseout&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;this.style.backgroundColor=&#39;#f7fff8&#39;;&quot;&lt;/span&gt;);&lt;br /&gt;           }&lt;br /&gt;           &lt;span class=&quot;kwrd&quot;&gt;else&lt;/span&gt;&lt;br /&gt;           {&lt;br /&gt;               e.Row.Attributes.Add(&lt;span class=&quot;str&quot;&gt;&quot;onmouseover&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;this.style.backgroundColor=&#39;#FFFFE1&#39;;&quot;&lt;/span&gt;);&lt;br /&gt;               e.Row.Attributes.Add(&lt;span class=&quot;str&quot;&gt;&quot;onmouseout&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;this.style.backgroundColor=&#39;#eefef0&#39;;&quot;&lt;/span&gt;);&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;   }&lt;/pre&gt; That’s all there is to it. If you want to see this in action, check out  the news section on the main page here. &lt;br /&gt;&lt;br /&gt;There is room for improvement here… you could assign a CSS class instead  of hard coding the colors. I believe there is also a way you could also  get the background color that is assigned in the  RowStyle/AlternatingRowStyle section. That would make this much more  portable. &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:78%;&quot;&gt;Copied From :http://www.krissteele.net/blogdetails.aspx?id=78&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:78%;&quot;&gt;Just for Educational Purposes only.&lt;/span&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/4759525574365204864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2010/05/another-way-to-change-gridview-row.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/4759525574365204864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/4759525574365204864'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2010/05/another-way-to-change-gridview-row.html' title='Another Way to Change Gridview Row Color on Mouse-Over'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-4783885434890469278</id><published>2010-05-07T13:02:00.000-07:00</published><updated>2010-05-07T13:04:37.772-07:00</updated><title type='text'>Color Gridview Rows on mouse over.</title><content type='html'>GridView Component had brought some really nice features to the ASP.Net  development. And even those features that it lacks can be easily added  via customization or inheritance.&lt;br /&gt;&lt;br /&gt;One of the things that GridView lacks are all those client-side bells  and whistles that make todays web users happy (or miserable, depending  on how developers over-use them &lt;img alt=&quot;&quot; src=&quot;http://www.aspdotnetfaq.com/fckeditor/editor/images/smiley/msn/wink_smile.gif&quot; /&gt;  ).&lt;br /&gt;&lt;br /&gt;For example, very often it is required to highlight the data rows when  mouse pointer is over the row (Mouse Hover effect).&lt;br /&gt;&lt;br /&gt;This is not something that GridView does by default, but as i said, it  is very easy to add new features to the GridView.&lt;br /&gt;We can add few lines of JavaScript and thats it.&lt;br /&gt;&lt;br /&gt;&lt;u&gt; But to create this effect in a way as it should be done, a little  planning is necessary:&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;If you ask the almighty Google, it will direct you to the various  implementations of this effect for GridView but most of them do not take  into account GridView&#39;s &lt;b&gt;ItemStyle &lt;/b&gt;and &lt;b&gt;AlternatingItemStyle &lt;/b&gt;properties  and just override them when changing row colors.&lt;br /&gt;&lt;br /&gt;What we are going to do is to implement mouse hover row highlighting  with respect of all GridView properties, and restoring their original  values when the mouse pointer is moved away from the rows/GridView.&lt;br /&gt;&lt;br /&gt;In order to highlight the row on mouse hover, we need to add some custom  JavaScript code to &lt;b&gt;onmouseover &lt;/b&gt;and &lt;b&gt;onmouseout &lt;/b&gt;event  handlers of the rows of our GridView.&lt;br /&gt;&lt;br /&gt;We can do this by placing this code to the &lt;b&gt;RowCreated &lt;/b&gt;event  handler of our GridView:&lt;br /&gt;&lt;br /&gt;&lt;!--  {\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue255;\red0\green128\blue0;\red163\green21\blue21;}??\fs20     \cf3 protected\cf0  \cf3 void\cf0  GridView1_RowCreated(\cf3 object\cf0  sender, GridViewRowEventArgs e)\par ??    \{\par ??        \cf4 // only apply changes if its DataRow\par ??\cf0         \cf3 if\cf0  (e.Row.RowType == DataControlRowType.DataRow)\par ??        \{\par ??            \cf4 // when mouse is over the row, save original color to new attribute, and change it to highlight yellow color\par ??\cf0             e.Row.Attributes.Add(\cf5 &quot;onmouseover&quot;\cf0 , \cf5 &quot;this.originalstyle=this.style.backgroundColor;this.style.backgroundColor=&#39;#EEFF00&#39;&quot;\cf0 );\par ??\par ??            \cf4 // when mouse leaves the row, change the bg color to its original value     \par ??\cf0             e.Row.Attributes.Add(\cf5 &quot;onmouseout&quot;\cf0 , \cf5 &quot;this.style.backgroundColor=this.originalstyle;&quot;\cf0 );\par ??        \}\par ??    \}}  --&gt; &lt;div    style=&quot;background-color: white; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:Courier New;font-size:10pt;color:black;&quot;&gt; &lt;div    style=&quot;background-color: white; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:Courier New;font-size:10pt;color:black;&quot;&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;    &lt;span style=&quot;color:blue;&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;void&lt;/span&gt; GridView1_RowCreated(&lt;span style=&quot;color:blue;&quot;&gt;object&lt;/span&gt; sender, &lt;span style=&quot;color: rgb(43, 145, 175);&quot;&gt;GridViewRowEventArgs&lt;/span&gt; e)&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;    {&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;        &lt;span style=&quot;color:green;&quot;&gt;// only  apply changes if its DataRow&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;        &lt;span style=&quot;color:blue;&quot;&gt;if&lt;/span&gt;  (e.Row.RowType == &lt;span style=&quot;color: rgb(43, 145, 175);&quot;&gt;DataControlRowType&lt;/span&gt;.DataRow)&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;        {&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            &lt;span style=&quot;color:green;&quot;&gt;// when  mouse is over the row, save original color to new attribute, and change  it to highlight yellow color&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            e.Row.Attributes.Add(&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;onmouseover&quot;&lt;/span&gt;,&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;          &lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;this.originalstyle=this.style.backgroundColor;this.style.backgroundColor=&#39;#EEFF00&#39;&quot;&lt;/span&gt;);&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt; &lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            &lt;span style=&quot;color:green;&quot;&gt;// when  mouse leaves the row, change the bg color to its original value     &lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            e.Row.Attributes.Add(&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;onmouseout&quot;&lt;/span&gt;,&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            &lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;this.style.backgroundColor=this.originalstyle;&quot;&lt;/span&gt;);&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;        }&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;    }&lt;/p&gt; &lt;/div&gt; &lt;/div&gt;&lt;br /&gt;What this code actually does?&lt;br /&gt;&lt;br /&gt;&lt;b&gt; RowCreated&lt;/b&gt; event is fired immediately after each row is created  in our GridView. So for each created row, we first check if its a  DataRow (not Header of Footer for example) and if it is, we add the  JavaScript code via Add method of the Attributes collection  (AttributeCollection type) that has name-value pairs of the rendering  attributes of the GridViewRow.&lt;br /&gt;&lt;br /&gt;In onmouseover handler code, we first store (for later restoring) the  original background color of the row in a custom attribute we called  &quot;originalstyle&quot; and we then change it to a custom color (light Yellow in  this case).&lt;br /&gt;&lt;br /&gt;In onmouseout handler, we restore the original background color of the  row from the &quot;originalstyle&quot; attribute.&lt;br /&gt;&lt;br /&gt;And that is it. If you bind this GridView with some data and display it  on a page, when you move your mouse pointer over any of the rows, it  will change its background  color into Yellow. And when you move mouse  out of the row, the original background color of the row is restored.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;IMPORTANT:&lt;/span&gt; This works  correctly even if you have set the AlternatingRowStyle of the GridView  and even if the row was previously selected (this detail is something  that is missing in all other implementations of this GridView behavior  we have seen on the internet).&lt;br /&gt;&lt;br /&gt;Ok, now that we solved this, why not make a custom WebControl out of it  by inheriting the original ASP.NET GridView control and adding  highlighting feature to it?&lt;br /&gt;&lt;br /&gt;Its really simple, here is the code of the HoverGridView custom  WebControl:&lt;br /&gt;&lt;br /&gt;&lt;!--  {\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red0\green0\blue0;\red128\green128\blue128;\red0\green128\blue0;\red43\green145\blue175;\red163\green21\blue21;}??\fs20 \cf1 using\cf0  System;\par ??\cf1 using\cf0  System.Data;\par ??\cf1 using\cf0  System.Configuration;\par ??\cf1 using\cf0  System.Web;\par ??\cf1 using\cf0  System.Web.Security;\par ??\cf1 using\cf0  System.Web.UI;\par ??\cf1 using\cf0  System.Web.UI.WebControls;\par ??\cf1 using\cf0  System.Web.UI.WebControls.WebParts;\par ??\cf1 using\cf0  System.Web.UI.HtmlControls;\par ??\cf1 using\cf0  System.Drawing;\par ??\par ??\cf4 ///\cf5  \cf4 &lt;summary&gt;\par ??///\cf5  Summary description for HoverGridView\par ??\cf4 ///\cf5  \cf4 &lt;/summary&gt;\par ??\par ??\cf1 namespace\cf0  Roboblob.WebControls\par ??\{\par ??\par ??    [\cf6 ToolboxData\cf0 (\cf7 &quot;&lt;\{0\}:HoverGridView runat=server&gt;&lt;/\{0\}:HoverGridView&gt;&quot;\cf0 )]\par ??    \cf1 public\cf0  \cf1 class\cf0  \cf6 HoverGridView\cf0  : System.Web.UI.WebControls.\cf6 GridView\par ??\cf0     \{\par ??        \cf1 public\cf0  \cf1 bool\cf0  MouseHoverRowHighlightEnabled\par ??        \{\par ??            \cf1 get\par ??\cf0             \{\par ??                \cf1 if\cf0  (ViewState[\cf7 &quot;MouseHoverRowHighlightEnabled&quot;\cf0 ] != \cf1 null\cf0 )\par ??                    \cf1 return\cf0  (\cf1 bool\cf0 )ViewState[\cf7 &quot;MouseHoverRowHighlightEnabled&quot;\cf0 ];\par ??                \cf1 else\par ??\cf0                     \cf1 return\cf0  \cf1 false\cf0 ;\par ??            \}\par ??            \cf1 set\cf0  \{ ViewState[\cf7 &quot;MouseHoverRowHighlightEnabled&quot;\cf0 ] = \cf1 value\cf0 ; \}\par ??        \}\par ??\par ??        \cf1 public\cf0  \cf6 Color\cf0  RowHighlightColor\par ??        \{\par ??            \cf1 get\par ??\cf0             \{\par ??                \cf1 if\cf0  (ViewState[\cf7 &quot;RowHighlightColor&quot;\cf0 ] != \cf1 null\cf0 )\par ??                    \cf1 return\cf0  (\cf6 Color\cf0 )ViewState[\cf7 &quot;RowHighlightColor&quot;\cf0 ];\par ??                \cf1 else\par ??\cf0                     \cf1 return\cf0  \cf6 Color\cf0 .Yellow;\par ??            \}\par ??            \cf1 set\cf0  \{ ViewState[\cf7 &quot;RowHighlightColor&quot;\cf0 ] = \cf1 value\cf0 ; \}\par ??\par ??        \}\par ??\par ??        \cf1 protected\cf0  \cf1 override\cf0  \cf1 void\cf0  OnRowCreated(\cf6 GridViewRowEventArgs\cf0  e)\par ??        \{\par ??            \cf1 base\cf0 .OnRowCreated(e);\par ??\par ??            \cf1 if\cf0  (MouseHoverRowHighlightEnabled)\par ??            \{\par ??                \cf5 // only apply changes if its DataRow\par ??\cf0                 \cf1 if\cf0  (e.Row.RowType == \cf6 DataControlRowType\cf0 .DataRow)\par ??                \{\par ??                    \cf5 // when mouse is over the row, save original color to new attribute, and change it to highlight yellow color\par ??\cf0                     e.Row.Attributes.Add(\cf7 &quot;onmouseover&quot;\cf0 , \cf1 string\cf0 .Format(\cf7 &quot;this.originalstyle=this.style.backgroundColor;this.style.backgroundColor=&#39;\{0\}&#39;&quot;\cf0 ,\cf6 ColorTranslator\cf0 .ToHtml(RowHighlightColor)));\par ??\par ??                    \cf5 // when mouse leaves the row, change the bg color to its original value     \par ??\cf0                     e.Row.Attributes.Add(\cf7 &quot;onmouseout&quot;\cf0 , \cf7 &quot;this.style.backgroundColor=this.originalstyle;&quot;\cf0 );\par ??                \}\par ??            \}\par ??        \}\par ??\par ??    \}\par ??    \par ??\}}  --&gt; &lt;div    style=&quot;background-color: white; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:Courier New;font-size:10pt;color:black;&quot;&gt; &lt;div    style=&quot;background-color: white; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:Courier New;font-size:10pt;color:black;&quot;&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;using&lt;/span&gt; System;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;using&lt;/span&gt;  System.Data;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;using&lt;/span&gt;  System.Configuration;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;using&lt;/span&gt;  System.Web;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;using&lt;/span&gt;  System.Web.Security;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;using&lt;/span&gt;  System.Web.UI;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;using&lt;/span&gt;  System.Web.UI.WebControls;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;using&lt;/span&gt;  System.Web.UI.WebControls.WebParts;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;using&lt;/span&gt;  System.Web.UI.HtmlControls;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;using&lt;/span&gt;  System.Drawing;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt; &lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:gray;&quot;&gt;///&lt;/span&gt;&lt;span style=&quot;color:green;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;&lt;summary&gt;&lt;/summary&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:gray;&quot;&gt;///&lt;/span&gt;&lt;span style=&quot;color:green;&quot;&gt; Summary description for HoverGridView&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:gray;&quot;&gt;///&lt;/span&gt;&lt;span style=&quot;color:green;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:gray;&quot;&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt; &lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;namespace&lt;/span&gt;  Roboblob.WebControls&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;{&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt; &lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;    [&lt;span style=&quot;color: rgb(43, 145, 175);&quot;&gt;ToolboxData&lt;/span&gt;(&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;&lt;{0}:HoverGridView  runat=server&gt;&lt;!--{0}:HoverGridView--&gt;&quot;&lt;/span&gt;)]&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;    &lt;span style=&quot;color:blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: rgb(43, 145, 175);&quot;&gt;HoverGridView&lt;/span&gt; : System.Web.UI.WebControls.&lt;span style=&quot;color: rgb(43, 145, 175);&quot;&gt;GridView&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;    {&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;        &lt;span style=&quot;color:blue;&quot;&gt;public&lt;/span&gt;  &lt;span style=&quot;color:blue;&quot;&gt;bool&lt;/span&gt; MouseHoverRowHighlightEnabled&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;        {&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            &lt;span style=&quot;color:blue;&quot;&gt;get&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            {&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                &lt;span style=&quot;color:blue;&quot;&gt;if&lt;/span&gt;  (ViewState[&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;MouseHoverRowHighlightEnabled&quot;&lt;/span&gt;]  != &lt;span style=&quot;color:blue;&quot;&gt;null&lt;/span&gt;)&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                    &lt;span style=&quot;color:blue;&quot;&gt;return&lt;/span&gt;  (&lt;span style=&quot;color:blue;&quot;&gt;bool&lt;/span&gt;)ViewState[&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;MouseHoverRowHighlightEnabled&quot;&lt;/span&gt;];&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                &lt;span style=&quot;color:blue;&quot;&gt;else&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                    &lt;span style=&quot;color:blue;&quot;&gt;return&lt;/span&gt;  &lt;span style=&quot;color:blue;&quot;&gt;false&lt;/span&gt;;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            }&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            &lt;span style=&quot;color:blue;&quot;&gt;set&lt;/span&gt;  { ViewState[&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;MouseHoverRowHighlightEnabled&quot;&lt;/span&gt;]  = &lt;span style=&quot;color:blue;&quot;&gt;value&lt;/span&gt;; }&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;        }&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt; &lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;        &lt;span style=&quot;color:blue;&quot;&gt;public&lt;/span&gt;  &lt;span style=&quot;color: rgb(43, 145, 175);&quot;&gt;Color&lt;/span&gt; RowHighlightColor&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;        {&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            &lt;span style=&quot;color:blue;&quot;&gt;get&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            {&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                &lt;span style=&quot;color:blue;&quot;&gt;if&lt;/span&gt;  (ViewState[&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;RowHighlightColor&quot;&lt;/span&gt;]  != &lt;span style=&quot;color:blue;&quot;&gt;null&lt;/span&gt;)&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                    &lt;span style=&quot;color:blue;&quot;&gt;return&lt;/span&gt;  (&lt;span style=&quot;color: rgb(43, 145, 175);&quot;&gt;Color&lt;/span&gt;)ViewState[&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;RowHighlightColor&quot;&lt;/span&gt;];&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                &lt;span style=&quot;color:blue;&quot;&gt;else&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                {&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                    &lt;span style=&quot;color:green;&quot;&gt;//  default color&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                    &lt;span style=&quot;color:blue;&quot;&gt;return&lt;/span&gt;  &lt;span style=&quot;color: rgb(43, 145, 175);&quot;&gt;Color&lt;/span&gt;.Yellow;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                }&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            }&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            &lt;span style=&quot;color:blue;&quot;&gt;set&lt;/span&gt;  { ViewState[&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;RowHighlightColor&quot;&lt;/span&gt;]  = &lt;span style=&quot;color:blue;&quot;&gt;value&lt;/span&gt;; }&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt; &lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;        }&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt; &lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;        &lt;span style=&quot;color:blue;&quot;&gt;protected&lt;/span&gt;  &lt;span style=&quot;color:blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color:blue;&quot;&gt;void&lt;/span&gt;  OnRowCreated(&lt;span style=&quot;color: rgb(43, 145, 175);&quot;&gt;GridViewRowEventArgs&lt;/span&gt;  e)&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;        {&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            &lt;span style=&quot;color:blue;&quot;&gt;base&lt;/span&gt;.OnRowCreated(e);&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt; &lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            &lt;span style=&quot;color:blue;&quot;&gt;if&lt;/span&gt;  (MouseHoverRowHighlightEnabled)&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            {&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                &lt;span style=&quot;color:green;&quot;&gt;//  only apply changes if its DataRow&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                &lt;span style=&quot;color:blue;&quot;&gt;if&lt;/span&gt;  (e.Row.RowType == &lt;span style=&quot;color: rgb(43, 145, 175);&quot;&gt;DataControlRowType&lt;/span&gt;.DataRow)&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                {&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                    &lt;span style=&quot;color:green;&quot;&gt;//  when mouse is over the row, save original color to new attribute&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                    &lt;span style=&quot;color:green;&quot;&gt;//  and change it to highlight yellow color&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                    e.Row.Attributes.Add(&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;onmouseover&quot;&lt;/span&gt;,&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                    &lt;span style=&quot;color:blue;&quot;&gt;string&lt;/span&gt;.Format(&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;this.originalstyle=this.style.backgroundColor;this.style.backgroundColor=&#39;{0}&#39;&quot;&lt;/span&gt;,&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                    &lt;span style=&quot;color: rgb(43, 145, 175);&quot;&gt;ColorTranslator&lt;/span&gt;.ToHtml(RowHighlightColor)));&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt; &lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                    &lt;span style=&quot;color:green;&quot;&gt;//  when mouse leaves the row, change the bg color to its original value      &lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                    e.Row.Attributes.Add(&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;onmouseout&quot;&lt;/span&gt;,&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                    &lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;this.style.backgroundColor=this.originalstyle;&quot;&lt;/span&gt;);&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;                }&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;            }&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;        }&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt; &lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;    }&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt; &lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;}&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; And here is how to use this custom WebControl on a WebForm:&lt;br /&gt;&lt;br /&gt;First we must register it on the top of our aspx page:&lt;br /&gt;&lt;br /&gt;&lt;div    style=&quot;background-color: white; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:Courier New;font-size:10pt;color:black;&quot;&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;  &lt;&lt;/span&gt;%&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;Register&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;Namespace&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;Roboblob.WebControls&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;TagPrefix&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;roboblob&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;%&lt;span style=&quot;color:blue;&quot;&gt;&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;&lt;br /&gt;And when we place our custom GridView on the form here is how its  declaration looks like:&lt;br /&gt;&lt;br /&gt;&lt;div    style=&quot;background-color: white; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:Courier New;font-size:10pt;color:black;&quot;&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;  &lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;roboblob:HoverGridView&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;server&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;MouseHoverRowHighlightEnabled&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;True&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;RowHighlightColor&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;Green&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;HoverGridView1&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;AutoGenerateColumns&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;False&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;DataKeyNames&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;id&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;DataSourceID&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;SqlDataSource1&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;    &lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;Columns&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;      &lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;asp:CommandField&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;ShowSelectButton&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;True&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;      &lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;asp:BoundField&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;DataField&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;id&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;HeaderText&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;id&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;InsertVisible&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;False&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;ReadOnly&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;True&lt;/span&gt;&quot;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;SortExpression&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;id&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;      &lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;asp:BoundField&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;DataField&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;name&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;HeaderText&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;name&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red;&quot;&gt;SortExpression&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt;name&lt;/span&gt;&quot;&lt;span style=&quot;color:blue;&quot;&gt; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;    &lt;!--&lt;/span--&gt;&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;Columns&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;  &lt;!--&lt;/span--&gt;&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;roboblob:HoverGridView&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;&lt;br /&gt;As you can see its really only a few lines of code, and yet we have  created a custom WebControl that we can place on any WebForm, switch the  highlighting on/off, change the highlight color etc.&lt;br /&gt;&lt;br /&gt;This is the beauty of creating and using WebControls and Controls in  general...&lt;br /&gt;&lt;br /&gt;We could add many other features to our custom GridView, like different  colors for alternating rows, for selected rows etc but i will leave that  as something for you to play with.&lt;br /&gt;&lt;br /&gt;Have fun!&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:78%;&quot;&gt;Copied From : http://www.aspdotnetfaq.com/Faq/How-to-correctly-highlight-GridView-rows-on-Mouse-Hover-in-ASP-NET.aspx&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/4783885434890469278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2010/05/color-gridview-rows-on-mouse-over.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/4783885434890469278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/4783885434890469278'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2010/05/color-gridview-rows-on-mouse-over.html' title='Color Gridview Rows on mouse over.'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-1542075813575968680</id><published>2009-11-25T09:05:00.001-08:00</published><updated>2009-11-25T09:07:07.372-08:00</updated><title type='text'>Color Tabs of a Tabcontrol using VB.NET</title><content type='html'>In order to color the tabs of the tabcontrol in vb.net&lt;br /&gt;&lt;br /&gt;just drop a tab control on a form with DrawMode = OwnerDrawFixed and put a couple of tab pages in it&lt;br /&gt;&lt;br /&gt;   1.&lt;br /&gt;      Private Sub TabControl1_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles TabControl1.DrawItem&lt;br /&gt;   2.&lt;br /&gt;   3.&lt;br /&gt;              &#39;Firstly we&#39;ll define some parameters.&lt;br /&gt;   4.&lt;br /&gt;              Dim CurrentTab As TabPage = TabControl1.TabPages(e.Index)&lt;br /&gt;   5.&lt;br /&gt;              Dim ItemRect As Rectangle = TabControl1.GetTabRect(e.Index)&lt;br /&gt;   6.&lt;br /&gt;              Dim FillBrush As New SolidBrush(Color.Red)&lt;br /&gt;   7.&lt;br /&gt;              Dim TextBrush As New SolidBrush(Color.White)&lt;br /&gt;   8.&lt;br /&gt;              Dim sf As New StringFormat&lt;br /&gt;   9.&lt;br /&gt;              sf.Alignment = StringAlignment.Center&lt;br /&gt;  10.&lt;br /&gt;              sf.LineAlignment = StringAlignment.Center&lt;br /&gt;  11.&lt;br /&gt;  12.&lt;br /&gt;              &#39;If we are currently painting the Selected TabItem we&#39;ll&lt;br /&gt;  13.&lt;br /&gt;              &#39;change the brush colors and inflate the rectangle.&lt;br /&gt;  14.&lt;br /&gt;              If CBool(e.State And DrawItemState.Selected) Then&lt;br /&gt;  15.&lt;br /&gt;                  FillBrush.Color = Color.White&lt;br /&gt;  16.&lt;br /&gt;                  TextBrush.Color = Color.Red&lt;br /&gt;  17.&lt;br /&gt;                  ItemRect.Inflate(2, 2)&lt;br /&gt;  18.&lt;br /&gt;              End If&lt;br /&gt;  19.&lt;br /&gt;  20.&lt;br /&gt;              &#39;Set up rotation for left and right aligned tabs&lt;br /&gt;  21.&lt;br /&gt;              If TabControl1.Alignment = TabAlignment.Left Or TabControl1.Alignment = TabAlignment.Right Then&lt;br /&gt;  22.&lt;br /&gt;                  Dim RotateAngle As Single = 90&lt;br /&gt;  23.&lt;br /&gt;                  If TabControl1.Alignment = TabAlignment.Left Then RotateAngle = 270&lt;br /&gt;  24.&lt;br /&gt;                  Dim cp As New PointF(ItemRect.Left + (ItemRect.Width \ 2), ItemRect.Top + (ItemRect.Height \ 2))&lt;br /&gt;  25.&lt;br /&gt;                  e.Graphics.TranslateTransform(cp.X, cp.Y)&lt;br /&gt;  26.&lt;br /&gt;                  e.Graphics.RotateTransform(RotateAngle)&lt;br /&gt;  27.&lt;br /&gt;                  ItemRect = New Rectangle(-(ItemRect.Height \ 2), -(ItemRect.Width \ 2), ItemRect.Height, ItemRect.Width)&lt;br /&gt;  28.&lt;br /&gt;              End If&lt;br /&gt;  29.&lt;br /&gt;  30.&lt;br /&gt;              &#39;Next we&#39;ll paint the TabItem with our Fill Brush&lt;br /&gt;  31.&lt;br /&gt;              e.Graphics.FillRectangle(FillBrush, ItemRect)&lt;br /&gt;  32.&lt;br /&gt;  33.&lt;br /&gt;              &#39;Now draw the text.&lt;br /&gt;  34.&lt;br /&gt;              e.Graphics.DrawString(CurrentTab.Text, e.Font, TextBrush, RectangleF.op_Implicit(ItemRect), sf)&lt;br /&gt;  35.&lt;br /&gt;  36.&lt;br /&gt;              &#39;Reset any Graphics rotation&lt;br /&gt;  37.&lt;br /&gt;              e.Graphics.ResetTransform()&lt;br /&gt;  38.&lt;br /&gt;  39.&lt;br /&gt;              &#39;Finally, we should Dispose of our brushes.&lt;br /&gt;  40.&lt;br /&gt;              FillBrush.Dispose()&lt;br /&gt;  41.&lt;br /&gt;              TextBrush.Dispose()&lt;br /&gt;  42.&lt;br /&gt;          End Sub</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/1542075813575968680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2009/11/color-tabs-of-tabcontrol-using-vbnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/1542075813575968680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/1542075813575968680'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2009/11/color-tabs-of-tabcontrol-using-vbnet.html' title='Color Tabs of a Tabcontrol using VB.NET'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-2767836673745607753</id><published>2009-11-16T07:14:00.000-08:00</published><updated>2009-11-16T07:17:03.090-08:00</updated><title type='text'>Copy rows from one grid view to another grid view.</title><content type='html'>I haven&#39;t tried this code on my own but my friend used this code to bring this functionality, I just wanted to share so that someone might get benifitted from this code&lt;br /&gt;&lt;br /&gt;The code is in VB.NET&lt;br /&gt;&lt;br /&gt;If (e.Control And e.KeyCode = Keys.V) Then&lt;br /&gt;                Dim s As String = Clipboard.GetText()&lt;br /&gt;                Dim lines As String()&lt;br /&gt;                lines = System.Text.RegularExpressions.Regex.Split(s, Environment.NewLine)&lt;br /&gt;                &#39;Dim row As Integer = dgv.CurrentCell.RowIndex&lt;br /&gt;                &#39;Dim col As Integer = dgv.CurrentCell.ColumnIndex&lt;br /&gt;                Dim row, col As Integer&lt;br /&gt;                For intRow As Integer = 0 To dgv.RowCount - 1&lt;br /&gt;                    For intCol As Integer = 0 To dgv.ColumnCount - 1&lt;br /&gt;                        If dgv.Rows(intRow).Cells(intCol).Selected = True Then&lt;br /&gt;                            row = intRow&lt;br /&gt;                            col = intCol&lt;br /&gt;                            Exit For&lt;br /&gt;                        End If&lt;br /&gt;                    Next&lt;br /&gt;                    If Not (row = 0 And col = 0) Then&lt;br /&gt;                        Exit For&lt;br /&gt;                    End If&lt;br /&gt;                Next&lt;br /&gt;                For intNextLine As Integer = 0 To (lines.Length - 1)&lt;br /&gt;                    If (row &lt; dgv.RowCount And lines(intNextLine).Length &gt; 0) Then&lt;br /&gt;                        Dim cells As String() = System.Text.RegularExpressions.Regex.Split(lines(intNextLine), &quot;\t&quot;)&lt;br /&gt;                        For i As Integer = 0 To cells.Length - 1&lt;br /&gt;                            If (col + i &lt; dgv.ColumnCount) Then&lt;br /&gt;                                dgv.Rows(row).Cells(col + i).Value = cells(i)&lt;br /&gt;                            End If&lt;br /&gt;                        Next&lt;br /&gt;                        row = row + 1&lt;br /&gt;                    End If&lt;br /&gt;                Next&lt;br /&gt;            End If</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/2767836673745607753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2009/11/copy-rows-from-one-grid-view-to-another.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/2767836673745607753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/2767836673745607753'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2009/11/copy-rows-from-one-grid-view-to-another.html' title='Copy rows from one grid view to another grid view.'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-306036831913462231</id><published>2009-11-04T09:01:00.001-08:00</published><updated>2009-11-04T09:01:56.406-08:00</updated><title type='text'>Code Sample to Combine two PDF files</title><content type='html'>How To: Combine PDFs Using InsertPages&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Issue&lt;br /&gt;How do I combine multiple PDFs into one PDF using Visual Basic?&lt;br /&gt;Solution&lt;br /&gt;This record contains VisualBasic code to demonstrate AcroExch.PDDoc InsertPages.&lt;br /&gt;&lt;br /&gt;As far as InsertPages is concerned, the tricky part is to remember that the page number you will be inserting after is -1; in other words, you want to insert these pages before page 0, which is the first page of the document. &lt;br /&gt;&lt;br /&gt;Private Sub Command1_Click()&lt;br /&gt;Dim b As Boolean&lt;br /&gt;&lt;br /&gt;Dim AcroPDDoc As CAcroPDDoc&lt;br /&gt;Dim PDDoc As CAcroPDDoc&lt;br /&gt;&lt;br /&gt;Set AcroPDDoc = CreateObject(&quot;AcroExch.PDDoc&quot;)&lt;br /&gt;Set PDDoc = CreateObject(&quot;AcroExch.PDDoc&quot;)&lt;br /&gt;&lt;br /&gt;b = PDDoc.Open(&quot;c:\testinsertpages.pdf&quot;)&lt;br /&gt;b = AcroPDDoc.Open(&quot;c:\Tips.pdf&quot;)&lt;br /&gt;b = AcroPDDoc.InsertPages(0, PDDoc, 0, 1, False)&lt;br /&gt;b = AcroPDDoc.Save(1, &quot;c:\Tips.pdf&quot;)&lt;br /&gt;&lt;br /&gt;End Sub</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/306036831913462231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2009/11/code-sample-to-combine-two-pdf-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/306036831913462231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/306036831913462231'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2009/11/code-sample-to-combine-two-pdf-files.html' title='Code Sample to Combine two PDF files'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-4643846941197660061</id><published>2009-11-02T13:34:00.001-08:00</published><updated>2009-11-02T13:34:59.543-08:00</updated><title type='text'>Combine 2 PDF&#39;s Using vb.net</title><content type='html'>How To: Combine PDFs Using InsertPages&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Issue&lt;br /&gt;How do I combine multiple PDFs into one PDF using Visual Basic?&lt;br /&gt;Solution&lt;br /&gt;This record contains VisualBasic code to demonstrate AcroExch.PDDoc InsertPages.&lt;br /&gt;&lt;br /&gt;As far as InsertPages is concerned, the tricky part is to remember that the page number you will be inserting after is -1; in other words, you want to insert these pages before page 0, which is the first page of the document. &lt;br /&gt;&lt;br /&gt;Private Sub Command1_Click()&lt;br /&gt;Dim b As Boolean&lt;br /&gt;&lt;br /&gt;Dim AcroPDDoc As CAcroPDDoc&lt;br /&gt;Dim PDDoc As CAcroPDDoc&lt;br /&gt;&lt;br /&gt;Set AcroPDDoc = CreateObject(&quot;AcroExch.PDDoc&quot;)&lt;br /&gt;Set PDDoc = CreateObject(&quot;AcroExch.PDDoc&quot;)&lt;br /&gt;&lt;br /&gt;b = PDDoc.Open(&quot;c:\testinsertpages.pdf&quot;)&lt;br /&gt;b = AcroPDDoc.Open(&quot;c:\Tips.pdf&quot;)&lt;br /&gt;b = AcroPDDoc.InsertPages(0, PDDoc, 0, 1, False)&lt;br /&gt;b = AcroPDDoc.Save(1, &quot;c:\Tips.pdf&quot;)&lt;br /&gt;&lt;br /&gt;End Sub</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/4643846941197660061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2009/11/combine-2-pdfs-using-vbnet.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/4643846941197660061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/4643846941197660061'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2009/11/combine-2-pdfs-using-vbnet.html' title='Combine 2 PDF&#39;s Using vb.net'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-3116839337097749582</id><published>2009-11-02T07:08:00.001-08:00</published><updated>2009-11-02T07:08:30.463-08:00</updated><title type='text'>PDF Programming</title><content type='html'>A website for PDF programming help &lt;br /&gt;&lt;br /&gt;Link is &lt;br /&gt;&lt;br /&gt;http://www.nk-inc.com/blog/?page=2</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/3116839337097749582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2009/11/pdf-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/3116839337097749582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/3116839337097749582'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2009/11/pdf-programming.html' title='PDF Programming'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-7954403505019552528</id><published>2009-10-16T09:23:00.000-07:00</published><updated>2009-10-16T09:26:55.219-07:00</updated><title type='text'>Easily Create Loading GIF&#39;s for free</title><content type='html'>Here is a website to create a Loading GIF and save it to your desktop very easily. Give it a try ?? &lt;a href=&quot;http://www.ajaxload.info/&quot;&gt;Click Here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A few samples below are &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuCDsVEerIFtZIBQmc9F2ejyKXx0KcEHjJ9UhwnUYP4YYj5BvKOwS_C2CLiNMJL_K6CAFINXILjSRZotZ08FItWaxagCN-IPjBzAIxKTY2TNZNNX9VafaxWnxcCTLkGZWOl05p_O1wwt_J/s1600-h/LoadingBar.gif&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 220px; height: 19px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuCDsVEerIFtZIBQmc9F2ejyKXx0KcEHjJ9UhwnUYP4YYj5BvKOwS_C2CLiNMJL_K6CAFINXILjSRZotZ08FItWaxagCN-IPjBzAIxKTY2TNZNNX9VafaxWnxcCTLkGZWOl05p_O1wwt_J/s400/LoadingBar.gif&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5393234922120535186&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Another one &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn4XvgdvafYDDgoXzJK9Tx1JN3j1hCMRPCv6J34iKOS8S5ff8HPDWg-iv2p7uSr8ykj92dbFHGcae6irWjlw3C4aJDGtNmhN5El_QwIjuebUva-9d2WjpeFytF8W0qApTNvVZPYA_PMaxz/s1600-h/loading.gif&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 50px; height: 50px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn4XvgdvafYDDgoXzJK9Tx1JN3j1hCMRPCv6J34iKOS8S5ff8HPDWg-iv2p7uSr8ykj92dbFHGcae6irWjlw3C4aJDGtNmhN5El_QwIjuebUva-9d2WjpeFytF8W0qApTNvVZPYA_PMaxz/s400/loading.gif&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5393235086461141650&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/7954403505019552528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2009/10/easily-create-loading-gifs-for-free.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/7954403505019552528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/7954403505019552528'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2009/10/easily-create-loading-gifs-for-free.html' title='Easily Create Loading GIF&#39;s for free'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuCDsVEerIFtZIBQmc9F2ejyKXx0KcEHjJ9UhwnUYP4YYj5BvKOwS_C2CLiNMJL_K6CAFINXILjSRZotZ08FItWaxagCN-IPjBzAIxKTY2TNZNNX9VafaxWnxcCTLkGZWOl05p_O1wwt_J/s72-c/LoadingBar.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-6161157247608622505</id><published>2009-10-14T11:03:00.000-07:00</published><updated>2009-10-14T11:06:51.802-07:00</updated><title type='text'>Disable Autorun of CD&#39;s,Pendrives etc</title><content type='html'>Here is the registry edit that can be done to disable the auto run feature in windows.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Go to RUN type &quot;Regedit&quot;.&lt;/li&gt;&lt;li&gt;Go to Hkey_current_user/Software/Microsoft/windows/currentversion/policies/Explorer&lt;/li&gt;&lt;li&gt;Add DWORD &quot;NoDriveTypeAutoRun&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Edit the Value to Hexadecimal &quot;FF&quot;&lt;/li&gt;&lt;/ol&gt;You are set now the auto run is disabled.</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/6161157247608622505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2009/10/disable-autorun-of-cdspendrives-etc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/6161157247608622505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/6161157247608622505'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2009/10/disable-autorun-of-cdspendrives-etc.html' title='Disable Autorun of CD&#39;s,Pendrives etc'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-4086846291589237568</id><published>2009-10-06T07:45:00.000-07:00</published><updated>2009-10-06T07:47:13.244-07:00</updated><title type='text'>Query to find no of multiple columns</title><content type='html'>SELECT     id, COUNT(id) AS NumOccurrences&lt;br /&gt;FROM         Driver_History&lt;br /&gt;GROUP BY id&lt;br /&gt;HAVING      (COUNT(id) = 2)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This above query gives all the rows that have same id&#39;s.</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/4086846291589237568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2009/10/query-to-find-no-of-multiple-columns.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/4086846291589237568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/4086846291589237568'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2009/10/query-to-find-no-of-multiple-columns.html' title='Query to find no of multiple columns'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-4867798047937429026</id><published>2009-09-28T13:00:00.001-07:00</published><updated>2009-09-28T13:04:44.897-07:00</updated><title type='text'>Connection Strings Made easy .</title><content type='html'>Visit this website for various connection strings such as to connect to Access,Excel etc...&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.connectionstrings.com&quot; target = &quot;_blank&quot;&gt; Click Here &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Once you get the connection string it is similar to any other database access. use ole db connection objects.</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/4867798047937429026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2009/09/connection-strings-made-easy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/4867798047937429026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/4867798047937429026'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2009/09/connection-strings-made-easy.html' title='Connection Strings Made easy .'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-1147493147610940608</id><published>2009-09-25T08:59:00.001-07:00</published><updated>2009-09-25T09:01:01.001-07:00</updated><title type='text'>Get Open Dialog to browse system files</title><content type='html'>The OpenFileDialog class is defined in Windows.Forms class.  You need to add to reference to System.Windows.Form.dll library and call using System.Windows.Forms before using the class.&lt;br /&gt;&lt;br /&gt;The OpenFileDialog class can be used to open a file similar to CFileDialog &#39;s Open method in VC++. This class is derived from FileDialog. OpenFile method of this class opens a file which can be read by a steam.&lt;br /&gt;&lt;br /&gt;In this sample code, I have use OpenFileDialog class to browse a file. &lt;br /&gt;&lt;br /&gt;Private fdlg As OpenFileDialog = New OpenFileDialog()&lt;br /&gt;Private fdlg.Title = &quot;C# Corner Open File Dialog&quot;&lt;br /&gt;Private fdlg.InitialDirectory = &quot;c:\&quot;&lt;br /&gt;Private fdlg.Filter = &quot;All files (*.*)|*.*|All files (*.*)|*.*&quot;&lt;br /&gt;Private fdlg.FilterIndex = 2&lt;br /&gt;Private fdlg.RestoreDirectory = True&lt;br /&gt;If fdlg.ShowDialog() = DialogResult.OK Then&lt;br /&gt;textBox1.Text = fdlg.FileName&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;Title member let you set the title of the open dialog. Filter member let you set a filter for types of files to open.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglj6Zhnv00VWywtuH1T7T639aPrgTZvJwlehvsbNZQ518hbH2jbR_KB7iWGFwHngH-atEvnkviQBIvbg68XTxea7lkprnUccUlbjP0nWtp150ExHqPAfy2P7ZnFnsAtVqEViD_bOa0P4BJ/s1600-h/browse11.gif&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 247px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglj6Zhnv00VWywtuH1T7T639aPrgTZvJwlehvsbNZQ518hbH2jbR_KB7iWGFwHngH-atEvnkviQBIvbg68XTxea7lkprnUccUlbjP0nWtp150ExHqPAfy2P7ZnFnsAtVqEViD_bOa0P4BJ/s400/browse11.gif&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5385435536485391618&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/1147493147610940608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2009/09/get-open-dialog-to-browse-system-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/1147493147610940608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/1147493147610940608'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2009/09/get-open-dialog-to-browse-system-files.html' title='Get Open Dialog to browse system files'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglj6Zhnv00VWywtuH1T7T639aPrgTZvJwlehvsbNZQ518hbH2jbR_KB7iWGFwHngH-atEvnkviQBIvbg68XTxea7lkprnUccUlbjP0nWtp150ExHqPAfy2P7ZnFnsAtVqEViD_bOa0P4BJ/s72-c/browse11.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-8408603153323145173</id><published>2009-09-13T09:52:00.000-07:00</published><updated>2009-09-13T10:00:52.983-07:00</updated><title type='text'>Delete Duplicate Rows in SQL Server.</title><content type='html'>Deleting duplicate rows in SQL Server&lt;br /&gt;&lt;br /&gt;--1.Deleting rows from a table having primary key&lt;br /&gt;&lt;br /&gt;CREATE TABLE TEST1&lt;br /&gt;( ID INT NOT NULL PRIMARY KEY&lt;br /&gt;  ,VALUE CHAR(2)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;INSERT INTO dbo.TEST1 SELECT &#39;1&#39;,&#39;A&#39; UNION ALL SELECT &#39;2&#39;,&#39;A&#39; UNION ALL SELECT &#39;3&#39;,&#39;A&#39; UNION ALL SELECT &#39;4&#39;,&#39;B&#39; UNION ALL SELECT &#39;5&#39;,&#39;B&#39; UNION ALL SELECT &#39;6&#39;,&#39;B&#39;&lt;br /&gt;&lt;br /&gt;The original table with duplicates&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUycpORNy6hXzUETkxUOdUD20S8jdfX0tjMhOCz_QO014yVxo3GPAAWpYKxTEDgO8EEV-phBxmoUN6XrbtCfud5PaDoGJ2q9z5sCxgweLPeyhIxLVPMPxH53cMGGG7NWBpGkOZ-ulamgS2/s1600-h/table1.bmp&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 106px; height: 134px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUycpORNy6hXzUETkxUOdUD20S8jdfX0tjMhOCz_QO014yVxo3GPAAWpYKxTEDgO8EEV-phBxmoUN6XrbtCfud5PaDoGJ2q9z5sCxgweLPeyhIxLVPMPxH53cMGGG7NWBpGkOZ-ulamgS2/s200/table1.bmp&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5380996540762234562&quot; /&gt;&lt;/a&gt;&lt;br /&gt;DELETE FROM dbo.TEST1 WHERE ID NOT IN (SELECT MIN(ID) FROM dbo.TEST1 GROUP BY VALUE)&lt;br /&gt;&lt;br /&gt;Now the resulting table with no duplicate rows&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipQbnbE7yc1kaLRahMTTzWmmrq1vTLOW0xDVAZFgxpQbR2-KOxbq8Bq-MK6AmRkJuRUw3WEt5PJHPFK2P18NqxcubmJN7VfCS9G7AathRz_Hcj3q67AxY-_U8W5mX3EBdPhWXK36BdLkfS/s1600-h/table2.bmp&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 105px; height: 61px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipQbnbE7yc1kaLRahMTTzWmmrq1vTLOW0xDVAZFgxpQbR2-KOxbq8Bq-MK6AmRkJuRUw3WEt5PJHPFK2P18NqxcubmJN7VfCS9G7AathRz_Hcj3q67AxY-_U8W5mX3EBdPhWXK36BdLkfS/s200/table2.bmp&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5380996845833144098&quot; /&gt;&lt;/a&gt;&lt;br /&gt;2. Deleting rows from a table without a primary key&lt;br /&gt;&lt;br /&gt;I have a table dbo.MYDATABASE with following data---&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFIximS9ox15AK-GVmdltKz1OeNvK_vHmUxCjH7jOip4PyWw0edkvIFPcAk4i1jYu5JQt_nLOkY2YvyQjlp9ujw8SHAtjdNO3ygOMUXe_kPJfgF559BVlkHCV2V3uy9uopecHbhIiURxu8/s1600-h/table3.bmp&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 59px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFIximS9ox15AK-GVmdltKz1OeNvK_vHmUxCjH7jOip4PyWw0edkvIFPcAk4i1jYu5JQt_nLOkY2YvyQjlp9ujw8SHAtjdNO3ygOMUXe_kPJfgF559BVlkHCV2V3uy9uopecHbhIiURxu8/s400/table3.bmp&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5380997820375040514&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;now deleting the duplicate rows using ROW_NUMBER()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;WITH TEMP_TABLE AS ( SELECT ROW_NUMBER() OVER( PARTITION BY CUSTID ORDER BY CustID ) AS ROWNUMBER,* FROM dbo.MYDATABASE )&lt;br /&gt;&lt;br /&gt;DELETE FROM TEMP_TABLE WHERE ROWNUMBER &gt; 1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The result looks like&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYpbs5TXAOJ13gz8IldTtRt-BoWNbZ2OEz678V215mh7eHzoTYmN5qzOrIiyIh2H7QHD8gK11rdfsoez31pFabpI-lHyyBzTOcVYzDvIQCP04XSv4rOOQbxCiwgM_z6PWmO3NXbdT4_TIK/s1600-h/table4.bmp&quot;&gt;&lt;img style=&quot;float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 107px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYpbs5TXAOJ13gz8IldTtRt-BoWNbZ2OEz678V215mh7eHzoTYmN5qzOrIiyIh2H7QHD8gK11rdfsoez31pFabpI-lHyyBzTOcVYzDvIQCP04XSv4rOOQbxCiwgM_z6PWmO3NXbdT4_TIK/s400/table4.bmp&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5380998025153516834&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/8408603153323145173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2009/09/delete-duplicate-rows-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/8408603153323145173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/8408603153323145173'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2009/09/delete-duplicate-rows-in-sql-server.html' title='Delete Duplicate Rows in SQL Server.'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUycpORNy6hXzUETkxUOdUD20S8jdfX0tjMhOCz_QO014yVxo3GPAAWpYKxTEDgO8EEV-phBxmoUN6XrbtCfud5PaDoGJ2q9z5sCxgweLPeyhIxLVPMPxH53cMGGG7NWBpGkOZ-ulamgS2/s72-c/table1.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7105475797094350105.post-2654525737180764645</id><published>2009-09-10T13:19:00.001-07:00</published><updated>2009-09-10T13:20:25.224-07:00</updated><title type='text'>Visual Studio Debug skips the break point</title><content type='html'>&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;The main issue i found out is the problem with the browser. (IE8)&lt;/span&gt;&lt;br /&gt;IE 8 has a feature called Loosely-Coupled Internet Explorer (LCIE) which results in IE running across multiple processes.&lt;br /&gt;http://www.microsoft.com/windows/internet-explorer/beta/readiness/developers-existing.aspx#lcie&lt;br /&gt;&lt;br /&gt;Older versions of the Visual Studio Debugger get confused by this and cannot figure out how to attach to the correct process.  You can work around this by disabling the process growth feature of LCIE.  Here&#39;s how:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 102, 0);&quot;&gt;1)  Open RegEdit&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 102, 0);&quot;&gt;2)  Browse to HKEY_LOCALMACHINE -&gt; SOFTWARE -&gt; Microsoft -&gt; Internet Explorer -&gt; Main&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 102, 0);&quot;&gt;3)  Add a dword under this key called TabProcGrowth&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 102, 0);&quot;&gt;4)  Set TabProcGrowth to 0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Since you are running on Windows Server 2003, this is all you should need to do.  If you run into the same problem on Vista or newer, you will also need to turn off protected mode.</content><link rel='replies' type='application/atom+xml' href='http://manojbavikati.blogspot.com/feeds/2654525737180764645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://manojbavikati.blogspot.com/2009/09/visual-studio-debug-skips-break-point.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/2654525737180764645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7105475797094350105/posts/default/2654525737180764645'/><link rel='alternate' type='text/html' href='http://manojbavikati.blogspot.com/2009/09/visual-studio-debug-skips-break-point.html' title='Visual Studio Debug skips the break point'/><author><name>Manoj B</name><uri>http://www.blogger.com/profile/16929393396256257142</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>