<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-36333526</id><updated>2011-12-09T18:14:01.120+05:30</updated><category term='aboutthisblog'/><category term='AJAX'/><category term='BlogPost'/><category term='Support'/><category term='Game Programming'/><category term='SQL'/><category term='General'/><category term='Javascript'/><category term='Silverlight'/><category term='ASP.NET'/><category term='.NET'/><category term='Utilities'/><title type='text'>Ashutosh Vyas's Blog</title><subtitle type='html'>My day to day experiences with .NET</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-36333526.post-6076040946801924923</id><published>2011-08-10T01:05:00.002+05:30</published><updated>2011-08-10T01:12:48.947+05:30</updated><title type='text'>Failed to generate a user instance of SQL Server</title><content type='html'>OK.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I know the updates have been real slow... Its more like I am a touch too busy to go on and update the blog. But.... lets pick it up once again and try to revive it...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is the one for today !! I was working on a small VS2010 WPF Application when I came across this weird error. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;b&gt;Failed to generate a user instance of SQL Server due to a failure in  starting the process for the user instance. The connection will be closed.&lt;/b&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Searched a bit around the net and found a lot of solutions to it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The most un-convincing one did the trick.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Goto the below location in WIndows Explorer&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;C:\Users\&lt;username&gt;\AppData\Local\Microsoft\Microsoft SQL Server Data&lt;/username&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Delete the folder SQLExpress.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NJoy !!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-6076040946801924923?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/6076040946801924923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2011/08/failed-to-generate-user-instance-of-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/6076040946801924923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/6076040946801924923'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2011/08/failed-to-generate-user-instance-of-sql.html' title='Failed to generate a user instance of SQL Server'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-2218667793385959442</id><published>2010-10-19T23:12:00.003+05:30</published><updated>2010-10-19T23:27:16.284+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>Unable to cast object of type System.Data.DataRowView to type System.IConvertible</title><content type='html'>&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Wow...&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Long time.. A lot of distractions. I have been interested in a lot new things. With Windows Phone, Robotics coming into picture, the hobbies and pass-times all changed around.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;But to get back on the track.. Here is a very small piece of information that I am sure would help a lot of people.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;I encountered the above error while working with a Combobox in a Windows Application.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;This would come up every time the form loads and the the SelectedValue of the combobox was selected.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;This normally would occur to comboboxes, which are databound.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;So here is the problem and the solution.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;This is how we usually bind the combobox to data&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; color: rgb(51, 51, 51); font-size: 13px; line-height: 16px; "&gt;&lt;p style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; list-style-type: none; text-decoration: none; line-height: normal; "&gt;&lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: 'Courier New'; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10pt; "&gt;cboBox.DataSource = data_set.Tables[&lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(163, 21, 21); "&gt;"table_name"&lt;/span&gt;].DefaultView;&lt;/span&gt;&lt;/p&gt;&lt;p style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; list-style-type: none; text-decoration: none; line-height: normal; "&gt;&lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: 'Courier New'; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10pt; "&gt;cboBox.DisplayMember = &lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(163, 21, 21); "&gt;"field_name"&lt;/span&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; list-style-type: none; text-decoration: none; line-height: normal; "&gt;&lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: 'Courier New'; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10pt; "&gt;cboBox.ValueMember = &lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(163, 21, 21); "&gt;"field_id"&lt;/span&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; list-style-type: none; text-decoration: none; line-height: normal; "&gt;&lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: 'Courier New'; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10pt; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; list-style-type: none; text-decoration: none; line-height: normal; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Instead, to resolve this issue all we need to do is first specify the DisplayMember and ValueMember and then Bind.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; list-style-type: none; text-decoration: none; line-height: normal; "&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; list-style-type: none; text-decoration: none; line-height: normal; "&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Georgia, serif; font-size: 16px; "&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 16px; "&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="Apple-style-span"&gt;&lt;p style="border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; list-style-type: none; text-decoration: none; line-height: normal; "&gt;&lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: 'Courier New'; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10pt; "&gt;cboBox.DisplayMember = &lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(163, 21, 21); "&gt;"field_name"&lt;/span&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p style="border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; list-style-type: none; text-decoration: none; line-height: normal; "&gt;&lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: 'Courier New'; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10pt; "&gt;cboBox.ValueMember = &lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(163, 21, 21); "&gt;"field_id"&lt;/span&gt;;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: 'Courier New'; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10pt; "&gt;&lt;span class="Apple-style-span" style="line-height: normal; "&gt;cboBox.DataSource = data_set.Tables[&lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(163, 21, 21); "&gt;"table_name"&lt;/span&gt;].DefaultView;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: 'Courier New'; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10pt; "&gt;&lt;span class="Apple-style-span" style="line-height: normal; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-family: 'Courier New'; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10pt; "&gt;&lt;span class="Apple-style-span" style="line-height: normal; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-2218667793385959442?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/2218667793385959442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2010/10/unable-to-cast-object-of-type.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/2218667793385959442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/2218667793385959442'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2010/10/unable-to-cast-object-of-type.html' title='Unable to cast object of type System.Data.DataRowView to type System.IConvertible'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-3300088239966271107</id><published>2010-04-06T13:41:00.003+05:30</published><updated>2010-04-06T13:50:49.845+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>App_Offline.htm</title><content type='html'>&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Phheeewwwww,&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Back after a looong time. Its all been busy so long and was not able to post here something for long.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Now.... I have something to post + I have the time. So here we go....&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Learnt a new concept today - App_Offline.htm.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51); line-height: 18px; "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;There is a simple way to bring down your ASP.NET 2.0 application. The only thing you have to do is to create simple html file called &lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;App_offline.htm&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; and deploy it to your ASP.NET 2.0 web application root directory. The rest is handled by ASP.NET runtime internal routines&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:verdana;color:#333333;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:verdana;color:#333333;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 18px;"&gt;This approach is extremely helpful for scenarios where we need to bring down the application instantly for some quick updates or any other purpose.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:verdana;color:#333333;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:verdana;color:#333333;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px; "&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, sans-serif; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;It stops processing new incomming requests and serves the contents of this &lt;/span&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;App_offline.htm&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; file.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, sans-serif;color:#333333;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, sans-serif;color:#333333;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Since the whole application domain is unloaded, all application files and assemblies are unlocked and we can make any necessary changes. When done with the changes, all we need to do is rename or delete &lt;/span&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;App_offline.htm&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; file and the next incoming request will bring the ASP.NET 2.0 web application back online.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, sans-serif;color:#333333;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, sans-serif;color:#333333;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 18px;"&gt;There is also one great use of this. In order to unlock any attached Database files. This way, they are released and unlocked to be copied over anywhere.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, sans-serif;color:#333333;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, sans-serif;color:#333333;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, sans-serif;color:#333333;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 18px;"&gt;Hope this helps someone, somehow. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:verdana;color:#333333;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-3300088239966271107?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/3300088239966271107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2010/04/appofflinehtm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/3300088239966271107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/3300088239966271107'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2010/04/appofflinehtm.html' title='App_Offline.htm'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-4638649412495412655</id><published>2009-06-30T17:01:00.003+05:30</published><updated>2009-06-30T17:09:07.999+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Programming'/><title type='text'>NotAvailableException was unhandled</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Off late I developed another new aspect of my field and I am now challanging myself now into yet another field of programming..... &lt;strong&gt;GAME DEVELOPMENT.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Startd off with a very simple yet very effective tutorial found at &lt;/span&gt;&lt;a href="http://blogs.msdn.com/coding4fun/archive/2006/11/03/940223.aspx"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;http://blogs.msdn.com/coding4fun/archive/2006/11/03/940223.aspx&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;The moment I had everything set up nicely for my first DirectX application to run, it failed with a very strange exception&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;"NotAvailableException"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Well after a decent amount of search... I could finally get the solution.. and was really very embarassed to see that to be a problem..&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;I was using the Generic Video Card Drivers that were being installed by default by windows and all it needed was to install the latest Video Card Drivers from the vendor's site and VIOLA...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;It works..&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Learning - Before any Dx programming, make sure you are up to date with the Drivers for all your hardware....&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Njoy :)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-4638649412495412655?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/4638649412495412655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2009/06/notavailableexception-was-unhandled.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/4638649412495412655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/4638649412495412655'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2009/06/notavailableexception-was-unhandled.html' title='NotAvailableException was unhandled'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-8423157978114546290</id><published>2009-05-28T22:23:00.005+05:30</published><updated>2009-05-29T17:01:51.966+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>The changes you have made require the following tables to be dropped and re-created</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;This morning working on newly installed SQL 2008, I stumbled across this strange problem.&lt;br /&gt;&lt;br /&gt;Now at first go, it did not look too severe a problem and I tried to go through the options under tools menu to find out if there was any such option available.&lt;br /&gt;&lt;br /&gt;An here is the answer:-&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_yP_Ri8BRUho/Sh7CNaN7sQI/AAAAAAAAAZo/urdMKGi7R0E/s1600-h/Untitled.jpg"&gt;&lt;img style="MARGIN: 0px 10px 10px 0px; WIDTH: 200px; FLOAT: left; HEIGHT: 115px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5340919743739834626" border="0" alt="" src="http://1.bp.blogspot.com/_yP_Ri8BRUho/Sh7CNaN7sQI/AAAAAAAAAZo/urdMKGi7R0E/s200/Untitled.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;NJoy :)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Ashutosh&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-8423157978114546290?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/8423157978114546290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2009/05/changes-you-have-made-require-following.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/8423157978114546290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/8423157978114546290'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2009/05/changes-you-have-made-require-following.html' title='The changes you have made require the following tables to be dropped and re-created'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yP_Ri8BRUho/Sh7CNaN7sQI/AAAAAAAAAZo/urdMKGi7R0E/s72-c/Untitled.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-3172833332713462876</id><published>2009-04-29T15:07:00.017+05:30</published><updated>2009-07-29T13:51:13.077+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Adding multiple XAMLs to a single XAP file</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Just recently I started learning Silverlight and its pretty cool. I am loving it and trying to find new things everyday out of it.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Today, while working with the XAMLs and XAPs, I noticed that the Silverlight controls when referred onto an ASPX page, uses the XAP as the source.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Now thats where I had an issue.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;I had created quite a few UserControls (XAMLs) on a single XAP and had no clue how to distinguish them on the ASPX page.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Here is the solution to it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;For the purpose of differenciating between the two controls, we use its &lt;span style="color:#ff0000;"&gt;&lt;strong&gt;InitParameters &lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;property.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_yP_Ri8BRUho/SfghjI1qVVI/AAAAAAAAAZY/XP7abHoBM9c/s1600-h/image.JPG"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;img style="MARGIN: 0px 10px 10px 0px; WIDTH: 139px; FLOAT: left; HEIGHT: 200px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5330047046544676178" border="0" alt="" src="http://1.bp.blogspot.com/_yP_Ri8BRUho/SfghjI1qVVI/AAAAAAAAAZY/XP7abHoBM9c/s200/image.JPG" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;As shown in the image above, I had multiple XAMLs for a single XAP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Now I had two ASCX user controls. One of them needed Page.Xaml and the other needed TeamToolbar.xaml.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;So to distinguish between the two, I had the following declarations:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;On the Page.Ascx - &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/AllCoders.xap" &lt;span style="color:#ff0000;"&gt;InitParameters="ControlID=Page"&lt;/span&gt; Width="100%" Height="100%"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;And on the TeamToolbar.ascx - &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;asp:Silverlight ID="Xaml2" runat="server" Source="~/ClientBin/AllCoders.xap" &lt;span style="color:#ff0000;"&gt;InitParameters="ControlID=TeamToolBar"&lt;/span&gt; Width="100%" Height="100%"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;And on the App.xaml.cs, where its all initialized, we need to check which control is to be loaded.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;In the Application_Startup method, this is how we need to check for it.:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_yP_Ri8BRUho/SfgkYoFVzOI/AAAAAAAAAZg/3rKs0HjJirc/s1600-h/shot.JPG"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;img style="MARGIN: 0px 10px 10px 0px; WIDTH: 200px; FLOAT: left; HEIGHT: 98px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5330050164488260834" border="0" alt="" src="http://2.bp.blogspot.com/_yP_Ri8BRUho/SfgkYoFVzOI/AAAAAAAAAZg/3rKs0HjJirc/s200/shot.JPG" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-3172833332713462876?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/3172833332713462876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2009/04/adding-multiple-xamls-to-single-xap.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/3172833332713462876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/3172833332713462876'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2009/04/adding-multiple-xamls-to-single-xap.html' title='Adding multiple XAMLs to a single XAP file'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yP_Ri8BRUho/SfghjI1qVVI/AAAAAAAAAZY/XP7abHoBM9c/s72-c/image.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-4333801617574105179</id><published>2008-12-22T14:55:00.006+05:30</published><updated>2009-05-29T17:03:01.925+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Displaying Images from Database into an ASP:IMAGE control</title><content type='html'>&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;Just recently, while working on a project, I stumbled upon a need to fetch images from the SQL Database and display them in the image control on the page.&lt;br /&gt;&lt;br /&gt;I did a bit of research and landed upon a concept of using GENERIC HANDLERS for that purpose.&lt;br /&gt;&lt;br /&gt;I found that really useful as compared to any other approach of saving the files to disk and setting the URLs etc.&lt;br /&gt;&lt;br /&gt;Here is what can be done:&lt;br /&gt;&lt;br /&gt;1. Add a new GENERIC HANDLER (ImageDisplay.ashx) to the project.&lt;br /&gt;2. Set the ImageControl's ImageUrl to this ashx page..&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;imgDisplay.ImageUrl = "ImageDisplay.ashx?imageId=1";&lt;/span&gt; &lt;/span&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;where imageId is the Database ID of the image that needs to be fetched.&lt;br /&gt;3. Now write code to fetch data from Database for that imageId in the ProcessRequest event of the ashx page.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;public void ProcessRequest(HttpContext context)&lt;br /&gt;{&lt;br /&gt;Int32 imageId = Convert.ToInt32(context.Request.QueryString["imageId"]);&lt;br /&gt;&lt;br /&gt;// This is the function that returns the Byte Array from the Database&lt;br /&gt;Byte[] pict = GetImageById(imageId);&lt;br /&gt;context.Response.ContentType = "image/bmp";&lt;br /&gt;context.Response.OutputStream.Write(pict, 0, pict.Length);&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;4. The method GetImageById would depend upon the Database and data-type that you have for the column for image. Since I had a MySQL database with BLOB column, which can hold a Byte[], the method was quite simple for me and I just had to pull it out from Database and insert it into a Byte[] object.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;-- Ashutosh&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-4333801617574105179?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/4333801617574105179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2008/12/displaying-images-from-database-into.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/4333801617574105179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/4333801617574105179'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2008/12/displaying-images-from-database-into.html' title='Displaying Images from Database into an ASP:IMAGE control'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-3891011399276243073</id><published>2008-12-08T23:46:00.004+05:30</published><updated>2009-05-29T17:03:34.706+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>TabContainer cannot have children of type.....</title><content type='html'>&lt;span style="font-family:verdana;"&gt;Recently, I encountered the problem quite similiar to the one above.....&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;"&gt;TabContainer cannot have children of type&lt;br /&gt;'System.Web.UI.WebControls.Repeater'&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;to be precise...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;I googled quite a bit for this error, but could not find much about it.. No wonders.. It was a careless mistake that I had made. Here is the control that caused this issue....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;"&gt;&amp;lt;cc1:tabcontainer id="tabToolbox" runat="server"&amp;gt;&lt;br /&gt;&amp;lt;cc1:tabpanel id="pnl" headertext="Most Popular"&amp;gt;&lt;br /&gt;&amp;lt;contenttemplate&amp;gt;&lt;br /&gt;&amp;lt;asp:repeater id="rptMostPopular" runat="server"&amp;gt;&lt;br /&gt;&amp;lt;itemtemplate&amp;gt;&lt;br /&gt;&amp;lt;asp:linkbutton id="lnkPopular" runat="server" text=""&amp;gt;&amp;lt;/asp:linkbutton&amp;gt;&lt;br /&gt;&amp;lt;/itemtemplate&amp;gt;&lt;br /&gt;&amp;lt;/asp:repeater&amp;gt;&lt;br /&gt;&amp;lt;/contenttemplate&amp;gt;&lt;br /&gt;&amp;lt;/cc1:tabpanel&amp;gt;&lt;br /&gt;&amp;lt;cc1:tabpanel id="pnl2" headertext="Most Viewed"&amp;gt;&lt;br /&gt;&amp;lt;contenttemplate&amp;gt;&lt;br /&gt;&amp;lt;asp:repeater id="rptMostViewed" runat="server"&amp;gt;&lt;br /&gt;&amp;lt;itemtemplate&amp;gt;&lt;br /&gt;&amp;lt;asp:linkbutton id="lnkPopular" runat="server" text=""&amp;gt;&amp;jt;/asp:linkbutton&amp;gt;&lt;br /&gt;&amp;lt;/itemtemplate&amp;gt;&lt;br /&gt;&amp;lt;/asp:repeater&amp;gt;&lt;br /&gt;&amp;lt;/contenttemplate&amp;gt;&lt;br /&gt;&amp;lt;/cc1:tabpanel&amp;gt;&lt;br /&gt;&amp;lt;cc1:tabpanel id="pnl3" headertext="Most Emailed"&amp;gt;&lt;br /&gt;&amp;lt;contenttemplate&amp;gt;&lt;br /&gt;&amp;lt;asp:repeater id="rptMostEmailed" runat="server"&amp;gt;&lt;br /&gt;&amp;lt;itemtemplate&amp;gt;&lt;br /&gt;&amp;lt;asp:linkbutton id="lnkPopular" runat="server" text=""&amp;gt;&amp;lt;/asp:linkbutton&amp;gt;&lt;br /&gt;&amp;lt;/itemtemplate&amp;gt;&lt;br /&gt;&amp;lt;/asp:repeater&amp;gt;&lt;br /&gt;&amp;lt;/contenttemplate&amp;gt;&lt;br /&gt;&amp;lt;/cc1:tabpanel&amp;gt;&lt;br /&gt;&amp;lt;/cc1:tabcontainer&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Well...... A very simple reason for getting this error, even on the designer and also at runtime..&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;I FORGOT THE TAG "RUNAT=SERVER" WHILE DESCRIBING THE TAB PANELS AND therefore could not get the tab-panels to be server side...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;This is what raised the issue. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;A simple addition of RUNAT=SERVER solves the issue...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Hope this would help someone in need... :)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;--Ashutosh&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-3891011399276243073?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/3891011399276243073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2008/12/tabcontainer-cannot-have-children-of.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/3891011399276243073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/3891011399276243073'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2008/12/tabcontainer-cannot-have-children-of.html' title='TabContainer cannot have children of type.....'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-170868941264352277</id><published>2008-12-05T11:07:00.003+05:30</published><updated>2009-05-29T17:03:55.724+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><title type='text'>Showing ModalPopUpExtender from Client Side</title><content type='html'>&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Just recently, I came across a situation where I needed to display a modal popup dialog box from my left navigation bar links.&lt;/span&gt;&lt;/span&gt; &lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Now the problem it had was all those links were actually Anchor (HREFs) and therefore they had a few problems in getting it to show the modal pop-up.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;So here is how I finally got it done through Javascript...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;This is the HREF that I created&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&amp;lt;a href='' onclick='javascript:fncShowPopUp();return false;'&amp;gt;Edit Profile&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;And here is what is required in the fncShowPopUp function:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;function fncShowPopUp()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            var popUpExtender = $find("ModalPopupExtender");&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            if(popUpExtender)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                popUpExtender.show();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            return false;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;return false; is something that would actually stop the HREF from inducing a postback on the page, since if there is a post back, the Modal Popup would be hidden once again..&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Njoy&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;-- Ashutosh&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-170868941264352277?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/170868941264352277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2008/12/showing-modalpopupextender-from-client.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/170868941264352277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/170868941264352277'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2008/12/showing-modalpopupextender-from-client.html' title='Showing ModalPopUpExtender from Client Side'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-4688514994157370827</id><published>2008-11-20T10:11:00.003+05:30</published><updated>2009-05-29T17:04:45.502+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Error handling with Global.asax and Update Panel</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;This morning while working with the Global.asax to handle my application level errors, I faced a very strange problem.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Despite of having a Error Handling routine in my Global.asax file, I was unable to trap an exception from the application and instead it was just throwing up a Message Box with the exception message.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;So all my routine of logging the error and recording it into the DB was going without being executed.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;After a fair bit of research, the UPDATEPANEL came out to be the culprit.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;By its very design, UpdatePanels are designed not to bubble up the exception by default and thus it just pops up a Message Box and thus the Error handling routine in Global.asax was never called.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;So to call this and feature a full post-back, we need to handle the AsyncPostBackError event of the Script Manager. Here is the code for that.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;1. Add the following attribute to the Script Manager&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;OnAsyncPostBackError="scriptMan_AsyncPostBackError"&lt;/span&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;2. Create the event handler on the code behind&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;protected void scriptMan_AsyncPostBackError(object&lt;br /&gt;sender, AsyncPostBackErrorEventArgs e)&lt;br /&gt;{&lt;br /&gt;MethodInfo preserveStackTrace =&lt;br /&gt;typeof(Exception).GetMethod("InternalPreserveStackTrace", BindingFlags.Instance BindingFlags.NonPublic);&lt;br /&gt;preserveStackTrace.Invoke(e.Exception, null);&lt;br /&gt;throw e.Exception;&lt;br /&gt;}&lt;/span&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;This would bubble up the event and Global.asax would be able to catch the exception thrown and here we could have our all cleanup routine for error trapping and recording.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;-- Ashutosh&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-4688514994157370827?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/4688514994157370827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2008/11/error-handling-with-globalasax-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/4688514994157370827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/4688514994157370827'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2008/11/error-handling-with-globalasax-and.html' title='Error handling with Global.asax and Update Panel'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-6775069733691138293</id><published>2008-11-19T10:33:00.004+05:30</published><updated>2009-05-29T17:05:06.337+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>The row value(s) updated or deleted either do not make the row unique or they alter multiple rows.</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;This is not a common error to see in the context of today's world, but it is really annoying when it does come up.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;This morning while working on a SQL Table, I got this error to come up when I inserted a new row to a table. It did not complain to me when I did an insert on that table, but when I tried to update a few values in that newly added row, it threw up this error.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;After a further look down into the issue, I noticed that the table did not had a Primary Key and therefore it allowed me to enter the duplicate records. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Now using SQL Server Management Studio, when I tried to update that row, this error showed up.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Now the worst part, it would not even let you delete that row from the table, since it gets confused which row to delete as there are two rows with exactly same values in the DB.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;So below are the two methods to get rid of such an issue.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;1. Use "SET ROWCOUNT = 1" when deleting the row.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;When you do a &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;DELETE FROM Table1 where Name = 'ABCD'&lt;/span&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;it will not work since there are two rows with the value of Name = 'ABCD'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;So by simple doing&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;SET ROWCOUNT = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;DELETE FROM Table1 where Name = 'ABCD'&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;it works as it now looks for the first row that matches the criteria and deletes that.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;2. Adding an Identity Column&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Another way of tackling this problem is adding a new temporary Identity column that would serve as Primary key and we could safely delete the row based on that PK.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;ALTER TABLE Table1&lt;br /&gt;ADD TempPKID INT IDENTITY(1, 1)&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;This will give seperate identity values to both the rows and thus one of them could be deleted by using this column in the where clause.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-6775069733691138293?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/6775069733691138293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2008/11/row-values-updated-or-deleted-either-do.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/6775069733691138293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/6775069733691138293'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2008/11/row-values-updated-or-deleted-either-do.html' title='The row value(s) updated or deleted either do not make the row unique or they alter multiple rows.'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-3121008626881163845</id><published>2008-08-29T10:25:00.001+05:30</published><updated>2009-05-29T17:05:35.984+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Component Container</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Just recently, one of my collegues came up to me asking if I knew what a .NET developer MUST KNOW as per MSDN.... and fired me a simple straight question.....&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;WHAT IS A COMPONENT CONTAINER ??&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Well the question was straight and simple, but certainly the answer was not. Not atleast for me.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;So I quick fired MSDN and searched for the same.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Here is what it says:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;The IContainer that contains the Component, if any, or nullNothingnullptra null&lt;br /&gt;reference (Nothing in Visual Basic) if the Component is not encapsulated in an&lt;br /&gt;IContainer.&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Does not really a help for someone new to the concept. So I expanded my search to google. And off came quite a few results. Now uptill now, this is what I could understand and would CERTAINLY WELCOME OTHERS THOUGHTS ON IT&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-3121008626881163845?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/3121008626881163845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2008/01/component-container.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/3121008626881163845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/3121008626881163845'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2008/01/component-container.html' title='Component Container'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-7883289475810752884</id><published>2008-05-05T14:46:00.004+05:30</published><updated>2009-05-29T17:06:03.707+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><title type='text'>Javascript Rounding</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Just discovered:&lt;br /&gt;&lt;br /&gt;Math.Round() function in Javascript return only the nearest whole number for any values.&lt;br /&gt;&lt;br /&gt;So Math.Round(4.366) = 4&lt;br /&gt;and Math.Round(8.33345) = 8.&lt;br /&gt;&lt;br /&gt;We had a problem where we also needed to have the number rounded upto 2 or 3 decimal places.&lt;br /&gt;&lt;br /&gt;Here is a way of doing the same:&lt;br /&gt;&lt;br /&gt;function RoundNumber(Number, decimal)&lt;br /&gt;{&lt;br /&gt;var orgNumber = Math.round(Number*(Math.pow(10,decimal)));&lt;br /&gt;var result = orgNumber /(Math.pow(10,decimal));&lt;br /&gt;return result;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;-- Ashutosh&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-7883289475810752884?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/7883289475810752884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2008/05/javascript-rounding.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/7883289475810752884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/7883289475810752884'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2008/05/javascript-rounding.html' title='Javascript Rounding'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-2032949809684933628</id><published>2008-02-11T14:17:00.002+05:30</published><updated>2009-05-29T17:06:28.904+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>Google AJAX Search API</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Hi,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;While browsing through, I just stumblled upon what is known as Google AJAX Search API. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;I was in seach of something where I could encorporate a google search right into my blog and which looks a touch different than the normal search page from google.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;And I did well to land upon the &lt;/span&gt;&lt;a href="http://code.google.com/apis/ajaxsearch/"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Google AJAX Search API&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;It was quite simple and had enough tutorials and sample codes written for someone looking to encorporate a decent search into their site.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Take a look at the search box at the right bar on the blog. And try searching for something through it. It displays the results for each category as a seperate tab on the very same page.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Here is the way to encorporate the same in your blog.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;1. &lt;/span&gt;&lt;a href="http://code.google.com/apis/ajaxsearch/signup.html"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Obtain a Google API Key&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;. This is a kinda composite key for all the services of google that we would be using.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;2. Integrate the API key code into your blog. OPen your blog and go to Edit HTML and in the head section of your blog, add the following script tag:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;script src='http://www.google.com/jsapi?key=developer_key'&lt;br /&gt;type='text/javascript'/&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;3. This will allow us to use all the services that google offers. Now we need to put up the code for displaying the search box. Here is the code for that.&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;script type="'text/javascript'"&amp;gt;&lt;br /&gt;google.load("search", "1"); &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;// Call this function when the page has been loaded &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;function initialize()&lt;br /&gt;{ &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;var searchControl = new google.search.SearchControl(); &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;searchControl.addSearcher(new GwebSearch());&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;searchControl.addSearcher(new GvideoSearch());&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;searchControl.addSearcher(new GblogSearch());&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;searchControl.addSearcher(new GnewsSearch());&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;searchControl.addSearcher(new GimageSearch());&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;searchControl.addSearcher(new GbookSearch());&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;// create a drawOptions object&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;var drawOptions = new GdrawOptions();&lt;br /&gt;// tell the searcher to draw itself in tabbed mode&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED);&lt;br /&gt;drawOptions.setSearchFormRoot(document.getElementById("searchPlaceHolder"));&lt;br /&gt;searchControl.draw(document.getElementById("searchcontrol"), drawOptions); &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;google.setOnLoadCallback(initialize);&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;4. An explaination of this code is as below:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;a. google.load("search", "1"); - &lt;/strong&gt;This line of code prepares the search API from google and loads all the functions necessary to perfrom the search.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;b. google.search.SearchControl();- &lt;/strong&gt;This is the main control that displays the search results.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;c. searchControl.addSearcher(new GwebSearch());- &lt;/strong&gt;This is used to add various searchers to the control. Add as many searches as you like.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;d. GdrawOptions();- &lt;/strong&gt;A draawoptions object gives you the flexibility of customizing your search results display. The below two lines show the examples of its usage.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;e. drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED);&lt;/strong&gt; - This tells the search control how to display the search results. Here we have set it to display in the form of different tabs.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;f. drawOptions.setSearchFormRoot(document.getElementById("searchPlaceHolder"));- &lt;/strong&gt;This tells the search option the control to which the search box would be bind. I created a div with the ID &lt;strong&gt;searchPlaceHolder &lt;/strong&gt;to hold my search box.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;g. searchControl.draw(document.getElementById("searchcontrol"), drawOptions); &lt;/strong&gt;- This is used to actually draw the search control with the appropriate draw options.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;h. &lt;div id="searchcontrol"&gt;Loading&lt;/div&gt;&lt;/strong&gt;- This provides us with an instance of a searchcontrol. Place it where you want the results to be displayed.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;This way it would display a search box where you place the &lt;strong&gt;searchPlaceHolder &lt;/strong&gt;control and would display the search results where you place the &lt;strong&gt;searchcontrol.&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Hope this helps a lot of people like me ....&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;-- Ashutosh&lt;/span&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-2032949809684933628?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/2032949809684933628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2008/02/google-ajax-search-api.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/2032949809684933628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/2032949809684933628'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2008/02/google-ajax-search-api.html' title='Google AJAX Search API'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-4248712207556095194</id><published>2008-01-08T11:22:00.001+05:30</published><updated>2009-05-29T17:07:40.344+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>Harbhajan Banned for 3 test matches.......</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Yes this indeed is a technical blog but being a sentimental Indian, I could not stop myself from writing my own views of the story.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;First of all, comments from a few commendable people:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;"I am South African, and I understand the word racism. - Mike Proctor"&lt;/span&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;"They're entitled to do whatever they think is appropriate at the time but for me that would be a little bit extreme, I must admit. - Ricky Ponting"&lt;/span&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;"What to do? Calls for sackings are knee-jerk, the threat to abandon the tour nonsensical. Apart from anything else, the all-powerful television moguls here and in India would not countenance it. The tour will go on, and so will the captains. So law and order it must be. - Greg Baum (The AGE)" &lt;/span&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;"I saw the footage of what had happened involving Andrew Symonds when the&lt;br /&gt;Australians were in India. Most of the spectators were just having some light-hearted banter, and there was no malice in most cases. - Steve Waugh"&lt;/span&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;"Michael Clarke also had a dreadful match but he is a young man and has time to rethink his outlook. That his mind was in disarray could be told from his batting. In the first innings he offered no shot to a straight ball and in the second he remained at the crease after giving an easy catch to slip. On this evidence Clarke cannot be promoted to the vice-captaincy of his country. - Peter Roebuck"&lt;/span&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;There are times when you don't know. So, you ask the question. Every player has right to ask the umpire. I will say I don't appeal if I don't think they are out. If I am not sure, I will ask the umpire and I'll accept his decision. - Adam Gilchrist"&lt;/span&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;SO these are the view of certain people who are known to be experts of their own fields.&lt;br /&gt;Well Mr. Mike Proctor just to let you know, We are the citizens of India and We really do not know what RACISM is. We never hear such words in our country because we never had views and culture as in SA our even Australia where people are discriminated on the basis of color.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;br /&gt;And the statement from a reputed person from Australia "WHY SYMONDS ONLY !!" confirms the stand that they still have racism running through their blood. I mean had the same statement been made against Ponting or any white cricketer that would have not been a Racial comment but since it has been againsta Black, it is definitely the ONE..........&lt;br /&gt;&lt;br /&gt;Regarding cancellation of the tour - As an Indian, yes I would most definitely like it to happen, but as an ardent cricket fan, I would most definitely like the tour to go on. Because the fight from here on would definitely be an interesting one becuase now it would most certainly not be a mere game of cricket but it would be a question of the national pride at stake.&lt;br /&gt;&lt;br /&gt;As Greg Baum quoted - The television media that is presenting the live coverage all over the world is strong enough to make the tour continue. There would be a huge loss to the industry if it does not. After all we are talking of around 3 months of cricket going out of question.&lt;br /&gt;&lt;br /&gt;And lastly, to comment on what Adam Gilchrist had to say on Rahul Dravid's dismissal, well Gilli your statement suggests that you were not confirm if that was out or not so you had put up a question to bucknor asking for his openion.&lt;br /&gt;&lt;br /&gt;Well I would leave that to the readers to decide upon after having a look at the footage of the dismissal.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--Ashutosh&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-4248712207556095194?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/4248712207556095194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2008/01/harbhajan-banned-for-3-test-matches.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/4248712207556095194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/4248712207556095194'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2008/01/harbhajan-banned-for-3-test-matches.html' title='Harbhajan Banned for 3 test matches.......'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-1175329495411337970</id><published>2007-12-11T14:13:00.001+05:30</published><updated>2009-05-29T17:07:03.883+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>Double v/s Decimal</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Just recently, one of my Colleagues approached me with a very strange problem. He had made a function for Rounding the numbers to the specified number of decimal places.&lt;br /&gt;&lt;br /&gt;He was facing a problem where his function would Round off 544.435 to 544.43 but would Round off 544.445 to 544.45 which was the intended one.&lt;br /&gt;&lt;br /&gt;After a fair bit of research I could conclude the following:&lt;br /&gt;&lt;br /&gt;The error was because he was taking input and providing the output as DOUBLE.&lt;br /&gt;&lt;br /&gt;Now MSDN says that DOUBLE is a FLOATING POINT VARIABLE Type. It takes up less space in the memory but is prone to some Rounding problems.&lt;br /&gt;&lt;br /&gt;So while storing the above two DOUBLES, .NET stored them as follows:&lt;br /&gt;&lt;br /&gt;544.435 ------------- 544.43499999999994543031789362430572509765625&lt;br /&gt;544.445 ------------- 544.4450000000000500222085975110530853271484375&lt;br /&gt;&lt;br /&gt;So doing a Multiplication with the precision factor (100 in this case) and taking a Math.Floor of that number converts&lt;br /&gt;&lt;br /&gt;544.435 to 544.43&lt;br /&gt;&amp;amp;&lt;br /&gt;544.445 to 544.45&lt;br /&gt;&lt;br /&gt;More explanation about the Binary Floating point could be found at&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.yoda.arachsys.com/csharp/floatingpoint.html"&gt;http://www.yoda.arachsys.com/csharp/floatingpoint.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;BTW, the solution to the above mentioned problem is using something that is Fixed Point Variable and not a Floating Point Variable like Double.&lt;br /&gt;&lt;br /&gt;So using DECIMAL instead of DOUBLE in the application resolves the Rounding Issue.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Ashutosh&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-1175329495411337970?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/1175329495411337970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/12/double-vs-decimal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/1175329495411337970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/1175329495411337970'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/12/double-vs-decimal.html' title='Double v/s Decimal'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-8402411726974989014</id><published>2007-11-22T18:09:00.002+05:30</published><updated>2009-05-29T17:08:10.294+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>Garbage Collection</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Thanks to &lt;/span&gt;&lt;a href="http://www.xtremedotnettalk.com/showthread.php?t=97910"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;marble_eater&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt; for the article which is now in the form of a slideshow.......&lt;br /&gt;&lt;br /&gt;If you wish to download the presentation, it can be downloaded from &lt;/span&gt;&lt;a href="http://www.geocities.com/ashutosh9910/Documents/GarbageCollectionIDisposable.ppt"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;iframe height="400" src="http://www.flickr.com/slideShow/index.gne?tags=pptgarbagecollection&amp;amp;user_id=15241129@N07" width="400" scroll="no"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-8402411726974989014?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/8402411726974989014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/11/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/8402411726974989014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/8402411726974989014'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/11/blog-post.html' title='Garbage Collection'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-5164902383791359084</id><published>2007-10-17T11:03:00.001+05:30</published><updated>2009-05-29T17:08:31.566+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>Why is a Short of 4 bytes</title><content type='html'>&lt;strong&gt;&lt;u&gt;&lt;em&gt;&lt;span style="font-family:verdana;font-size:85%;color:#ff0000;"&gt;Why is a Short of 4 bytes&lt;/span&gt;&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;&lt;span style="font-family:verdana;font-size:85%;color:#ff0000;"&gt;&lt;/span&gt;&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;color:#000000;"&gt;This is where it all started. I faced an interesting problem while working on my Sessions application. Declaring a structure as :&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Struct ShortInt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Short firstShort;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Int32 secondInt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;If someone is asked about the size of this structure. I bet most people would answer it as I did : 6 bytes.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;But surprisingly, the answer is 8 bytes.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Simple reason for that being the memory is allocated in the chunks and if the declaration of structure is done wisely, it could save a lot of memory:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Taking example:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Struct exampleStruct&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Byte b1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Int32 i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;short s;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Byte b2;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Here if we look at this structure, the memory for this block is allocated as follows:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Byte b1 ----- A chunk of 4 bytes is allocated&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Int32 i ------ This chunk has only 3 bytes left so a new chunk of 4 bytes alloted&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;short s ------ Previous chunk is full. So next 4 byte chunk is alloted.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Byte b2 ----- Previous chunk has 2 bytes left and can accomodate a byte. Hence the byte variable is accomodated in teh same chunk. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;So total size becomes 12 bytes.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Now if we redefine our structure as follows:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Struct&lt;br /&gt;exampleStruct&lt;br /&gt;{&lt;br /&gt;Byte b1;&lt;br /&gt;Byte b2;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;short s;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Int32 i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Now the memory allocation would be as follows:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Byte b1 ----- A chunk of 4 bytes is alloted&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Byte b2 ----- A byte in teh same chunk&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;short s ------ Previous chunk has 2 bytes left in it&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Int32 i ----- Since the previous chunk is full, a new chunk is alloted&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Hense the total size is 8 bytes only.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;More could be found on the following links :&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.vsj.co.uk/articles/display.asp?id=501"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;http://www.vsj.co.uk/articles/display.asp?id=501&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/msdnmag/issues/05/01/MemoryOptimization/default.aspx"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;http://msdn.microsoft.com/msdnmag/issues/05/01/MemoryOptimization/default.aspx&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;--Ashutosh&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-5164902383791359084?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/5164902383791359084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/10/why-is-short-of-4-bytes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/5164902383791359084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/5164902383791359084'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/10/why-is-short-of-4-bytes.html' title='Why is a Short of 4 bytes'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-5378518589771588856</id><published>2007-08-22T15:33:00.001+05:30</published><updated>2009-05-29T17:08:51.683+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>SecureString in c#</title><content type='html'>&lt;strong&gt;&lt;span style="font-family:verdana;font-size:85%;color:#ff0000;"&gt;System.Security.SecureString&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:verdana;font-size:85%;color:#ff0000;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;color:#000000;"&gt;&lt;u&gt;Per MSDN:&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;color:#000000;"&gt;Represents text that should be kept confidential. The text is encrypted for privacy when being used, and deleted from computer memory when no longer needed. This class cannot be inherited. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Storing any sensitive data like passwords etc in the standard &lt;strong&gt;System.String &lt;/strong&gt;can be a potential threat to the data for the following reasons:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;&gt;&gt;&lt;/strong&gt; It is stored on the Managed Heap and is not pinned in the memory, so the garbage collector can move it around at will leaving several copies in memory. The code will not know that this has happened, and even if it could figure out that the string was moved, there is no way to clear out the other copies. Instead we have to wait for the CLR to allocate another object where the sensitive data is so that the memory gets erased. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;&gt;&gt;&lt;/strong&gt; It's not encrypted, so anyone who can read process's memory will be able to see the value of the string easily. Also, if the process gets swapped out to disk, the unencrypted contents of the string will be written to the swap file.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;&gt;&gt;&lt;/strong&gt; It's not mutable, so whenever it is modified, there will be the old version and the new version both in memory &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;&gt;&gt;&lt;/strong&gt; Since it's not mutable, there's no effective way to clear it out when you're done using it&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Hence, .NET 2.0 introduced a new class under &lt;strong&gt;System.Security &lt;/strong&gt;namespace called &lt;strong&gt;SecureString,&lt;/strong&gt; that can be used in place of standard Strings to store sensitive values.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Using SecureString eliminates the above mentioned issues as:&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;strong&gt;&gt;&gt; &lt;/strong&gt;The SecureString is not stored in the managed heap while standard strings are and therefore it will not be replicated to multiple locations in memory. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;strong&gt;&gt;&gt; &lt;/strong&gt;SecureStrings are stored in an encrypted form. They need to be decrypted when they are used. this period of decryption can be kept as small as possible. So even if the process is swapped out to disk while the string is encrypted, the plaintext will not end up in the swap file.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;strong&gt;&gt;&gt; &lt;/strong&gt;The keys used to encrypt the string are tied to the user, logon session, and process. This means that any minidumps taken of the process will contain secure strings which are not decryptable. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;strong&gt;&gt;&gt; &lt;/strong&gt;SecureStrings are securely zeroed out when they're disposed of. System.Strings are immutable and cannot be cleared when you've finished with the sensitive data&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;create a SecureString, you append one character at a time: &lt;/p&gt;&lt;blockquote&gt;System.Security.SecureString secString = new System.Security.SecureString();&lt;br /&gt;secString.AppendChar(p);&lt;br /&gt;secString.AppendChar('a');&lt;br /&gt;secString.AppendChar('s');&lt;br /&gt;secString.AppendChar('s');&lt;br /&gt;secString.AppendChar('w');&lt;br /&gt;secString.AppendChar('d');&lt;/blockquote&gt;&lt;p&gt;When the string contains the data you want, you can make it immutable and uncopyable by calling the &lt;em&gt;&lt;strong&gt;MakeReadOnly&lt;/strong&gt;&lt;/em&gt; method: &lt;/p&gt;&lt;blockquote&gt;secString.MakeReadOnly();&lt;br /&gt;&lt;/blockquote&gt;&lt;p&gt;To read the secure value, use the &lt;strong&gt;&lt;em&gt;SecureStringToBSTR()&lt;/em&gt;&lt;/strong&gt; method as follows: &lt;/p&gt;&lt;blockquote&gt;IntPtr ptr = System.Runtime.InteropServices.Marshal.SecureStringToBSTR(secString);&lt;br /&gt;string sDecrypString = System.Runtime.InteropServices.Marshal.PtrToStringUni(ptr);&lt;br /&gt;&lt;/blockquote&gt;&lt;p&gt;The garbage collector will remove SecureStrings when they're no longer referenced, but you&lt;br /&gt;can dispose of a SecureString by using the Dispose() method: &lt;/p&gt;&lt;blockquote&gt;secString.Dispose();&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-5378518589771588856?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/5378518589771588856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/08/securestring-in-c.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/5378518589771588856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/5378518589771588856'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/08/securestring-in-c.html' title='SecureString in c#'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-8893621271021246141</id><published>2007-08-16T17:29:00.000+05:30</published><updated>2007-10-17T14:11:31.675+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BlogPost'/><title type='text'>An ATOM feed ticker (scrolling one)</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Just during my leisure time, while I had a small break from work, I gave a look to my blog that looked quite ugly and out came a thought to beautify it and in the process learn new things.&lt;br /&gt;&lt;br /&gt;The best part of it was creating an ATOM feed reader for my blog. I finally succeeded in creating one using the idea from &lt;/span&gt;&lt;a href="http://www.dynamicdrive.com/"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Dynamic Drive&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;.&lt;br /&gt;&lt;br /&gt;Here I could create a ATOM Feed scroller which would show all the posts on the blog and also give a pause at each and every post with a link to the original post on my blog.&lt;br /&gt;&lt;br /&gt;A sample could be seen on &lt;/span&gt;&lt;a href="http://ashutosh9910-1.at.vwdhosting.net/MyWorld/"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;THIS SITE&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt; where I have hosted it (This is a trial and hense would only be available to me till September 12 2007) &lt;strong&gt;&lt;span style="color:#ff0000;"&gt;as well as on the top of this blog&lt;/span&gt;&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;By that time I would be looking to modify it so that it just required the client side code and no server side coding is involved.&lt;br /&gt;&lt;br /&gt;Currently it uses an aspx page to display the posts as there is a bit of server side code involved in it. I would try to eliminate that ASAP.&lt;br /&gt;&lt;br /&gt;Once done, I would make this a portable widget that could be used to display any ATOM feed providing its URL.&lt;br /&gt;&lt;br /&gt;--Ashutosh&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-8893621271021246141?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/8893621271021246141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/08/atom-feed-ticker-scrolling-one.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/8893621271021246141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/8893621271021246141'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/08/atom-feed-ticker-scrolling-one.html' title='An ATOM feed ticker (scrolling one)'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-8419702535714155293</id><published>2007-08-10T15:36:00.001+05:30</published><updated>2009-05-29T17:09:37.146+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>SelectSingleNode not selecting the node.</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Recently I was working on creating an ATOM feed reader. Obtained the JS from &lt;a href="http://www.dynamicdrive.com/"&gt;DynamicDrive&lt;/a&gt; and coded the control to take up the URL and return back the posts from it.&lt;br /&gt;&lt;br /&gt;It required XML reading and playing around with the nodes. Strange enough, looked easier to work, I had a hard time getting the node required to display the things out.&lt;br /&gt;Below is the format that an ATOM xml uses:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;?xml version='1.0'&lt;br /&gt;encoding='UTF-8'?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;?xml-stylesheet&lt;br /&gt;href="http://www.blogger.com/styles/atom.css"&lt;br /&gt;type="text/css"?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;feed xmlns='http://www.w3.org/2005/Atom'&lt;br /&gt;xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;id&amp;gt;tag:blogger.com,1999:blog-36333526&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;updated&amp;gt;2007-08-08T16:18:29.608+05:30&amp;lt;/updated&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;title type='text'&amp;gt;Ashutosh Vyas's&lt;br /&gt;Blog&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;author&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Ashu&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;/author&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;generator version='7.00'&lt;br /&gt;uri='http://www.blogger.com'&amp;gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Blogger&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;/generator&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;openSearch:totalResults&amp;gt;22&amp;lt;/openSearch:totalResults&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;openSearch:startIndex&amp;gt;1&amp;lt;/openSearch:startIndex&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;openSearch:itemsPerPage&amp;gt;25&amp;lt;/openSearch:itemsPerPage&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;entry&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;id&amp;gt;tag:blogger.com,1999:blog-36333526.post-3860689405428340431&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;published&amp;gt;2007-08-02T14:47:00.000+05:30&amp;lt;/published&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;updated&amp;gt;2007-08-02T14:54:53.163+05:30&amp;lt;/updated&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;title type='text'&amp;gt;Asynchronous&lt;br /&gt;Page Concept in ASP.NET&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;content type='html'&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;link rel='replies'&lt;br /&gt;type='application/atom+xml'&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;link rel='self'&lt;br /&gt;type='application/atom+xml' &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;author&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Ashu&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;/author&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;/entry&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;Now all I needed was to find out the root node and traverse to the Node "feed/title" to find out the title of the blog to display on the top of the scroller.&lt;br /&gt;&lt;br /&gt;To my knowledge, it was as easy as&lt;br /&gt;rssDoc.SelectSingleNode("feed/title").InnerText;&lt;br /&gt;But that did not happen to be the case. It always returned me null.&lt;br /&gt;I tried grabbing out the root node (feed) using&lt;br /&gt;rssDoc.SelectSingleNode("feed/title").InnerText;&lt;br /&gt;but this would again return me the same NULL.&lt;br /&gt;Strange for me, doing a rssDoc.DocumentElement() would most certainly return me the required feed node.&lt;br /&gt;After a bit of help from MSDN and other group, I discovered what I did not knew till now and I suspect many ppl do not because of lack of use.&lt;br /&gt;You require a NAMESPACEMANAGER to get those nodes out.&lt;br /&gt;So to dig out something from&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;blockquote&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;feed&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;/feed&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;lt;/feed&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;we need the following code.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;blockquote&gt;&lt;p&gt;XmlNode feedNode = rssDoc.DocumentElement;&lt;/p&gt;&lt;p&gt;XmlNamespaceManager nsMgr = new XmlNamespaceManager(rssDoc.NameTable);&lt;/p&gt;&lt;p&gt;nsMgr.AddNamespace("prefix", &lt;a href="http://www.w3.org/2005/Atom"&gt;http://www.w3.org/2005/Atom&lt;/a&gt;);&lt;/p&gt;&lt;p&gt;String feedTitle = feedNode.SelectSingleNode("prefix:title",nsMgr).InnerText;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;-- Ashutosh&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-8419702535714155293?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/8419702535714155293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/08/selectsinglenode-not-selecting-node.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/8419702535714155293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/8419702535714155293'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/08/selectsinglenode-not-selecting-node.html' title='SelectSingleNode not selecting the node.'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-3860689405428340431</id><published>2007-08-02T14:47:00.001+05:30</published><updated>2009-05-29T17:10:03.056+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Asynchronous Page Concept in ASP.NET</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;strong&gt;Server Unavailable.&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;This is the error most of us have faced without a clue asto what leads to this error and server being unavailable.Heres the reason:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;ASP.NET uses threads from a common language runtime (CLR) thread pool to process requests. As long as there are threads available in the thread pool, ASP.NET has no trouble dispatching incoming requests. But once the thread pool becomes saturated, i.e. all the threads inside it are busy processing requests and no free threads remain, new requests have to wait for threads to become free. If the logjam becomes severe enough and the queue fills to capacity, ASP.NET throws this error stating that Server is Unavailable.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;SO whats the solution: Well the easiest way is to increase the maximum size of the thread pool, allowing more threads to be created. That's the course developers often take when repeated "Server unavailable" errors are reported. Another common course of action is adding more servers to the Web farm. But increasing the thread count-or the server count-doesn't solve the issue. It just provides temporary relief to the problem.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;One solution to this implemented in ASP.NET 2.0 is the use of &lt;strong&gt;ASYNCHRONOUS PAGES&lt;/strong&gt;. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;br /&gt;When ASP.NET receives a request for a page, it grabs a thread from a thread pool and assigns that request to the thread. A normal, or synchronous, page holds onto the thread for the duration of the request, preventing the thread from being used to process other requests. If a synchronous request becomes I/O bound—for example, if it calls out to a remote Web service or queries a remote database and waits for the call to come back—then the thread assigned to the request is stuck doing nothing until the call returns. That impedes scalability because the thread pool has a finite number of threads available. If all request-processing threads are blocked waiting for I/O operations to complete, additional requests get queued up waiting for threads to be free. At best, throughput decreases because requests wait longer to be processed. At worst, the queue fills up and ASP.NET fails subsequent requests with 503 "Server Unavailable" errors.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;strong&gt;Asynchronous pages &lt;/strong&gt;offer a neat solution to the problems caused by I/O-bound requests. Page processing begins on a thread-pool thread, but that thread is returned to the thread pool once an asynchronous I/O operation begins in response to a signal from ASP.NET. When the operation completes, ASP.NET grabs another thread from the thread pool and finishes processing the request. Scalability increases because thread-pool threads are used more efficiently. Threads that would otherwise be stuck waiting for I/O to complete can now be used to service other requests. The direct beneficiaries are requests that don't perform lengthy I/O operations and can therefore get in and out of the pipeline quickly. Long waits to get into the pipeline have a disproportionately negative impact on the performance of such requests&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;The concept of Asynchronous Pages is available only in ASP.NET 2.0 but it could be implemented in ASP.NET 1.x in a way outlined in the below mentioned link.&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;The trick here is to implement IHttpAsyncHandler in a page's codebehind class, prompting ASP.NET to process requests not by calling the page's IHttpHandler.ProcessRequest method, but by calling IHttpAsyncHandler.BeginProcessRequest instead.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;ASP.NET 2.0 vastly simplifies the way you build asynchronous pages. You begin by including an Async="true" attribute in the page's @ Page directive, like so:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;%@ Page Async="true" ... %&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;This property set to true, says the page to implement the IHttpAsyncHandler. Regarding this, you need to register the Begin method and End method of to the Page.AddOnPreRenderCompleteAsync.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;// Register async methods&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;AddOnPreRenderCompleteAsync&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;( &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;new BeginEventHandler(BeginAsyncOperation), &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;new EndEventHandler(EndAsyncOperation)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;By these actions, the starts its normal life cycle, until the end of the OnPreRender event invocation. At this point the ASP.NET calls the Begin method that we registered earlier and the operation begins (calling the database etc...), meanwhile, the thread that has been assigned to the request goeas back to the thread pool. At the end of the Begin method, an IAsyncResult is being sent automatically to the ASP.NET and let it determine in the operation had completed, a new thread is being called from the thread pool and there is call to the End method (that we registered earlier, remmember?).&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Jeff Prosise explains it all in&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/msdnmag/issues/05/10/WickedCode/"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;http://msdn.microsoft.com/msdnmag/issues/05/10/WickedCode/&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;-- Ashutosh&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-3860689405428340431?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/3860689405428340431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/08/asynchronous-page-concept-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/3860689405428340431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/3860689405428340431'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/08/asynchronous-page-concept-in-aspnet.html' title='Asynchronous Page Concept in ASP.NET'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-5124978560720722103</id><published>2007-07-06T13:44:00.001+05:30</published><updated>2009-05-29T17:10:26.615+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>FOR v/s FOREACH: Different Perspectives.</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Over the years I have been coding just to get the work done. Now since last few months, I realized the importance of every single step taken to improve the performance and writing the code that is optimized.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;But during this process of optimization, at times I felt if Approach 1 was more optimized or Approach 2.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;One such condition was when I used For loops to iterate through the items of collection.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Now heres the theory:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;FOR LOOP:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;int[] indexArray = new int[5];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;int total = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;for(int i = 0; i &amp;lt; indexArray.Length; i++)&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;total += indexArray[i];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;strong&gt;FOREACH LOOP:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;int[] indexArray = new int[5];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;int total = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;foreach(int i in indexArray) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;total += i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;The advantage of a foreach loop over a for loop is that it is not al all necessary to know the number of items within the collection when an iteration starts. This avoids iterating off the end of the collection using an index that is not available. &lt;strong&gt;A &lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;strong&gt;foreach loop also allows code to iterate over a collection without first loading the collection in entirety into memory&lt;/strong&gt;. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;So herein we can safely assume that using foreach is an optimized approach rather than using a for loop.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;strong&gt;NOW LETS MOVE TO THE OTHER SIDE OF IT:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;If we closely look at the IL Code for the above two constructs:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;strong&gt;FOR LOOP:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Instruction &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;cmp dword ptr [eax+4],0 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;jle 0000000F&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;mov ecx,dword ptr [eax+edx*4+8] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;inc edx &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;++icmp esi,dword ptr [eax+4] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;jl FFFFFFF8&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Here, the comparision is done at two stages:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;1. For the first run it is done only once to check if the counter is good to continue into the loop.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;2. Inside the loop where it is exactly comparing and recalling the code.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;This is very well optimized in the loop.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;strong&gt;FOREACH LOOP:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Instruction&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;cmp esi,dword ptr [ebx+4] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;jl FFFFFFE3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;cmp esi,dword ptr [ebx+4] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;jb 00000009&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;mov eax,dword ptr [ebx+esi*4+8] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;mov dword ptr [ebp-0Ch],eax &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;mov eax,dword ptr [ebp-0Ch]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;add dword ptr [ebp-8],eax &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;inc esi &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;cmp esi,dword ptr [ebx+4] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;jl FFFFFFE3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Clearly the two syntaxes are different. There are some unwanted comparisions and some moves that are exactly not required. Thats because foreach treats everything as a collection and hence uses the code for the same which reduces the performance if it is not a collection and is a simple array only.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;So still I am at indecision whether For is an optimized version or ForEach is??.............. :(&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;--Ashutosh&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-5124978560720722103?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/5124978560720722103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/07/for-vs-foreach-different-perspectives.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/5124978560720722103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/5124978560720722103'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/07/for-vs-foreach-different-perspectives.html' title='FOR v/s FOREACH: Different Perspectives.'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-2832490949895221902</id><published>2007-05-23T13:53:00.001+05:30</published><updated>2009-05-29T17:10:49.468+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>Difference Between VB.NET and C# (A comparision)</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Below is a very good article describing the almost complete list of difference that VB.NET has with C#.&lt;br /&gt;&lt;br /&gt;It basically compares one to one keywords and functions for both the languages.&lt;br /&gt;&lt;br /&gt;It could be extremely useful for people who find it difficult to transit from VB.NET to C#&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.codeproject.com/dotnet/vbnet_c__difference.asp"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;http://www.codeproject.com/dotnet/vbnet_c__difference.asp&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--Ashutosh&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-2832490949895221902?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/2832490949895221902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/05/below-is-very-good-article-describing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/2832490949895221902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/2832490949895221902'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/05/below-is-very-good-article-describing.html' title='Difference Between VB.NET and C# (A comparision)'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-7944928985150161760</id><published>2007-05-08T10:12:00.001+05:30</published><updated>2009-05-29T17:11:17.706+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Providing Custom Intellisense in VS.NET IDE (Thanks to Mikhail Arkhipov)</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;In the previous post I tried to validate my HTML in the VS.NET designer for HTML usingmy own custom validations.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;While this proved quite helpful, I felt a deep need of intellisense in VS.NET for my objects and hense decided to implement the same.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;After a bit of googling and researching, I could find a possible way of implementing the same.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Here's how it goes.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;As we all know, VS 2005 implements Intellisense using the XSD files. So the idea was to provide VS IDE with my own XSD so that it could use that XSD instead of the default one.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;The process involved the following steps:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#3333ff;"&gt;&lt;strong&gt;1. Create your custom XSD:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#3333ff;"&gt;2. Make this XSD available to VS.NET IDE&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#3333ff;"&gt;3. Using the custom XSD&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#3333ff;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed style="WIDTH: 400px; HEIGHT: 326px" id="VideoPlayback" type="application/x-shockwave-flash" align="middle" src="http://video.google.com/googleplayer.swf?docId=" flashvars="playerMode=embedded" salign="TL" scale="noScale" bgcolor="#ffffff" quality="best" hl="en"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#3333ff;"&gt;1. Create your custom XSD:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#000000;"&gt;Since I was creating intellisense for HTML, I always required the default HTML intellisense and a few of my own. So I decided to use the XSD that VS IDE uses to provide intellisense in HTML view. Those XSDs could be found located at &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#000000;"&gt;&lt;strong&gt;"%vsInstallDir%\Common7\Packages\schemas\html"&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Here, since my IDE was using IE6_0.XSD, I decided to make a copy of it and make my own XSD out of it, so that I could get all the custom HTML intellisense. So I copied IE6_0.XSD and created "MyCustom.XSD"&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Now to that XSD I made some changes that I required. For example, when you have a &lt;strong&gt;TD&lt;/strong&gt; tag in the HTML, you do not have an attribute called &lt;strong&gt;TYPE. &lt;/strong&gt;I required an attribute &lt;strong&gt;TYPE &lt;/strong&gt;which could have two possible values: &lt;strong&gt;DATA / AGGREGATE.&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;So basically I required my TDs to be somewhat like :&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="color:#3366ff;"&gt;&amp;lt;TD type="Data"/&amp;gt;&lt;/span&gt; OR &lt;span style="color:#3366ff;"&gt;&amp;lt;TD type="Aggregate"/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#3366ff;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#000000;"&gt;So to attain this, following changes were made to the MyCustom.xsd&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;At the location where element TD is defined, add a new Attribute Group called&lt;br /&gt;"cellTypeAttributeForHiText" (You can have any name you like).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_yP_Ri8BRUho/RkAGCWVydQI/AAAAAAAAAAM/iMdw75wW7LA/s1600-h/Image1.JPG"&gt;&lt;img style="MARGIN: 0px 10px 10px 0px; FLOAT: left; CURSOR: hand" id="BLOGGER_PHOTO_ID_5062052618590909698" border="0" alt="" src="http://2.bp.blogspot.com/_yP_Ri8BRUho/RkAGCWVydQI/AAAAAAAAAAM/iMdw75wW7LA/s320/Image1.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Next we need to create this Attribute group called "cellTypeAttributeForHiText". For this we can define a new Attribute group as in the picture.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_yP_Ri8BRUho/RkAGuWVydRI/AAAAAAAAAAU/Ld2bhlLLjGM/s1600-h/Image2.JPG"&gt;&lt;img style="MARGIN: 0px 10px 10px 0px; FLOAT: left; CURSOR: hand" id="BLOGGER_PHOTO_ID_5062053374505153810" border="0" alt="" src="http://2.bp.blogspot.com/_yP_Ri8BRUho/RkAGuWVydRI/AAAAAAAAAAU/Ld2bhlLLjGM/s320/Image2.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;While creating this Attribute group, we would be creating a simple type that would provide us the dropdown list in the intellisense when we write "Type=" in the IDE.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_yP_Ri8BRUho/RkAHXmVydSI/AAAAAAAAAAc/iNBU_FX49ts/s1600-h/Image3.JPG"&gt;&lt;img style="MARGIN: 0px 10px 10px 0px; FLOAT: left; CURSOR: hand" id="BLOGGER_PHOTO_ID_5062054083174757666" border="0" alt="" src="http://3.bp.blogspot.com/_yP_Ri8BRUho/RkAHXmVydSI/AAAAAAAAAAc/iNBU_FX49ts/s320/Image3.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Apart from these, there are a couple more changes that are required so that the IDE distinguishes between the two schemas.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&amp;lt;xsd:schema version="1.0" targetNamespace='http://schemas.microsoft.com/intellisense/&lt;span style="color:#ff0000;"&gt;MyCustomSchema&lt;/span&gt;'&lt;br /&gt;xmlns='http://schemas.microsoft.com/intellisense/&lt;span style="color:#ff0000;"&gt;MyCustomSchema&lt;/span&gt;'&lt;br /&gt;xmlns:xsd='http://www.w3.org/2001/XMLSchema'&lt;br /&gt;xmlns:vs='http://schemas.microsoft.com/Visual-Studio-Intellisense'&lt;br /&gt;vs:clientom="ie6_0dom.tlb"&lt;br /&gt;vs:ishtmlschema="true"&lt;br /&gt;vs:isserverschema="false"&lt;br /&gt;vs:htmlflavor="4.0"&lt;br /&gt;vs:MultipleScriptLanguages="true"&lt;br /&gt;vs:cssschema="&lt;span style="color:#ff0000;"&gt;CSS 2.1&lt;/span&gt;"&lt;br /&gt;vs:SuccinctFriendlyName="&lt;span style="color:#ff0000;"&gt;My Custom Schema&lt;/span&gt;"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;SO now we are all done with the changes. We have a well made XSD to use with our IDE.&lt;/span&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#3333ff;"&gt;&lt;strong&gt;2. Make this XSD available to VS.NET IDE &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#000000;"&gt;In order to make this XSD available to VS IDE, we need to perform two steps.&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Firstly copy the XSD file to the location where the default XSDs for IDE are located.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="font-size:85%;"&gt;Secondly make a registry entry to register this schema with the IDE. For this, create a .reg file with the following text&lt;span style="font-family:verdana;"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;color:#3366ff;"&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Packages\{1B437D20-F8FE-11D2-A6AE-00104BCC7269}\Schemas\Schema 21]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;color:#3366ff;"&gt;"Friendly Name"="My Custom Schema"&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;color:#3366ff;"&gt;"URI"=&lt;/span&gt;&lt;a href="http://schemas.microsoft.com/intellisense/ie7"&gt;&lt;span style="color:#3366ff;"&gt;"&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;a href="http://schemas.microsoft.com/intellisense/MyCustomSchema"&gt;http://schemas.microsoft.com/intellisense/MyCustomSchema"&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;color:#3366ff;"&gt;"File"="html\\MyCustom.xsd"&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#3366ff;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#000000;"&gt;Running this script would add the information to the Registry and would register the schema to the VS.NET IDE.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;One thing to note here is that I have hardcoded the name SCHEMA21. This was because on my machine, I had 20 Schemas already loaded. By default, VS.NET creats 20 schemas and hense we need to maintain the order to get the schema working. Hense the number.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;color:#3333ff;"&gt;&lt;strong&gt;3. Using the custom XSD &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;font-size:85%;color:#000000;"&gt;Once we close the IDE and reopen it, now this Schema would always be available to the IDE. For using this, goto the IDE, open the HTML designer and you would see a dropdown on the toolbar of the IDE for selecting &lt;strong&gt;TARGET SCHEMA FOR VALIDATION&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;In the dropdown we will find our custom schema listed and by selecting that schema, we could now have intellisense from our own XSD file&lt;/span&gt;&lt;a href="http://1.bp.blogspot.com/_yP_Ri8BRUho/RkAdRGVydUI/AAAAAAAAAAs/OV_AN_pAFiM/s1600-h/Image4.JPG"&gt;&lt;img style="MARGIN: 0px 10px 10px 0px; FLOAT: left; CURSOR: hand" id="BLOGGER_PHOTO_ID_5062078160761419074" border="0" alt="" src="http://1.bp.blogspot.com/_yP_Ri8BRUho/RkAdRGVydUI/AAAAAAAAAAs/OV_AN_pAFiM/s320/Image4.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;I would thank &lt;/span&gt;&lt;a href="http://blogs.msdn.com/mikhailarkhipov/"&gt;&lt;span style="font-family:verdana;"&gt;Mikhail Arkhipov&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;"&gt; for the help he provided&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-7944928985150161760?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/7944928985150161760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/05/providing-custom-intellisense-in-vsnet.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/7944928985150161760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/7944928985150161760'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/05/providing-custom-intellisense-in-vsnet.html' title='Providing Custom Intellisense in VS.NET IDE (Thanks to Mikhail Arkhipov)'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_yP_Ri8BRUho/RkAGCWVydQI/AAAAAAAAAAM/iMdw75wW7LA/s72-c/Image1.JPG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-392290299445651923</id><published>2007-05-03T09:59:00.001+05:30</published><updated>2009-05-29T17:11:53.105+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Providing Custom Validations in VS.NET IDE</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Hi all,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Just recently, working on Reporting system, I was required to create PDF reports out of HTML pages. I did those successfully using &lt;strong&gt;iTextSharp&lt;/strong&gt;, a free online library for rendering PDFs from HTML.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;In the process, I had to customize the particular HTMLs to contain several constraints and hense I had to validate them at the design level.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;I found a great designer that did the trick. The well known &lt;strong&gt;Visual Studio.NET Designer. &lt;/strong&gt;I decided to use that for my purpose as it did nost ofthe validations all by itself and I just had to add a few more of my custom ones.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Say for example, in my report, I was always required to have three DIVs in my tag in HTML, namely "HEADER", "FOOTER" and "DETAIL"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Now by default there is not such binding for user in case he is making it a regular HTML. But if it a Report then I had to put these validation checks.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;For this I had to tweak the Designer to throw messages to the user if required.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;The best way out seemed to be MACROS at that is what did the trick.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;While creating any macro or a module in a macro project, we always have one Module in it &lt;strong&gt;"EnvironmentEvents". &lt;/strong&gt;This module contains all events pertaining to all the events that occur in the Visual Studio IDE.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;In the EnvironmentEvents module, choose the event&lt;br /&gt;"DocumentEvents_DocumentSaved"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;This event will be called every time a document is saved in Visual Studio IDE.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Here in you could have all your validations and all those will be thrown back to IDE using your own system of exception throwing, which could possibly be via MessageBox or some message in Output Window etc.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Now in order to get the items into Output window or task list, we can use the following piece of code.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;color:#3366ff;"&gt;Dim projItem As EnvDTE.Solution&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;color:#3366ff;"&gt;Dim tw As TaskList = CType(win.Object, TaskList)&lt;br /&gt;win = projItem.DTE.Windows.Item(Constants.vsWindowKindTaskList)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;color:#3366ff;"&gt;tw = CType(win.Object, TaskList)tw.TaskItems.Add("ErrorCategory", Document.Name, "Error Message", vsTaskPriority.vsTaskPriorityHigh, , True, Document.Name, -1, True, True)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;-- Ashutosh&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;&lt;/p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-392290299445651923?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/392290299445651923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/05/providing-custom-validations-in-vsnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/392290299445651923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/392290299445651923'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/05/providing-custom-validations-in-vsnet.html' title='Providing Custom Validations in VS.NET IDE'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-113757064165191530</id><published>2007-04-18T15:48:00.001+05:30</published><updated>2009-05-29T17:12:39.291+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>Properties in .NET</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Last few days have been extremely hectic for me. We have been working with pace to set the tone up for the new HiText reporting tool that we @ EITS are planning to use to generate our reports.&lt;br /&gt;&lt;br /&gt;Finally we got it to work. And in the mean time, I learnt quite a new concepts in the process itself. Be it Reflection, Be it Properties, Dynamically loading and calling assemblies, creating templates to use with Visual Studio IDE, tweeking IDE to implement my own Intellisense and many more..&lt;br /&gt;&lt;br /&gt;Due to the lack of time, I could not update the place as frequently as before. So once I got some time out of work, I concentrated back on putting something up here.&lt;br /&gt;&lt;br /&gt;So here is the first one from me:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;The &lt;strong&gt;PROPERTIES &lt;/strong&gt;in .NET are said to be faster than normal user defined functions.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;But strange enough (to me atleast), the properties that are defined at the class level, at the grassroot level are implemented as functions itself.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Just to confirm the same.....you could create a simple class with a few properties defined. Compile it and then try checking the output in the ILDASM. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;I came across this fact when I was playing around with Reflection and Invoking methods and getting properties to return values by just specifying the names of the properties as string.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Ususally any property in C# is written with two methods (get &amp;amp; set) and this property is in turn implements as two seperate functions. For example if we create a property called Prop1 with methods get and set defined, the they are at root level implemented as the following two functions:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;1. GET - get_Prop1()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;2. SET - set_Prop1()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;I accidentally came across the fact when the compiler told me that I can not create function named get_Prop1 or set_Prop1..........as they already exist ?????????????&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;After a bit of exploration, here is the result .NET properties are implemented as functions itself. If so then how come using Properties be better than using Functions.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Well the .NET compiler are built up and are implemented in such a way so as to give preceeedence to these get and set functions over all other functions and hense they are faster. No special concerns about the same.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Hope this helps someone in there works.....&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;-- Ashutosh Vyas&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-113757064165191530?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/113757064165191530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/04/properties-in-net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/113757064165191530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/113757064165191530'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/04/properties-in-net.html' title='Properties in .NET'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-7628495769907168492</id><published>2007-03-08T17:39:00.000+05:30</published><updated>2007-12-14T14:02:46.171+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BlogPost'/><title type='text'>PDF Utility is ready.</title><content type='html'>&lt;span style=";font-family:verdana;font-size:85%;"  &gt;Hi All,&lt;br /&gt;&lt;br /&gt;Just out of curiosity and a zeal to learn, I started out on making a small utility that would split a given PDF file into pages.&lt;br /&gt;&lt;br /&gt;I did that successfully using iTextSharp, a free Open Source library for PDF generation.&lt;br /&gt;&lt;br /&gt;Next step was to enhance this utility to read and merge different PDFs into one single unit based on any criteria given by the user.&lt;br /&gt;&lt;br /&gt;After quite long I could finish that work and now the utility is ready with the following features:&lt;br /&gt;&lt;br /&gt;1. Split PDF into single page PDF files.&lt;br /&gt;2. Split based on criteria given by user.&lt;br /&gt;3. Select multiple files to MERGE into one.&lt;br /&gt;4. Merge files based on criteria by user.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Further to this, I had a look at another utility called PDFBox and I could read the elementary text out of the PDF as well.&lt;br /&gt;&lt;br /&gt;So now we have a utility that has the power to Split / Merge or even read a PDF file into a text file/ text stream.&lt;br /&gt;&lt;br /&gt;If anyone needs that please get in touch with me.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Ashutosh&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-7628495769907168492?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/7628495769907168492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/03/okay-i-am-almost-done-with-pdf-merging.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/7628495769907168492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/7628495769907168492'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/03/okay-i-am-almost-done-with-pdf-merging.html' title='PDF Utility is ready.'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-4470197405311597599</id><published>2007-02-23T14:42:00.000+05:30</published><updated>2007-10-17T14:11:31.685+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BlogPost'/><title type='text'>PDF Merging and Splitting</title><content type='html'>Working with my collegues on iText and seeing an application that wrote multiple PDF pages and created one document out of it, an idea clicked to me for writing an application that would merge multiple PDFs into one or even Splitt the single PDF into multiple files at will.&lt;br /&gt;&lt;br /&gt;Currently I am done with the merging part and now the app merges the selected PDF files to generate single PDF with all the pDFs merged.&lt;br /&gt;&lt;br /&gt;I am onto the second part: Splitting. I foresee myself completing the basic part in a day or two, i.e. it will take a single PDF and splitt it into multiple files with one page each (for ex- a PDF file with 10 pages will result in 10 PDF files with single page each.)&lt;br /&gt;&lt;br /&gt;Now I am looking to make it more generic like you provide the resulting file name, location and each page in each file and the files are created on that basis.&lt;br /&gt;&lt;br /&gt;Really Looking forward to it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So wait and watch..................&lt;br /&gt;&lt;br /&gt;--Ashutosh&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-4470197405311597599?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/4470197405311597599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/02/pdf-merging-and-splitting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/4470197405311597599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/4470197405311597599'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/02/pdf-merging-and-splitting.html' title='PDF Merging and Splitting'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-4555098700085634632</id><published>2007-02-14T10:11:00.001+05:30</published><updated>2009-07-29T13:52:22.577+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='General'/><title type='text'>Year 2038 problem</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;The Year 2038 problem The Year 2000 problem is understood by most people these days because of the large amount of media attention it received. Most programs written in the C programming language are relatively immune to the Y2K problem, but suffer instead from the Year 2038 problem.&lt;br /&gt;This problem arises because most C programs use a library of routines called the standard time library (time.h). This library establishes a standard 4-byte format for the storage of time values, and also provides a number of functions for converting, displaying and calculating time values.&lt;br /&gt;The standard 4-byte format assumes that the beginning of time is January 1, 1970, at 12:00:00 a.m. This value is 0. Any time/date value is expressed as the number of seconds following that zero value. So the value 919642718 is 919,642,718 seconds past 12:00:00 a.m. on January 1, 1970, which is Sunday, February 21, 1999, at 16:18:38 Pacific time (U.S.). This is a convenient format because if you subtract any two values, what you get is a number of seconds that is the time difference between them. Then you can use other functions in the library to determine how many minutes/hours/days/months/years have passed between the two times. If you have read the Tech Touch on Bits and Bytes, you know that a signed 4-byte integer has a maximum value of 2,147,483,647, and this is where the Year 2038 problem comes from. The maximum value of time before it rolls over to a negative (and invalid) value is 2,147,483,647, which translates into January 19, 2038. On this date, any C programs that use the standard time library will start to have problems with date calculations. This problem is somewhat easier to fix than the Y2K problem on mainframes, fortunately. Well-written programs can simply be recompiled with a new version of the library that uses, for example, 8-byte values for the storage format. This is possible because the library encapsulates the whole time activity with its own time types and functions (unlike most mainframe programs, which did not standardize their date formats or calculations).&lt;br /&gt;So the Year 2038 problem should not be nearly as hard to fix as the Y2K problem was. An alert reader was kind enough to point out that IBM PC hardware suffers from the Year 2116 problem. For a PC , the beginning of time starts at January 1, 1980, and increments by seconds in an unsigned 32-bit integer in a manner similar to UNIX time. By 2116, the integer overflows. Windows NT uses a 64-bit integer to track time. However, it uses 100 nanoseconds as its increment and the beginning of time is January 1, 1601, so NT suffers from the Year 2184 problem.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;-- Ashutosh&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-4555098700085634632?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/4555098700085634632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/02/year-2038-problem-year-2000-problem-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/4555098700085634632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/4555098700085634632'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/02/year-2038-problem-year-2000-problem-is.html' title='Year 2038 problem'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-7673439026555361492</id><published>2007-02-09T10:29:00.001+05:30</published><updated>2009-07-29T13:53:24.120+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>Strange Maxlength  behaviour</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Hi,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Okay another interesting issue. Anyone ever wondered about the MaxLength property of a textbox in .NET.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Yeah by default, the MaxLength is 0 and 0 obviously in this case means INFINITE stating you can put any number of characters in the textbox.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;Theoritically its perfect but practically speaking, it never takes characters more than &lt;strong&gt;32K &lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;WHY....??&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Okay to the extent I got to know about it, here is the reason.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;TEXTBOX ---------object&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;TEXTBOX.TEXT ----------string&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;STRING.LENGTH -------- integer / int32&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;SO basically its the limitation of String Class and its length property (which is of Int32 type)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;that limits the length of a textbox to type (Int32) and hence the reason for limitation of textbox maxlength.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;--Ashutosh&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-7673439026555361492?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/7673439026555361492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/02/strange-maxlength-behaviour.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/7673439026555361492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/7673439026555361492'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/02/strange-maxlength-behaviour.html' title='Strange Maxlength  behaviour'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-7060724466440235932</id><published>2007-02-05T11:27:00.001+05:30</published><updated>2009-07-29T14:01:37.611+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>Creating a new form at runtime....</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Hi all,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Yesterday while supporting user @ &lt;a href="http://www.experts-exchange.com/"&gt;Experts-Exchange&lt;/a&gt;, I came across a question asking if I could create an instance of a new FORM at runtime and show it on the screen.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Well thinking at the first instance, looks quite straight forward. Theoritically its like creating a new instance of an object and using its methods and properties.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;But practically its not as easy as with any other object. Theoritically the below code shows what exactly he wanted and its exactly what we can do in general coding with any other objects.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;String strFormName = "Form1";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Form frmNew = (Form)(strFormName); //A new form with the name "Form1"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;frmNew.Show();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;So exploring through for the same at first hit it looked impossible and thats what I thought.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;But then I was guided to an article on MSDN that explained using &lt;strong&gt;Activator.CreateInstance&lt;/strong&gt; For all such tasks and it looked quite obvious.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Here's the code for it.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;String strFormName = "Form1";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;System.Reflection.Assembly asm = System.Reflection.Assembly.GetExecutingAssembly();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Form frmNew = (Form)asm.CreateInstance(asm.Getname.name + "." + strFormname, true);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;frmNew.Show();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Hope someday this would be of use to me as well ;-)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;--Ashutosh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-7060724466440235932?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://msdn2.microsoft.com/en-us/library/system.activator.createinstance.aspx' title='Creating a new form at runtime....'/><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/7060724466440235932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/02/creating-new-form-at-runtime.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/7060724466440235932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/7060724466440235932'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/02/creating-new-form-at-runtime.html' title='Creating a new form at runtime....'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-1405620822836062633</id><published>2007-01-29T10:34:00.001+05:30</published><updated>2009-07-29T13:59:53.544+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'></title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Hi all,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Here is a small doc for all who always wanted to know the Keyboard shortcuts for the general tasks in VS.NET IDE like commenting a code block, switching between the different views etc.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Download the doc from &lt;/span&gt;&lt;a href="http://www.geocities.com/ashutosh9910/VSNET_Shortcut_Keys.doc"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;THIS&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt; link.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;--Ashutosh&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-1405620822836062633?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/1405620822836062633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/01/hi-all-here-is-small-doc-for-all-who.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/1405620822836062633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/1405620822836062633'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/01/hi-all-here-is-small-doc-for-all-who.html' title=''/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-7880716319332654177</id><published>2007-01-10T11:41:00.000+05:30</published><updated>2007-10-17T14:11:31.688+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BlogPost'/><title type='text'>A new Task</title><content type='html'>Okay so I have been assigned first task at EITS and I am already feeling the difference between the level of working here and in Avinex.&lt;br /&gt;&lt;br /&gt;I have been assigned the task to look at the prospects of implementing ECLIPSE IDE for Report development.&lt;br /&gt;&lt;br /&gt;All these days, I have known ECLIPSE as an IDE for development of classes and writing code in JAVA. Just a user friendly interface for writing code and nothing much. But here while exploring, I realized its actually a lot more than that BUT SADLY FOR JAVA DEVELOPERS.&lt;br /&gt;&lt;br /&gt;Apart from a mere few plugins for development with C/C++ and C# there is not much of a support in ECLIPSE for other languages. Still looking into the report designer for ECLIPSE. &lt;br /&gt;&lt;br /&gt;The report designer has an Easy to use GUI for Rapid development of Reports and quick visualization of the same.&lt;br /&gt;&lt;br /&gt;Best part is that the underlying code is all XML for this report and hence a universal structure. But the problem is the schema it uses for interpreting all HTML and SCRIPTING involved.&lt;br /&gt;&lt;br /&gt;It literally dumps all the HTML and all expressions and evaluations that we add to the reports into this XML and then it basically kinda executes this XML while showing the report.&lt;br /&gt;&lt;br /&gt;I am still looking at the prospects of using it in my Framework project, but at the moment there looks nothing much in it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Ashutosh&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-7880716319332654177?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/7880716319332654177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/01/new-task.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/7880716319332654177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/7880716319332654177'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/01/new-task.html' title='A new Task'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-1961853668816906767</id><published>2006-12-29T16:45:00.001+05:30</published><updated>2009-07-29T13:57:30.165+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>strReverse in C#</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Just came across this small piece of code while I was looking out to reverse a string in C# and soon discovered there was nothing like strReverse (in VB) in C#.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;So obviously needed to look for an alternate. Got quite a few of them but this one looked quite nifty and sleek. Take a look&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold;font-family:verdana;" &gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;blockquote style="COLOR: rgb(51,102,255)"&gt;private string StringReverse(string ToReverse)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;Array arr = ToReverse.ToCharArray();&lt;br /&gt;&lt;br /&gt;Array.Reverse( arr );// reverse the string&lt;br /&gt;&lt;br /&gt;char[] c = (char[])arr;&lt;br /&gt;&lt;br /&gt;byte[] b = System.Text.Encoding.Default.GetBytes(c);&lt;br /&gt;&lt;br /&gt;return System.Text.Encoding.Default.GetString(b);&lt;br /&gt;&lt;br /&gt;}&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="FONT-WEIGHT: bold;font-family:verdana;" &gt;-- Ashutosh&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-1961853668816906767?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/1961853668816906767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2006/12/strreverse-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/1961853668816906767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/1961853668816906767'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2006/12/strreverse-in-c.html' title='strReverse in C#'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-3579510480634850993</id><published>2006-12-06T12:46:00.000+05:30</published><updated>2008-02-07T16:28:41.649+05:30</updated><title type='text'>My Links</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;HI,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Posting after a long time. Got a bit busy with my new house. The construction has started and am really looking forward to it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;BTW. This post wasn't meant for this, but I came across quite a few interesting topics &lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;within these days and decided to post them as a seperate post so that it could be expanded more and more to encorporate new links as and when they are found. Here are a few to start off:---------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://www.xtremedotnettalk.com/showthread.php?t=87847"&gt;Introduction to Object Oriented Programming - I&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. &lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;a href="http://www.xtremedotnettalk.com/showthread.php?t=87848"&gt;Introduction to Object Oriented Programming - II&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3. &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;a style="FONT-FAMILY: verdana" href="http://www.xtremedotnettalk.com/showthread.php?t=87853"&gt;&lt;span style="font-family:verdana;"&gt;Introduction to Object Oriented Programming - III&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;4.&lt;/span&gt; &lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;a href="http://www.xtremedotnettalk.com/showthread.php?t=88333"&gt;&lt;span style="font-family:verdana;"&gt;Introduction to Object Oriented Programming - IV&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5. &lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;a href="http://www.xtremedotnettalk.com/showthread.php?t=89346"&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-family:verdana;"&gt;Introduction to Object Oriented Programming - V&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;6. &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;a href="http://www.xtremedotnettalk.com/showthread.php?t=91386"&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-family:verdana;"&gt;Introduction to Object Oriented Programming - VI&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong style="FONT-FAMILY: verdana"&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;7. &lt;a href="http://www.xtremedotnettalk.com/showthread.php?t=97910"&gt;Overview of Garbage Collection and IDisposable&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;8. &lt;a href="http://www.developerfusion.co.uk/utilities/convertvbtocsharp.aspx"&gt;Convert VB.NET Code to C# and Vice Versa&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;9. &lt;a href="http://www.c-sharpcorner.com/UploadFile/bhakeeswaran/BPNetPerformance107292006234943PM/BPNetPerformance1.aspx?ArticleID=46e2174d-2011-4953-bf09-7db0a712839e"&gt;Best Practices For .NET Performance&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;10. &lt;a href="http://www.xtremedotnettalk.com/showthread.php?t=97390"&gt;Unions in C#&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I would like people to post comments here regarding the links and would be thankful to people if they feel they could contribute to the same and provide me the links for such interesting articles.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Ashutosh&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-3579510480634850993?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/3579510480634850993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2006/12/my-links.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/3579510480634850993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/3579510480634850993'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2006/12/my-links.html' title='My Links'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-2570636183310792266</id><published>2006-12-05T16:56:00.000+05:30</published><updated>2006-12-05T17:05:08.911+05:30</updated><title type='text'>A new beginning</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Hi All,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Today I had a new beginning in my life when I stepped out of Avinex Software Pvt. Ltd. and stepped into eXtensible IT Solutions. Yes I switched my Job.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Well not so obviously, the key factor behind this change was not monetory. Yes believe me.....&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;I always wanted to grow. Grow in terms of technology, in terms of responsibility and also financially. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;At Avinex, I had a few concerns of mine. Ever since I started programming in VB6.0, I wanted to take a dip into the world of C++ programming as well and with the advent of .NET, C# became my new affair. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Suddenly got the opportunity of being a part of a team which was bewing created for development of a product which was supposed to be working as a Middle Tier for a multi ties application AND THAT TOO IN C#. I saw this opportunity as a big one in terms of gaining a good knowledge of OO concepts as well as C#. So grabbed it with both hands.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Secondly at Avinex, I was suddenly finding myself looking straight into a glass ceiling where I could see opportunities of growth but which really were not there. This was getting on me.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;And last but not the least, a raise of almost 10 grands a month is never like refusing.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Anyways thats an old story now. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;The latest is that I am into eXtensible and am looking forward to a great time over there.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Cheers&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;--Ashutosh&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-2570636183310792266?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/2570636183310792266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2006/12/new-beginning.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/2570636183310792266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/2570636183310792266'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2006/12/new-beginning.html' title='A new beginning'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-972845252427416847</id><published>2006-11-22T17:31:00.001+05:30</published><updated>2009-07-29T13:56:55.540+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>A new experience</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Today while flirting with ListBoxes and comboboxes, I figured out a strange fact (possibly a bug) with the ListBoxes (infact all List Controls).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Whenever you try to add any attribute to any listitem at runtime using&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;blockquote style="COLOR: rgb(153,153,255);font-family:verdana;" &gt;&lt;span style="font-size:85%;"&gt;ListItem.Attributes.Add("onclick","alert('I m a listitem')")&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;It does add the attribute to the listitem but never really renders the same.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Eg - In case you add an attribute to the listitem above, when you check the page source, you will see something like this:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;blockquote style="COLOR: rgb(153,153,255);font-family:verdana;" &gt;&lt;span style="font-size:85%;"&gt;&amp;lt; option onclick="alert('i m a listitem')" &amp;gt; ListItem &amp;lt;/option &amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;So the attribute has been added but when you click on this listitem, the alert will never come up.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="FONT-FAMILY: verdana"&gt;Why Attributes Cannot Be Applied to ListItems of a List Control&lt;br /&gt;&lt;/b&gt;&lt;span style="font-family:verdana;"&gt;Unfortunately none of the list controls render their items' attributes. This is clearly a known bug, as there are plenty of discussions on this topic &lt;/span&gt;&lt;a style="FONT-FAMILY: verdana" href="http://groups.google.com/groups?hl=en&amp;amp;q=items+attributes+asp.net&amp;amp;qt_s=Search"&gt;on the newsgroups&lt;/a&gt;&lt;span style="font-family:verdana;"&gt;. If you use &lt;/span&gt;&lt;a style="FONT-FAMILY: verdana" href="http://www.aisto.com/roeder/dotnet/"&gt;Reflector&lt;/a&gt;&lt;span style="font-family:verdana;"&gt; to poke around the source code of the list controls you'll find that they simply omit any sort of writing of the Attributes. Part of this is probably due to the fact that the &lt;/span&gt;&lt;code style="FONT-FAMILY: verdana"&gt;ListItem&lt;/code&gt;&lt;span style="font-family:verdana;"&gt; class, which is the class that represents each instance of a list control prior to being rendered. The &lt;/span&gt;&lt;code style="FONT-FAMILY: verdana"&gt;Attributes &lt;/code&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;collection is defined in the &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;code style="FONT-FAMILY: verdana"&gt;&lt;/code&gt;&lt;code style="FONT-FAMILY: verdana"&gt;System.Web.UI.WebControls.WebControl&lt;/code&gt;&lt;span style="font-family:verdana;"&gt; class and automatically is persisted to view state, so that it's values persist across postbacks. Part of the problem lies in that the &lt;/span&gt;&lt;code style="FONT-FAMILY: verdana"&gt;ListItem&lt;/code&gt;&lt;span style="font-family:verdana;"&gt; class does &lt;/span&gt;&lt;i style="FONT-FAMILY: verdana"&gt;not&lt;/i&gt; derive from &lt;code style="FONT-FAMILY: verdana"&gt;WebControl&lt;/code&gt;&lt;span style="font-family:verdana;"&gt;. Furthermore, while it does have an &lt;/span&gt;&lt;code style="FONT-FAMILY: verdana"&gt;Attributes&lt;/code&gt;&lt;span style="font-family:verdana;"&gt; property, the values are &lt;/span&gt;&lt;b style="FONT-FAMILY: verdana"&gt;NOT&lt;/b&gt;&lt;span style="font-family:verdana;"&gt; persisted to view state.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://aspnet.4guysfromrolla.com/articles/091405-1.aspx"&gt;More On This And a possible Solution to this BUG on 4GuysFromRolla&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;br /&gt;BTW : - I am almost done with my CodeConvertor utility and will post the same as soon as it is complete.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Ashutosh&lt;br /&gt;PS- Hah it took me quite some time to put the line &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&amp;lt; option onclick="alert('i m a listitem')" &amp;gt; ListItem &amp;lt;/option &amp;gt;&lt;br /&gt;the way it looks now as the site blocks all HTML tags....;-)&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-972845252427416847?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/972845252427416847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2006/11/new-experience.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/972845252427416847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/972845252427416847'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2006/11/new-experience.html' title='A new experience'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-116279395117312709</id><published>2006-11-13T11:15:00.001+05:30</published><updated>2009-07-29T13:56:19.534+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Utilities'/><title type='text'>Web Config Editor</title><content type='html'>Okay, so finally I finished with my web.config editor application. Removed a few shortcomings from it like. Now you have a flexibility of importing / exporting the encryption key within the application and also you can create a new key to encrypt.&lt;br /&gt;&lt;br /&gt;Every time a new key is created, the older one gets replaced in the web.config as well.&lt;br /&gt;&lt;br /&gt;Still looking for some host. Will try it at geocities.&lt;br /&gt;&lt;br /&gt;The whole source code is in VB.NET and is available for download at geocities following &lt;a href="http://www.geocities.com/ashutosh9910/WebConfigEditor.zip"&gt;THIS&lt;/a&gt; link.&lt;br /&gt;&lt;br /&gt;You can download and play with it the way you want. And please let me know if you get to improve on the same.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Ashutosh&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-116279395117312709?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/116279395117312709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2006/11/okay-so-finally-i-finished-with-my-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/116279395117312709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/116279395117312709'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2006/11/okay-so-finally-i-finished-with-my-web.html' title='Web Config Editor'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-116229659760094004</id><published>2006-10-31T17:21:00.000+05:30</published><updated>2006-10-31T17:39:57.666+05:30</updated><title type='text'>Finally !!!!!!!!!!!!!!!!!</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: verdana;"&gt;Finallly !!!!!!!!!!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Yessss, After a week's head bashing I am ready with my Web.Config editor. Since long, I had been looking for a UI to edit web.config keys in my Application.&lt;br /&gt;&lt;br /&gt;As we all know that the key values in development environment are rarely same as in staging and production env. So I needed a UI to edit the config keys and save the web.config file with these new values.&lt;br /&gt;&lt;br /&gt;Found quite a few tools for the same but they all were not that flexible. They lacked a few things like Encryption of file while saving and before that, decrypting the same if it is encrypted. So I landed on the conclusion that I would make one of my own.&lt;br /&gt;&lt;br /&gt;And yes, after a week's efforts, I finished with a working product for now. It has quite a few shortcomings but surely it serves my purpose and hopefully of a lot others. But there are quite a few catches.&lt;br /&gt;&lt;br /&gt;1. It works with .NET Framework 2.0 only as the Encryption-Decryption libraries used are a part of 2.0 only.&lt;br /&gt;&lt;br /&gt;2. Currently I am handling only 2 sections of the config file : &lt;span style="font-weight: bold;"&gt;appSettings&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;connectionString&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;3. You need the key file imported in your system if reading an Encrypted web.config file.&lt;br /&gt;&lt;br /&gt;Would be looking to eliminate these shortcomings pretty soon.&lt;br /&gt;&lt;br /&gt;Oh and BTW I am also looking for a good place to upload this app. so that it could be available to others as well.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- Ashutosh&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-116229659760094004?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/116229659760094004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2006/10/finally.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/116229659760094004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/116229659760094004'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2006/10/finally.html' title='Finally !!!!!!!!!!!!!!!!!'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-116192951152956457</id><published>2006-10-27T11:38:00.000+05:30</published><updated>2007-10-16T17:36:34.681+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='aboutthisblog'/><title type='text'>My Blog</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;I would like this blog to be rather a collection of my code snippets that I found handy and useful from time to time, so that they could be useful for others as well.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Now since I have been working on .NET since last couple of yrs. This obviously would mean a lot of them will have to be from the same background but from time to time I would try to add code snippets from other technologies as well.&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;I would absolutely love if someone wants to contribute to the blog. &lt;/span&gt;&lt;a href="mailto:vyasashutosh@gmail.com"&gt;&lt;span style="font-family:verdana;"&gt;Drop in a mail to me&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;"&gt; if you wish so.&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:verdana;"&gt;-- Ashutosh&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-116192951152956457?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/116192951152956457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2006/10/my-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/116192951152956457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/116192951152956457'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2006/10/my-blog.html' title='My Blog'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-116132228920113189</id><published>2006-10-20T23:25:00.000+05:30</published><updated>2006-10-20T11:01:29.206+05:30</updated><title type='text'>Yeess I am into it as well....</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: verdana;"&gt;Better late than never. Even after being so tech savvy (yes I consider myself one ;-) I always stayed away from this blogging thing. Somehow could not understand the funda .....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;But now I hope I can sum up my daily ideas into a digest and put them up here. Let see till when it continues. Hope it lasts long unlike earlier....&lt;br /&gt;&lt;br /&gt;Not quite impressive like the other blogs I have seen but hope I would pick up with time....&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-116132228920113189?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/116132228920113189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2006/10/yeess-i-am-into-it-as-well.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/116132228920113189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/116132228920113189'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2006/10/yeess-i-am-into-it-as-well.html' title='Yeess I am into it as well....'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36333526.post-3975898885212879488</id><published>2006-10-17T10:06:00.001+05:30</published><updated>2008-08-29T14:40:56.848+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Support'/><title type='text'>Support</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;The posts here would definitely not be the ones people would be alien about but these are mere a compilation of the topics that I learnt in my day to day working and have found useful conceptually.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;I would welcome anyone who would like to share his/her thoughts and findings here to make it a complete Knowledge Base.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;If you find the contents here a touch useful, please keep the chain going by linking to this blog so that others get a benefit as well.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;em&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Text Link&lt;/span&gt;&lt;/em&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://vyasashutosh.blogspot.com/search/label/BlogPost"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Ashutosh Vyas's Blog&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.geocities.com/ashutosh9910/iFrame.html" width="400" height="80"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;em&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Button Link&lt;/span&gt;&lt;/em&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://vyasashutosh.blogspot.com/search/label/BlogPost"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;img src="http://www.geocities.com/ashutosh9910/rss_button.png" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;iframe src="http://www.geocities.com/ashutosh9910/iFrame2.html" width="400" height="80"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;&lt;u&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/u&gt;&lt;/em&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Thanks &amp;amp; Regards&lt;br /&gt;&lt;br /&gt;--Ashutosh Vyas &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36333526-3975898885212879488?l=vyasashutosh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vyasashutosh.blogspot.com/feeds/3975898885212879488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vyasashutosh.blogspot.com/2007/10/support.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/3975898885212879488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36333526/posts/default/3975898885212879488'/><link rel='alternate' type='text/html' href='http://vyasashutosh.blogspot.com/2007/10/support.html' title='Support'/><author><name>Ashu</name><uri>http://www.blogger.com/profile/11228542521067549403</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_yP_Ri8BRUho/SLe5yKVlYzI/AAAAAAAAAKI/El__8jOKoeM/s1600-R/n702308609_9764.jpg'/></author><thr:total>0</thr:total></entry></feed>
