<?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-9590749</id><updated>2012-01-07T22:38:50.527-08:00</updated><category term='SaaS'/><category term='Flavors of Cloud'/><category term='DTS'/><category term='IaaS'/><category term='Excel Upload'/><category term='PaaS'/><category term='Cloud Computing'/><category term='Javascript'/><category term='IT'/><category term='IMEX'/><category term='Change Management'/><category term='Problem Management'/><category term='Cloud Benefits'/><category term='SSIS'/><category term='MAXRROWSTOSCAN'/><title type='text'>Ganesh's Professional Blog</title><subtitle type='html'>Find your solution here...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9590749.post-3192108194509892679</id><published>2011-05-21T10:03:00.001-07:00</published><updated>2011-05-21T10:13:34.875-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IaaS'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud Benefits'/><category scheme='http://www.blogger.com/atom/ns#' term='SaaS'/><category scheme='http://www.blogger.com/atom/ns#' term='PaaS'/><category scheme='http://www.blogger.com/atom/ns#' term='Flavors of Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud Computing'/><title type='text'>Flavors of Cloud</title><content type='html'>&lt;p&gt;Cloud can be presented in three flavors. They are &lt;/p&gt;  &lt;p&gt;· &lt;b&gt;Infrastructure-as-a-Service (IAAS)&lt;/b&gt;, Eg: Amazon web services[ Amazon EC2], Rackspace etc &lt;/p&gt;  &lt;p&gt;· &lt;b&gt;Platform-as-a-Service (PAAS)&lt;/b&gt; Eg: Microsoft Azure Platform, Google App Engine. and &lt;/p&gt;  &lt;p&gt;· &lt;b&gt;Software-as-a-Service&lt;/b&gt; &lt;b&gt;(SAAS&lt;/b&gt;) Eg: SalesForce.com, Google Apps, Microsoft BPOs, Office365, SharePoint Online. &lt;/p&gt;  &lt;p&gt;Depending upon the customer’s needs, one of the formats of cloud offering can be adopted. The benefits of each of the above flavors vary. In a nutshell, the benefits of the cloud offerings can be shown as under for the various flavors. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/presspass/presskits/cloud/docs/The-Economics-of-the-Cloud.pdf"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Courtesy Microsoft Corporation" border="0" alt="Courtesy Microsoft Corporation" src="http://lh3.ggpht.com/_R6oSap96cP4/TdfwXNYPIAI/AAAAAAAAAA4/JLC1RPFWIK4/image%5B6%5D.png?imgmax=800" width="422" height="268" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-3192108194509892679?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/3192108194509892679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=3192108194509892679' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/3192108194509892679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/3192108194509892679'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2011/05/flavors-of-cloud.html' title='Flavors of Cloud'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_R6oSap96cP4/TdfwXNYPIAI/AAAAAAAAAA4/JLC1RPFWIK4/s72-c/image%5B6%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-344807356489837963</id><published>2011-05-08T19:04:00.000-07:00</published><updated>2011-05-09T02:00:45.739-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Change Management'/><category scheme='http://www.blogger.com/atom/ns#' term='Problem Management'/><category scheme='http://www.blogger.com/atom/ns#' term='IT'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud Computing'/><title type='text'>Problem Management</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Problem Management is the Process responsible for managing the Lifecycle of all Problems. The primary Objectives of Problem Management are to prevent Incidents from happening, and to minimize the Impact of Incidents that cannot be prevented. (&lt;a href="http://www.best-management-practice.com/gempdf/ITIL_Glossary_V3_1_24.pdf"&gt;ITIL® V3 Glossary v3.1.24, 11 May 2007&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;While Incident Management is responsible for the fix or workaround, ultimately it is the Problem Management that performs the root cause analysis for chronic Incidents and provides a permanent solution.&lt;br /&gt;&lt;br /&gt;There are two approaches towards managing a problem&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;When a problem has occurred and a solution need to be found, it is considered Reactive Problem Management&lt;/li&gt;&lt;li&gt;Proactive problem Management helps to manage a problem proactively (opposite opposite of reactive) by trying to anticipate problems and prevent them from happening.&lt;/li&gt;&lt;/ul&gt;When a problem has occurred and a solution need to be found, it is considered Reactive Problem Management&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;See also&lt;/strong&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://ganeshprof.blogspot.com/2011/05/change-management.html"&gt;Change Management&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-344807356489837963?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/344807356489837963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=344807356489837963' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/344807356489837963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/344807356489837963'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2011/05/problem-management.html' title='Problem Management'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-7701666299595816856</id><published>2011-05-08T18:44:00.000-07:00</published><updated>2011-05-08T22:02:41.481-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Change Management'/><category scheme='http://www.blogger.com/atom/ns#' term='IT'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud Computing'/><title type='text'>Change Management</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Change Management&lt;/b&gt; is an essential process of any IT department. Change management is a structured approach to transitioning individuals, teams and organizations from a current state to a desired future state. Change Management ensures that only authorized and carefully considered Changes are implemented. Changes can be planned and unplanned and or emergency Changes and there is a process to handle both.&lt;br /&gt;&lt;br /&gt;There are a number of business drivers for a change management process:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Compliance - Your industry may require that certain changes be reviewed, approved, documented, and deployed in a methodical way.&lt;/li&gt;&lt;li&gt;Productivity - The smallest change in a user interface can result in hours of lost productivity if users aren't given advance warning or training.&lt;/li&gt;&lt;li&gt;Reliability - Prevent the deployment of changes that may break existing workflows or processes.&lt;/li&gt;&lt;/ol&gt;Change management processes attempt to answer all or some of the following questions:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Who approved and/or made the change?&lt;/li&gt;&lt;li&gt;Why was the change needed?&lt;/li&gt;&lt;li&gt;When was the change made?&lt;/li&gt;&lt;li&gt;How was the change deployed?&lt;/li&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;strong&gt;See also&lt;/strong&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://ganeshprof.blogspot.com/2011/05/problem-management.html"&gt;Problem Management&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-7701666299595816856?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/7701666299595816856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=7701666299595816856' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/7701666299595816856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/7701666299595816856'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2011/05/change-management.html' title='Change Management'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-1280614746053467362</id><published>2007-10-22T16:50:00.000-07:00</published><updated>2007-10-22T17:04:41.124-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Excel Upload'/><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='DTS'/><category scheme='http://www.blogger.com/atom/ns#' term='IMEX'/><category scheme='http://www.blogger.com/atom/ns#' term='MAXRROWSTOSCAN'/><title type='text'>Excel Connection in SSIS</title><content type='html'>While trying to load Excel files, by default SSIS will consider first 8 rows to determine the data type of each column. Refer &lt;a href="http://support.microsoft.com/kb/189897/en-us"&gt;http://support.microsoft.com/kb/189897/en-us&lt;/a&gt; regarding this. So, cases where the first 8-10 rows have empty data, the data type selected by SSIS may not be correct and we may face problems with uploading/transforming the data in these columns.&lt;br /&gt;&lt;br /&gt;We can resolve this issue by adding "IMEX=1; MAXROWSTOSCAN=0" to the excel connection string extended properties. A typical excel connection string after adding the above properties will look as follows:&lt;br /&gt;&lt;br /&gt;&lt;div style="FONT-SIZE: 85%; OVERFLOW: auto; WIDTH: 400px; BORDER-TOP-STYLE: solid; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; HEIGHT: 75px"&gt;&lt;pre&gt;&lt;br /&gt;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Test.xls;Extended Properties="EXCEL 8.0;HDR=YES;IMEX=1; MAXROWSTOSCAN=0";&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-1280614746053467362?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/1280614746053467362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=1280614746053467362' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/1280614746053467362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/1280614746053467362'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2007/10/excel-connection-in-ssis.html' title='Excel Connection in SSIS'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-9146065663541702483</id><published>2007-03-12T16:24:00.000-07:00</published><updated>2011-05-08T21:57:53.532-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><title type='text'>Writing Javascript from the Server Side</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Most of the time we might be require javascript to be created dynamically. This is required in most of the cases when you want to show some alert or confirm messages to the user. Sometimes, it may require to generate these javascript dynamically as we might need to show / process some values which are available from the serverside to these javascript functions.&lt;br /&gt;&lt;br /&gt;This piece of code, displays the contents of the textbox in a message box to the user. &lt;br /&gt;&lt;br /&gt;The HTML....&lt;br /&gt;&lt;br /&gt;&lt;div style="border-left-style: solid; border-right-style: solid; border-top-style: solid; font-size: 85%; height: 200px; overflow: auto; width: 400px;"&gt;&lt;pre&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;form runat="server"&amp;gt;&lt;br /&gt;&amp;lt;asp:TextBox id="TextBox1" runat="server"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;br /&gt;&amp;lt;asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Show Alert"&amp;gt;&amp;lt;/asp:Button&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;&amp;lt;asp:literal runat="server" id="ltScript"&amp;gt;&amp;lt;/asp:literal&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The Code...&lt;br /&gt;&lt;br /&gt;&lt;div style="border-left-style: solid; border-right-style: solid; border-top-style: solid; font-size: 85%; height: 200px; overflow: auto; width: 400px;"&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt;void&lt;/span&gt; Button1_Click(&lt;span style="color: blue;"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;Literal ltScript = (Literal) Page.FindControl(&lt;span style="color: red;"&gt;"ltScript"&lt;/span&gt;);&lt;br /&gt;ltScript.Text = &lt;span style="color: red;"&gt;"alert('"&lt;/span&gt; + TextBox1.Text + &lt;span style="color: red;"&gt;"')"&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;See also&lt;/strong&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://ganeshprof.blogspot.com/2005_01_01_archive.html"&gt;trim method in JavaScript&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-9146065663541702483?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/9146065663541702483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=9146065663541702483' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/9146065663541702483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/9146065663541702483'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2007/03/writing-javascript-from-server-side.html' title='Writing Javascript from the Server Side'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-115803748112370011</id><published>2006-09-11T22:03:00.000-07:00</published><updated>2007-02-05T02:11:05.330-08:00</updated><title type='text'>Set the Account Expiry property in LDAP</title><content type='html'>In many forums, I have found the question of how to set the AccountExpiry property in LDAP. I saw these when I was facing such a similar issue. Most of the forums did not mention much or those which mentioned something were incomplete. That is why I thought of blogging my solution. &lt;br /&gt;&lt;br /&gt;This piece of code, is the one which I use to create a temporary user for my application. This can be helpful when you want to create a user whose account will expire after a certain period of time. Here I set it as 90 days.&lt;br /&gt;&lt;br /&gt;The Code...&lt;br /&gt;&lt;br /&gt;&lt;div style="OVERFLOW: auto; WIDTH: 400px; BORDER-TOP-STYLE: solid; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; HEIGHT: 200px;font-size:85%;"&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;void&lt;/span&gt; SetAccountExpiry(&lt;span style="color:blue;"&gt;string&lt;/span&gt; UserName)&lt;br /&gt;{&lt;br /&gt; DirectoryEntry UserDE = &lt;span style="color:blue;"&gt;new&lt;/span&gt; DirectoryEntry(LDAPPath, LDAPUserName, LDAPPwd);&lt;br /&gt;&lt;br /&gt; DirectorySearcher oSearch = &lt;span style="color:blue;"&gt;new&lt;/span&gt; DirectorySearcher(UserDE);&lt;br /&gt; oSearch.Filter = "(SAMAccountName=" + UserName + ")";&lt;br /&gt; SearchResult oResult = oSearch.FindOne();&lt;br /&gt; UserDE = oResult.GetDirectoryEntry();&lt;br /&gt;&lt;br /&gt; DateTime accExp = DateTime.Now.AddDays(90);&lt;br /&gt; int64 accExpNum = accExp.ToFileTime();&lt;br /&gt; UserDE.Properties["accountExpires"].Value = GetLargeinteger(accExpNum);&lt;br /&gt; UserDE.CommitChanges();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;IADsLargeinteger GetLargeinteger(&lt;span style="color:blue;"&gt;long&lt;/span&gt; val)&lt;br /&gt;{                &lt;br /&gt; IADsLargeinteger largeint = &lt;span style="color:blue;"&gt;new&lt;/span&gt; Largeinteger();&lt;br /&gt; largeint.HighPart = (&lt;span style="color:blue;"&gt;int&lt;/span&gt;) (val &gt;&gt; 32);&lt;br /&gt; largeint.LowPart = (&lt;span style="color:blue;"&gt;int&lt;/span&gt;) (val &amp; 0xFFFFFFFF);&lt;br /&gt; &lt;span style="color:blue;"&gt;return&lt;/span&gt; largeInt;                &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Hope this code was helpful. Comments and suggestions are always welcome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-115803748112370011?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/115803748112370011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=115803748112370011' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115803748112370011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115803748112370011'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2006/09/set-account-expiry-property-in-ldap.html' title='Set the Account Expiry property in LDAP'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-115761970418715001</id><published>2006-09-07T01:58:00.000-07:00</published><updated>2007-02-12T01:55:23.130-08:00</updated><title type='text'>Creating Custom App Settings in Web.Config</title><content type='html'>Most of the application requires lots of settings to be specified in the App Settings. Unless you manage that in a neat way, it will soon become a headache for you.&lt;br /&gt;&lt;br /&gt;.Net helps you out in this situation by allowing you to have custom AppSettings in your web.config. This will help you to group your appSettings in a more efficient manner so that management becomes much easier.&lt;br /&gt;&lt;br /&gt;In this blog, I have a sample code which lets you to retrieve the values from the custom AppSettings tag in your web.config.&lt;br /&gt;&lt;br /&gt;The Code....&lt;br /&gt;&lt;br /&gt;&lt;div style="OVERFLOW: auto; WIDTH: 400px; BORDER-TOP-STYLE: solid; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; HEIGHT: 200px;font-size:85%;"&gt;&lt;pre&gt;&lt;br /&gt;// Usage&lt;br /&gt;&lt;span style="color:blue;"&gt;string&lt;/span&gt; MyKey = GetSettings ("Mykey");&lt;br /&gt;&lt;br /&gt;// The method&lt;br /&gt;&lt;span style="color:blue;"&gt;private string&lt;/span&gt; GetSettings(&lt;span style="color:blue;"&gt;string&lt;/span&gt; Key)&lt;br /&gt;{&lt;br /&gt; System.Collections.Specialized.NameValueCollection obj = (System.Collections.Specialized.NameValueCollection) System.Configuration.ConfigurationSettings.GetConfig("MySettings");&lt;br /&gt; &lt;span style="color:blue;"&gt;return &lt;/span&gt;obj[Key].ToString();&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Web.config...&lt;br /&gt;&lt;div style="OVERFLOW: auto; WIDTH: 400px; BORDER-TOP-STYLE: solid; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; HEIGHT: 200px;font-size:85%;"&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;!-- Defining a new section --&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;configSections&amp;gt;&lt;br /&gt; &amp;lt;section name="MySettings" &lt;br /&gt;                 type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /&amp;gt;&lt;br /&gt;&amp;lt;/configSections&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- The New Section --&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;MySettings&amp;gt;&lt;br /&gt; &amp;lt;add key="Mykey" value="MyKeyValue" /&amp;gt;&lt;br /&gt;&amp;lt;/MySettings&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-115761970418715001?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/115761970418715001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=115761970418715001' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115761970418715001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115761970418715001'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2006/09/creating-custom-app-settings-in.html' title='Creating Custom App Settings in Web.Config'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-115408521010876317</id><published>2006-07-28T04:07:00.000-07:00</published><updated>2006-08-21T21:36:46.160-07:00</updated><title type='text'>Highlight rows in a DataGrid</title><content type='html'>&lt;p&gt;Here is another useful piece of code which can be helpful for novice programmers.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;DataGrid&lt;/em&gt; is a very nice tool to present the data. It is quite easy and once you start using that, I am sure, anybody would enjoy using that control. We can bind a grid to a dataset in just two steps.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Assign the &lt;em&gt;DataSource&lt;/em&gt; property of the grid to a DataObject. The DataObject can be anything from a &lt;em&gt;DataSet&lt;/em&gt; to an array.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Call the &lt;em&gt;DataBind()&lt;/em&gt; method to bind the data.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;We can do further processing in the control in its &lt;em&gt;ItemDataBound&lt;/em&gt; event.&lt;br /&gt;&lt;br /&gt;Once you have bound the data, the ItemDataBound even can be used to do furthur processing.&lt;br /&gt;&lt;br /&gt;In this example I present how to mark certain rows in a &lt;em&gt;DataGrid&lt;/em&gt; based on some data. Here I use the &lt;em&gt;Employees&lt;/em&gt; table in the &lt;em&gt;Northwind&lt;/em&gt; database. I populate a grid with data and mark the Employees whose city is "Seattle"&lt;br /&gt;&lt;br /&gt;The Code...&lt;br /&gt;&lt;div style="OVERFLOW: auto; WIDTH: 400px; BORDER-TOP-STYLE: solid; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; HEIGHT: 200px; BORDER-BOTTOM-STYLE: solidfont-family:courier new;font-size:85%;"  &gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color:blue;"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;      DataGrid1.DataSource = GetData();&lt;br /&gt;      DataGrid1.DataBind();&lt;br /&gt;}&lt;br /&gt;   &lt;br /&gt;&lt;span style="color:blue;"&gt;void&lt;/span&gt; DataGrid1_ItemDataBound(&lt;span style="color:blue;"&gt;object&lt;/span&gt; sender, DataGridItemEventArgs e)&lt;br /&gt;{&lt;br /&gt;      &lt;span style="color:blue;"&gt;if&lt;/span&gt;(e.Item.ItemType == ListItemType.Item  e.Item.ItemType == ListItemType.AlternatingItem)&lt;br /&gt;      {&lt;br /&gt;            &lt;span style="color:blue;"&gt;if&lt;/span&gt; (e.Item.Cells[4].Text == "Seattle") // Cell4 Contains the City&lt;br /&gt;            {&lt;br /&gt;                  e.Item.CssClass = "Hilite";&lt;br /&gt;            }&lt;br /&gt;      }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I have not included the code for creating the &lt;em&gt;DataSet&lt;/em&gt;. The HTML has also not been inlcuded. It contains a &lt;em&gt;DataGrid&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;See also&lt;/strong&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://ganeshprof.blogspot.com/2006/07/export-datagrid-to-excel.html"&gt;Export DataGrid to Excel &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://ganeshprof.blogspot.com/2005/04/showing-checkboxes-in-grid.html"&gt;Showing Checkboxes in Grid &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://prashantprof.blogspot.com/2006/02/create-simple-serialrow-no-column-in.html"&gt;Create Serial# column in Datagrid/DataList&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ol&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-115408521010876317?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/115408521010876317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=115408521010876317' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115408521010876317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115408521010876317'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2006/07/highlight-rows-in-datagrid.html' title='Highlight rows in a DataGrid'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-115390293429148066</id><published>2006-07-26T01:33:00.000-07:00</published><updated>2006-07-26T01:35:35.350-07:00</updated><title type='text'>Adding and Removing items from a ListBox</title><content type='html'>This is a small piece of code which can help startup programmers in ASP.Net&lt;br /&gt;&lt;br /&gt;Paste this code in the code section.&lt;br /&gt;&lt;br /&gt;&lt;div style="FONT-SIZE: 85%; OVERFLOW: auto; WIDTH: 400px; BORDER-TOP-STYLE: solid; FONT-FAMILY: courier new; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; HEIGHT: 200px; BORDER-BOTTOM-STYLE: solid"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;void&lt;/span&gt; cmdAdd_Click(&lt;span style="color:blue;"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;     ListItem LI = ListBox1.SelectedItem;&lt;br /&gt;       &lt;br /&gt;     if (LI != &lt;span style="color:blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;     {&lt;br /&gt;          ListBox2.Items.Add(LI);&lt;br /&gt;          ListBox2.SelectedIndex = -1;&lt;br /&gt;          ListBox1.Items.Remove(LI);&lt;br /&gt;          ListBox1.SelectedIndex = -1;&lt;br /&gt;     }&lt;br /&gt;}&lt;br /&gt;               &lt;br /&gt;&lt;span style="color:blue;"&gt;void&lt;/span&gt; cmdRemove_Click(&lt;span style="color:blue;"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;     ListItem LI = ListBox2.SelectedItem;&lt;br /&gt;               &lt;br /&gt;     if (LI != &lt;span style="color:blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;     {&lt;br /&gt;          ListBox1.Items.Add(LI);&lt;br /&gt;          ListBox1.SelectedIndex = -1;&lt;br /&gt;          ListBox2.Items.Remove(LI);&lt;br /&gt;          ListBox2.SelectedIndex = -1;&lt;br /&gt;     }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This example requires two listboxes named ListBox1 and ListBox2. At least one of them having some items.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-115390293429148066?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/115390293429148066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=115390293429148066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115390293429148066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115390293429148066'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2006/07/adding-and-removing-items-from-listbox.html' title='Adding and Removing items from a ListBox'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-115338157588366517</id><published>2006-07-20T00:36:00.000-07:00</published><updated>2010-01-19T23:55:50.088-08:00</updated><title type='text'>XML Encode &amp; Decode</title><content type='html'>Whenever we use XML in your application, we might be required to encode and decode the data which we are passing in the XML since the data may contain some special charecters like XML tags. The charecters '&lt;', '&gt;', '&amp;' and '"' may have to be replaced. I use these methods to encode and decode XML strings.&lt;br /&gt;&lt;br /&gt;&lt;div style="OVERFLOW: auto; WIDTH: 400px; BORDER-TOP-STYLE: solid; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; HEIGHT: 200px; BORDER-BOTTOM-STYLE: solid;font-family:courier new;font-size:85%"&gt;&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;public string&lt;/font&gt; XMLEncode(&lt;font color="blue"&gt;string&lt;/font&gt; Value)&lt;br /&gt;{&lt;br /&gt;     &lt;font color="blue"&gt;return&lt;/font&gt; Value.Replace ("&amp;amp;", "&amp;amp;amp;").Replace("'", "&amp;amp;apos;").Replace ("\"", "&amp;amp;quot;").Replace ("&amp;lt;", "&amp;amp;lt;").Replace("&amp;gt;", "&amp;amp;gt;");&lt;br /&gt;} &lt;br /&gt;        &lt;br /&gt;&lt;font color="blue"&gt;public string&lt;/font&gt; XMLDecode(&lt;font color="blue"&gt;string&lt;/font&gt; Value)&lt;br /&gt;{&lt;br /&gt;    &lt;font color="blue"&gt;return&lt;/font&gt; Value.Replace ("&amp;amp;amp;", "&amp;amp;").Replace("&amp;amp;apos;", "'").Replace("&amp;amp;quot;", "\"").Replace ("&amp;amp;lt;", "&amp;lt;").Replace ("&amp;amp;gt;", "&amp;gt;");&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-115338157588366517?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/115338157588366517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=115338157588366517' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115338157588366517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115338157588366517'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2006/07/xml-encode-decode.html' title='XML Encode &amp; Decode'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-115329113178751500</id><published>2006-07-18T23:38:00.000-07:00</published><updated>2006-08-01T00:18:09.576-07:00</updated><title type='text'>Calling a Web Service by passing credentials</title><content type='html'>Here is the method I use for calling WebServices from my .Net applications. Usually from web services, we might need to pass the credentials of the logged in user to the webService also&lt;br /&gt;&lt;br /&gt;&lt;div style="FONT-SIZE: 85%; OVERFLOW: auto; WIDTH: 400px; BORDER-TOP-STYLE: solid; FONT-FAMILY: courier new; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; HEIGHT: 200px; BORDER-BOTTOM-STYLE: solid"&gt;&lt;pre&gt;&lt;span style="color:blue;"&gt;public static&lt;/span&gt; MyWS.MyWSMethod GetMyWSMethod()&lt;br /&gt;{&lt;br /&gt;     MyWS.MyWSMethod WS = &lt;span style="color:blue;"&gt;new&lt;/span&gt; MyWS.MyWSMethod();&lt;br /&gt;     WS.Url = System.Configuration.ConfigurationSettings.AppSettings["MyWSURL"];&lt;br /&gt;     WS.PreAuthenticate = &lt;span style="color:blue;"&gt;false&lt;/span&gt;;&lt;br /&gt;     WS.Credentials = System.Net.CredentialCache.DefaultCredentials;&lt;br /&gt;     &lt;span style="color:blue;"&gt;return&lt;/span&gt; WS;&lt;br /&gt;} &lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;When &lt;em&gt;PreAuthenticate = true&lt;/em&gt;, the WWW-authenticate header is sent with the first request if the authentication mechanism supports doing so. When &lt;em&gt;PreAuthenticate = false&lt;/em&gt;, a request is made to the XML Web service method without initially attempting to authenticate the user. If the XML Web service allows anonymous access, then the XML Web service method is executed. If anonymous access is disallowed, a 401 HTTP return code is sent back to the client&lt;br /&gt;&lt;br /&gt;When PreAuthenticate property to true, the NetworkCredential stored in the Credentials property will be sent to along with the resource request.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-115329113178751500?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/115329113178751500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=115329113178751500' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115329113178751500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115329113178751500'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2006/07/calling-web-service-by-passing.html' title='Calling a Web Service by passing credentials'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-115312757944181272</id><published>2006-07-17T02:07:00.000-07:00</published><updated>2007-02-07T21:25:15.876-08:00</updated><title type='text'>Export DataGrid to Excel</title><content type='html'>Most of the applications which are being developed now require data to be exported to various formats. With ASP.Net this has become quite simple&lt;br /&gt;&lt;br /&gt;&lt;div style="FONT-SIZE: 85%; OVERFLOW: auto; WIDTH: 400px; BORDER-TOP-STYLE: solid; FONT-FAMILY: courier new; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; HEIGHT: 200px; BORDER-BOTTOM-STYLE: solid"&gt;&lt;pre&gt;&lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; Export2Excel(DataGrid grd)&lt;br /&gt;{&lt;br /&gt;     Response.Clear();&lt;br /&gt;     Response.Buffer = &lt;span style="color:blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;     Response.ContentType = "application/vnd.ms-Excel";&lt;br /&gt;     Response.Charset = "";&lt;br /&gt;     EnableViewState = &lt;span style="color:blue;"&gt;false&lt;/span&gt;;&lt;br /&gt;     System.IO.StringWriter oStringWriter = &lt;span style="color:blue;"&gt;new&lt;/span&gt; System.IO.StringWriter();&lt;br /&gt;     System.Web.UI.HtmlTextWriter oHtmlTextWriter = &lt;span style="color:blue;"&gt;new&lt;/span&gt; System.Web.UI.HtmlTextWriter(oStringWriter);&lt;br /&gt;&lt;br /&gt;     &lt;span style="color:lime;"&gt;&lt;/span&gt;&lt;span style="color:green;"&gt;// Convert the controls to string literals&lt;/span&gt;&lt;br /&gt;     ClearControls(grd);&lt;br /&gt;     grd.RenderControl(oHtmlTextWriter);&lt;br /&gt;&lt;br /&gt;     Response.Write(oStringWriter.ToString());&lt;br /&gt;     Response.End();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; ClearControls(Control Ctrl)&lt;br /&gt;{&lt;br /&gt;     &lt;span style="color:blue;"&gt;for&lt;/span&gt; (&lt;span style="color:blue;"&gt;int&lt;/span&gt; i= Ctrl.Controls.Count - 1; i &gt;= 0; i--)&lt;br /&gt;     {&lt;br /&gt;          ClearControls(Ctrl.Controls[i]);&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;     &lt;span style="color:blue;"&gt;if&lt;/span&gt; (!(Ctrl &lt;span style="color:blue;"&gt;is&lt;/span&gt; TableCell))&lt;br /&gt;     {&lt;br /&gt;          &lt;span style="color:blue;"&gt;if&lt;/span&gt; (Ctrl.GetType().GetProperty("SelectedItem") != &lt;span style="color:blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;          {&lt;br /&gt;               LiteralControl Lt = &lt;span style="color:blue;"&gt;new&lt;/span&gt; LiteralControl();&lt;br /&gt;               Ctrl.Parent.Controls.Add(Lt);&lt;br /&gt;               &lt;span style="color:blue;"&gt;try&lt;/span&gt;&lt;br /&gt;               {&lt;br /&gt;                    Lt.Text = (string)Ctrl.GetType().GetProperty("SelectedItem").GetValue(Ctrl, &lt;span style="color:blue;"&gt;null&lt;/span&gt;);&lt;br /&gt;               }&lt;br /&gt;               &lt;span style="color:blue;"&gt;catch&lt;/span&gt; {}&lt;br /&gt;&lt;br /&gt;               Ctrl.Parent.Controls.Remove(Ctrl);&lt;br /&gt;          }&lt;br /&gt;          &lt;span style="color:blue;"&gt;else&lt;/span&gt; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (Ctrl.GetType().GetProperty("Text") != &lt;span style="color:blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;          {&lt;br /&gt;               LiteralControl Lt = &lt;span style="color:blue;"&gt;new&lt;/span&gt; LiteralControl();&lt;br /&gt;               Ctrl.Parent.Controls.Add(Lt);&lt;br /&gt;               Lt.Text = (string)Ctrl.GetType().GetProperty("Text").GetValue(Ctrl, &lt;span style="color:blue;"&gt;null&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;               Ctrl.Parent.Controls.Remove(Ctrl);&lt;br /&gt;          }&lt;br /&gt;     }&lt;br /&gt;     &lt;span style="color:blue;"&gt;return&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Hope this post helped you. Please feel free to post your comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-115312757944181272?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/115312757944181272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=115312757944181272' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115312757944181272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115312757944181272'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2006/07/export-datagrid-to-excel.html' title='Export DataGrid to Excel'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-115287009672330149</id><published>2006-07-14T02:41:00.000-07:00</published><updated>2006-08-01T00:30:12.526-07:00</updated><title type='text'>Send Mail - formatted using XML &amp; XSL</title><content type='html'>Most of the applications which we develop needs to send mails. Mails can be sent from ASP.Net using the &lt;em&gt;System.Web.Mail.MailMessage &lt;/em&gt;class. This has been stated in an earlier post. This is an enhancement for the earlier method. We might need to format the mail before sending it out to the recepients. Various methods can be adopted for this purpose. One of the methods is to take the contents of the mail from an XSL file which can be merged with a DataXML.&lt;br /&gt;&lt;br /&gt;In this method, we can seperate the Data and Presentation layers so that it is easy to modify the static contents of the mail without recompiling the program. The following is the code sample for doing the same.&lt;br /&gt;&lt;br /&gt;&lt;div style="OVERFLOW: auto; WIDTH: 400px; BORDER-TOP-STYLE: solid; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; HEIGHT: 400px; BORDER-BOTTOM-STYLE: solidfont-family:Courier New;font-size:85%;"  &gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;private void&lt;/span&gt; SendMail(&lt;span style="color:blue;"&gt;string&lt;/span&gt; DataXML, &lt;span style="color:blue;"&gt;string&lt;/span&gt; XSLFileName, &lt;span style="color:blue;"&gt;string&lt;/span&gt; ToEMailAddress, &lt;span style="color:blue;"&gt;string&lt;/span&gt; CCEMailAddress, &lt;span style="color:blue;"&gt;string&lt;/span&gt; FromEMailAddress)&lt;br /&gt;{&lt;br /&gt;     &lt;span style="color:blue;"&gt;string &lt;/span&gt;XML = GetFormattedXml(DataXML, XSLFileName);&lt;br /&gt;     XmlDocument xDoc = &lt;span style="color:blue;"&gt;new&lt;/span&gt; XmlDocument();&lt;br /&gt;     xDoc.LoadXml(XML);&lt;br /&gt;     System.Web.Mail.MailMessage oMail = &lt;span style="color:blue;"&gt;new&lt;/span&gt;    System.Web.Mail.MailMessage();&lt;br /&gt;     oMail.To = ToEMailAddress;&lt;br /&gt;&lt;br /&gt;     if (CCEMailAddress.Trim() != "")&lt;br /&gt;          oMail.Cc = CCEMailAddress;&lt;br /&gt;     oMail.From = FromEMailAddress;&lt;br /&gt;&lt;br /&gt;     oMail.Subject = xDoc.SelectSingleNode("//subject").InnerText;&lt;br /&gt;     oMail.Body = xDoc.SelectSingleNode("//messagebody").InnerXml;&lt;br /&gt;     oMail.BodyEncoding = System.Text.Encoding.UTF8;&lt;br /&gt;     oMail.BodyFormat = System.Web.Mail.MailFormat.Html;&lt;br /&gt;     System.Web.Mail.SmtpMail.SmtpServer = MailServer;&lt;br /&gt;     System.Web.Mail.SmtpMail.Send(oMail);&lt;br /&gt;&lt;br /&gt;     xDoc = &lt;span style="color:blue;"&gt;null&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; GetFormattedXml(&lt;span style="color:blue;"&gt;string&lt;/span&gt; XML, &lt;span style="color:blue;"&gt;string&lt;/span&gt; XSLFileName)&lt;br /&gt;{&lt;br /&gt;     System.Xml.Xsl.XslTransform xslt = &lt;span style="color:blue;"&gt;new&lt;/span&gt; System.Xml.Xsl.XslTransform();&lt;br /&gt;     xslt.Load(XSLFileName);&lt;br /&gt;     System.IO.StringWriter stringWriter = &lt;span style="color:blue;"&gt;new&lt;/span&gt; System.IO.StringWriter();&lt;br /&gt;     XmlDocument xDoc = &lt;span style="color:blue;"&gt;new&lt;/span&gt; XmlDocument();&lt;br /&gt;     xDoc.LoadXml(XML);&lt;br /&gt;     xslt.Transform(xDoc, &lt;span style="color:blue;"&gt;null&lt;/span&gt;, stringWriter);&lt;br /&gt;     &lt;span style="color:blue;"&gt;return&lt;/span&gt; stringWriter.ToString();&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;private string&lt;/span&gt; GetFormattedXml(&lt;span style="color:blue;"&gt;string&lt;/span&gt; XML, &lt;span style="color:blue;"&gt;string&lt;/span&gt; XSLFileName, System.Xml.Xsl.XsltArgumentList Arg)&lt;br /&gt;{&lt;br /&gt;     System.Xml.Xsl.XslTransform xslt = &lt;span style="color:blue;"&gt;new&lt;/span&gt; System.Xml.Xsl.XslTransform();&lt;br /&gt;     xslt.Load(XSLFileName);&lt;br /&gt;     System.IO.StringWriter stringWriter = &lt;span style="color:blue;"&gt;new&lt;/span&gt; System.IO.StringWriter();&lt;br /&gt;     XmlDocument xDoc = &lt;span style="color:blue;"&gt;new&lt;/span&gt; XmlDocument();&lt;br /&gt;     xDoc.LoadXml(XML);&lt;br /&gt;     xslt.Transform(xDoc, Arg, StringWriter);&lt;br /&gt;     &lt;span style="color:blue;"&gt;return&lt;/span&gt; stringWriter.ToString();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;See Also&lt;/strong&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://ganeshprof.blogspot.com/2006/04/sending-mail-from-net-application.html"&gt;Sending Mail from .Net application&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-115287009672330149?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/115287009672330149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=115287009672330149' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115287009672330149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/115287009672330149'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2006/07/send-mail-formatted-using-xml-xsl.html' title='Send Mail - formatted using XML &amp; XSL'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-114611889971088449</id><published>2006-04-26T23:18:00.000-07:00</published><updated>2006-04-26T23:21:40.456-07:00</updated><title type='text'>Enterprise Resource Planning</title><content type='html'>&lt;span style="font-family:verdana,arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;&lt;em&gt;ERP (Enterprise resource planning)&lt;/em&gt;&lt;/strong&gt; is an industry term for the broad set of activities supported by multi-module application software that helps a manufacturer or other business manage the important parts of its business. These business activities include the following &lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Product Planning &lt;/span&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Parts Purchasing &lt;/span&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Inventory Management and Maintenance &lt;/span&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Supplier Interaction &lt;/span&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Providing Customer Service &lt;/span&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Order Tracking &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;ERP can also include application modules for the finance and human resources aspects of a business. Typically, an ERP system uses or is integrated with a relational database system (RDBMS). The deployment of an ERP system can involve considerable business process analysis, employee retraining, and new work procedures&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-114611889971088449?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/114611889971088449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=114611889971088449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/114611889971088449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/114611889971088449'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2006/04/enterprise-resource-planning.html' title='Enterprise Resource Planning'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-114551614669059444</id><published>2006-04-19T23:55:00.000-07:00</published><updated>2007-01-19T01:31:44.486-08:00</updated><title type='text'>Sending Mail from .Net application</title><content type='html'>This is a method which can be used for sending mails from Dot Net applications&lt;br /&gt;&lt;br /&gt;&lt;div style="OVERFLOW: auto; WIDTH: 400px; BORDER-TOP-STYLE: solid; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; HEIGHT: 200px; BORDER-BOTTOM-STYLE: solid"&gt;&lt;br /&gt;&lt;pre&gt;private void SendMail(string FromAddress, string ToAddress, string BCCAddress, string Subject, string Message)&lt;br /&gt;{&lt;br /&gt;     System.Web.Mail.MailMessage oMail = new System.Web.Mail.MailMessage();&lt;br /&gt;&lt;br /&gt;     oMail.To = ToAddress;&lt;br /&gt;     oMail.Bcc = BCCAddress;&lt;br /&gt;     oMail.From = FromAddress;&lt;br /&gt;&lt;br /&gt;     oMail.Subject = Subject;&lt;br /&gt;     oMail.Body = Message;&lt;br /&gt;&lt;br /&gt;     oMail.BodyEncoding = System.Text.Encoding.UTF8;&lt;br /&gt;     System.Web.Mail.SmtpMail.SmtpServer = "smtp";&lt;br /&gt;     System.Web.Mail.SmtpMail.Send(oMail);&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-114551614669059444?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/114551614669059444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=114551614669059444' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/114551614669059444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/114551614669059444'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2006/04/sending-mail-from-net-application.html' title='Sending Mail from .Net application'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-111468125402337740</id><published>2005-04-28T02:27:00.000-07:00</published><updated>2006-07-20T02:56:10.786-07:00</updated><title type='text'>Showing Checkboxes in Grid</title><content type='html'>This is a DataGr&lt;span style="color:#ff0000;"&gt;id&lt;/span&gt; uses a template column to show a bit field in a checkbox. In ASP.Net you can achieve this without much programming effort.&lt;br /&gt;&lt;br /&gt;This page uses the method GetData() to retrieve data from the Authors database&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;The Script...&lt;br /&gt;&lt;div style="OVERFLOW: auto; WIDTH: 400px; BORDER-TOP-STYLE: solid; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; HEIGHT: 200px; BORDER-BOTTOM-STYLE: solid;font-family:courier new;font-size:85%"&gt;&lt;br /&gt;&lt;pre&gt;System.Data.DataSet GetData()&lt;br /&gt;{&lt;br /&gt;     &lt;font color="blue"&gt;string&lt;/font&gt; connectionString = "server=\'(local)\'; user id=\'sa\';password=\'pwd\'; database=\'pubs\'";&lt;br /&gt;     System.Data.SqlClient.SqlConnection dbConnection = &lt;font color="blue"&gt;new&lt;/font&gt; System.Data.SqlClient.SqlConnection(connectionString); &lt;br /&gt;        &lt;br /&gt;     &lt;font color="blue"&gt;string&lt;/font&gt; Sql = "SELECT au_id, au_lname, contract FROM authors";&lt;br /&gt;     System.Data.SqlClient.SqlCommand dbCommand = &lt;font color="blue"&gt;new&lt;/font&gt; System.Data.SqlClient.SqlCommand();&lt;br /&gt;     dbCommand.CommandText = Sql;&lt;br /&gt;     dbCommand.Connection = dbConnection; &lt;br /&gt;        &lt;br /&gt;     System.Data.SqlClient.SqlDataAdapter dataAdapter = &lt;font color="blue"&gt;new&lt;/font&gt; System.Data.SqlClient.SqlDataAdapter();&lt;br /&gt;     dataAdapter.SelectCommand = dbCommand;&lt;br /&gt;     System.Data.DataSet dataSet = &lt;font color="blue"&gt;new&lt;/font&gt; System.Data.DataSet();&lt;br /&gt;     dataAdapter.Fill(dataSet); &lt;br /&gt;        &lt;br /&gt;     &lt;font color="blue"&gt;return&lt;/font&gt; dataSet;&lt;br /&gt;} &lt;br /&gt;        &lt;br /&gt;&lt;font color="blue"&gt;void&lt;/font&gt; Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;     DataGrid1.DataSource = GetData();&lt;br /&gt;     DataGrid1.DataBind();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;html&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#990000;"&gt;head&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#990000;"&gt;head&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#990000;"&gt;body&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#990000;"&gt;form&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;runat&lt;/span&gt;="server"&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#990000;"&gt;asp:DataGr&lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;="DataGr&lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;1" &lt;span style="color:#ff0000;"&gt;runat&lt;/span&gt;="server" &lt;span style="color:#ff0000;"&gt;AutoGenerate&lt;span style="color:#990000;"&gt;Columns&lt;/span&gt;&lt;/span&gt;="False"&lt;br /&gt;BorderStyle="Double" &lt;span style="color:#ff0000;"&gt;Gr&lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;Lines&lt;/span&gt;="Horizontal" BorderW&lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;th="3px" BorderColor="#336666" BackColor="White" CellPadding="4" W&lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;th="75%"&amp;gt;&lt;br /&gt;&amp;lt;HeaderStyle font-bold="True" forecolor="White" backcolor="#336666"&amp;gt;&amp;lt;/HeaderStyle&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#990000;"&gt;ItemStyle&lt;/span&gt; forecolor="#333333" backcolor="White"&amp;gt;&amp;lt;/&lt;span style="color:#990000;"&gt;ItemStyle&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#990000;"&gt;Columns&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#990000;"&gt;asp:BoundColumn&lt;/span&gt; DataField="au_id" &lt;span style="color:#990000;"&gt;HeaderText&lt;/span&gt;="au_id"&amp;gt;&amp;lt;/&lt;span style="color:#990000;"&gt;asp:BoundColumn&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#990000;"&gt;asp:BoundColumn&lt;/span&gt; DataField="au_lname" &lt;span style="color:#990000;"&gt;HeaderText&lt;/span&gt;="au_lname"&amp;gt;&amp;lt;/&lt;span style="color:#990000;"&gt;asp:BoundColumn&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#990000;"&gt;asp:TemplateColumn&lt;/span&gt; &lt;span style="color:#990000;"&gt;HeaderText&lt;/span&gt;="contract"&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#990000;"&gt;ItemStyle&lt;/span&gt; horizontalalign="Center"&amp;gt;&amp;lt;/&lt;span style="color:#990000;"&gt;ItemStyle&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;ItemTemplate&amp;gt;&lt;br /&gt;&amp;lt;asp:CheckBox &lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;="CheckBox1" runat="server" Checked='&amp;lt;%# DataBinder.Eval(Container.DataItem, "contract") %&amp;gt;'&amp;gt;&amp;lt;/asp:CheckBox&amp;gt;&lt;br /&gt;&amp;lt;/ItemTemplate&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#990000;"&gt;&lt;span style="color:#990000;"&gt;asp:TemplateColumn&lt;/span&gt;&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#990000;"&gt;&lt;span style="color:#990000;"&gt;Columns&lt;/span&gt;&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#990000;"&gt;asp:DataGr&lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#990000;"&gt;form&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#990000;"&gt;body&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#990000;"&gt;html&lt;/span&gt;&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-111468125402337740?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/111468125402337740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=111468125402337740' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/111468125402337740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/111468125402337740'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2005/04/showing-checkboxes-in-grid.html' title='Showing Checkboxes in Grid'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-111442350906563936</id><published>2005-04-25T03:01:00.000-07:00</published><updated>2006-12-29T09:50:10.076-08:00</updated><title type='text'>Unable to start debugging on the web server.</title><content type='html'>Click Start, point to Programs, point to Administrative Tools, and then click Domain Controller Security Policy.&lt;br /&gt;&lt;br /&gt;Click Security Settings.&lt;br /&gt;&lt;br /&gt;Click Local Policies, and then click User Rights Assignment.&lt;br /&gt;In the right pane, double-click Impersonate a client after authentication.&lt;br /&gt;&lt;br /&gt;In the Security Policy Setting window, click Define these policy settings.&lt;br /&gt;Click Add, and then click Browse.&lt;br /&gt;&lt;br /&gt;In the Select Users or Groups window, select the IWAM account name, click Add, and then click OK.&lt;br /&gt;Click OK two times.&lt;br /&gt;&lt;br /&gt;To enforce an update of the computer policy, type the following command at a command prompt, and then press ENTER:&lt;br /&gt;secedit /refreshpolicy machine_policy /enforce&lt;br /&gt;&lt;br /&gt;At the command prompt,&lt;br /&gt;type iisreset, and then press ENTER.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-111442350906563936?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/111442350906563936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=111442350906563936' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/111442350906563936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/111442350906563936'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2005/04/unable-to-start-debugging-on-web.html' title='Unable to start debugging on the web server.'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-111122019025530461</id><published>2005-03-18T23:57:00.000-08:00</published><updated>2005-03-19T00:25:02.030-08:00</updated><title type='text'>Building SQL Strings</title><content type='html'>Here is a nice utility to make sql strings from the Query which you have created. To do this create the following procedure in your master database&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#6633ff;"&gt;&lt;span style="color:#6666cc;"&gt;CREATE PROCEDURE&lt;/span&gt; &lt;/span&gt;sp_SqlForCS&lt;br /&gt;@Sql &lt;span style="color:#6633ff;"&gt;varchar&lt;/span&gt;(4000)&lt;br /&gt;&lt;span style="color:#6666cc;"&gt;AS&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#6666cc;"&gt;SET NoCount On&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#006600;"&gt;-- Never change this&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#6666cc;"&gt;SELECT&lt;/span&gt; &lt;span style="color:#cc0000;"&gt;'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;StringBuilder Sql = new StringBuilder();&lt;br /&gt;&lt;br /&gt;Sql.Append("'&lt;/span&gt; + &lt;span style="color:#cc33cc;"&gt;replace&lt;/span&gt;(&lt;br /&gt;&lt;span style="color:#006600;"&gt;-- Never change this&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc66cc;"&gt;replace&lt;/span&gt;(&lt;span style="color:#cc66cc;"&gt;replace&lt;/span&gt;(&lt;span style="color:#cc66cc;"&gt;replace&lt;/span&gt;(&lt;span style="color:#cc33cc;"&gt;replace&lt;/span&gt;(@Sql,&lt;span style="color:#ff0000;"&gt;'SELECT'&lt;/span&gt;,&lt;span style="color:#ff0000;"&gt;'SELECT'&lt;/span&gt;),&lt;span style="color:#ff0000;"&gt;'FROM'&lt;/span&gt;,&lt;span style="color:#ff0000;"&gt;'FROM'&lt;/span&gt;),&lt;span style="color:#ff0000;"&gt;'WHERE'&lt;/span&gt;,&lt;span style="color:#ff0000;"&gt;'WHERE'&lt;/span&gt;),&lt;span style="color:#ff0000;"&gt;'INNER JOIN'&lt;/span&gt;,&lt;span style="color:#ff0000;"&gt;'INNER JOIN'&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#006600;"&gt;-- Never change this&lt;/span&gt;&lt;br /&gt;,&lt;span style="color:#ff0000;"&gt;&lt;br /&gt;'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;'&lt;/span&gt;,&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;'");&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Sql.Append("'&lt;/span&gt;)+ &lt;span style="color:#ff0000;"&gt;'&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;");'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#006600;"&gt;-- Never change this&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#6666cc;"&gt;SET NoCount Off&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now you can start preparing your sql statement from Query analyzer. Once you have done with the formatting and the rest of the stuff, put a single quote ['] before and after the query and execute sp_SqlForCS with the string as the paramter&lt;br /&gt;&lt;br /&gt;sp_SqlForCS&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;'SELECT titles.title, titleauthor.au_ord, authors.au_lname, titles.price, titles.ytd_sales,&lt;br /&gt;titles.pub_id&lt;br /&gt;FROM authors&lt;br /&gt;INNER JOIN titleauthor&lt;br /&gt;ON authors.au_id = titleauthor.au_id&lt;br /&gt;INNER JOIN titles&lt;br /&gt;ON titleauthor.title_id = titles.title_id'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and you will get the following output&lt;br /&gt;&lt;br /&gt;StringBuilder Sql = new StringBuilder();&lt;br /&gt;&lt;br /&gt;Sql.Append("SELECT titles.title, titleauthor.au_ord, authors.au_lname, titles.price, ");&lt;br /&gt;Sql.Append(" titles.ytd_sales, titles.pub_id");&lt;br /&gt;Sql.Append("FROM authors ");&lt;br /&gt;Sql.Append(" INNER JOIN titleauthor ");&lt;br /&gt;Sql.Append(" ON authors.au_id = titleauthor.au_id ");&lt;br /&gt;Sql.Append(" INNER JOIN titles ");&lt;br /&gt;Sql.Append(" ON titleauthor.title_id = titles.title_id");&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-111122019025530461?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/111122019025530461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=111122019025530461' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/111122019025530461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/111122019025530461'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2005/03/building-sql-strings.html' title='Building SQL Strings'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-110490271292427857</id><published>2005-01-04T21:12:00.000-08:00</published><updated>2005-01-04T21:29:16.506-08:00</updated><title type='text'>trim method in JavaScript</title><content type='html'>JavaScript does not contain a method for trimming strings. You can create one for yourself and use it whereever you want to trim strings.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;STEP 1: JavaScript Methods&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The first step is to create the methods for trimming the strings. This can be done using regular expressions.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#333399;"&gt;function&lt;/span&gt;&lt;/strong&gt; strltrim()&lt;br /&gt;{&lt;br /&gt;        &lt;strong&gt;&lt;span style="color:#333399;"&gt;return&lt;/span&gt;&lt;/strong&gt; this.replace(/^\s+/,'');&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#333399;"&gt;function&lt;/span&gt;&lt;/strong&gt; strrtrim()&lt;br /&gt;{&lt;br /&gt;        &lt;strong&gt;&lt;span style="color:#333399;"&gt;return&lt;/span&gt;&lt;/strong&gt; this.replace(/\s+$/,'');&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#333399;"&gt;function&lt;/span&gt;&lt;/strong&gt; strtrim()&lt;br /&gt;{&lt;br /&gt;        &lt;strong&gt;&lt;span style="color:#333399;"&gt;return&lt;/span&gt;&lt;/strong&gt; this.replace(/^\s+/,'').replace(/\s+$/,'');&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;String.prototype.ltrim = strltrim;&lt;br /&gt;String.prototype.rtrim = strrtrim;&lt;br /&gt;String.prototype.trim = strtrim;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;STEP 2: Usage&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;span style="color:#006600;"&gt;//To remove the leading blanks from a string variable&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;sTextsText = sText.ltrim();&lt;br /&gt;&lt;span style="color:#006600;"&gt;//To remove the trailing blanks from a string variable&lt;/span&gt;&lt;br /&gt;sTextsText = sText.rtrim();&lt;br /&gt;&lt;span style="color:#006600;"&gt;//To remove the leading and trailing blanks from a string variable&lt;/span&gt;&lt;br /&gt;sTextsText = sText.trim();&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-110490271292427857?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/110490271292427857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=110490271292427857' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/110490271292427857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/110490271292427857'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2005/01/trim-method-in-javascript.html' title='trim method in JavaScript'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-110354122372136402</id><published>2004-12-20T03:09:00.000-08:00</published><updated>2004-12-20T03:16:35.153-08:00</updated><title type='text'>Response.Redirect, Server.Transfer, Server.Execute</title><content type='html'>&lt;em&gt;Response.Redirect&lt;/em&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Tells the browser to redirect. &lt;/li&gt;&lt;/ul&gt;&lt;em&gt;Server.Transfer &lt;/em&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Consumes less server resources than Response.Redirect &lt;/li&gt;&lt;li&gt;Changes the focus on the web server and transfers the request. &lt;/li&gt;&lt;li&gt;Does not maintains the original URL. &lt;/li&gt;&lt;li&gt;Cannot navigate to an external URL. &lt;/li&gt;&lt;li&gt;Has a second parameter "preserveForm" which when set to true, all the objects in the page can be accessed from the page which you are transfering to. You can access that using Request.Form("txtName")&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;em&gt;Server.Execute&lt;/em&gt; &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Executes a page and returns the results. &lt;/li&gt;&lt;li&gt;Is not very important in ASP.Net&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-110354122372136402?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/110354122372136402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=110354122372136402' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/110354122372136402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/110354122372136402'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2004/12/responseredirect-servertransfer.html' title='Response.Redirect, Server.Transfer, Server.Execute'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-110334737710222846</id><published>2004-12-17T21:20:00.000-08:00</published><updated>2004-12-17T21:22:57.103-08:00</updated><title type='text'>Registering Visual Studio Solutions</title><content type='html'>I had a strange problem with my Visual Studio .Net 2003. I was not able to add any new items to my projects nor was I able to create any new projects.  I got a solution from Micorsoft Newsgroups and it worked well.  I had to register the CSProj.dll and all was working fine.&lt;br /&gt;&lt;br /&gt; regsvr32.exe "c:\program files\Microsoft Visual Studio .NET 2003\Vc7\vcpackages\csproj.dll"&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-110334737710222846?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/110334737710222846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=110334737710222846' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/110334737710222846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/110334737710222846'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2004/12/registering-visual-studio-solutions.html' title='Registering Visual Studio Solutions'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9590749.post-110293972754725950</id><published>2004-12-13T04:07:00.000-08:00</published><updated>2007-02-07T19:32:44.640-08:00</updated><title type='text'>Hello Cochin</title><content type='html'>All are welcome to Cochin, the Queen of the Arabian Sea. This is a wonderful place to live in.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9590749-110293972754725950?l=ganeshprof.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ganeshprof.blogspot.com/feeds/110293972754725950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9590749&amp;postID=110293972754725950' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/110293972754725950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9590749/posts/default/110293972754725950'/><link rel='alternate' type='text/html' href='http://ganeshprof.blogspot.com/2004/12/hello-cochin.html' title='Hello Cochin'/><author><name>Ganesh Ramamurthy</name><uri>http://www.blogger.com/profile/04333671049862598710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
