<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2333475978780582195</id><updated>2024-08-30T04:41:01.484-07:00</updated><category term="Javascipt"/><category term="print"/><title type='text'>blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-3905771108261347573</id><published>2010-11-26T11:59:00.000-08:00</published><updated>2010-11-26T11:59:02.481-08:00</updated><title type='text'>What is other use of Go statement in TSQL?</title><content type='html'>I will explain you this with an Example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;CREATE TABLE dbo.TEST (ID INT IDENTITY (1,1), ROWID uniqueidentifier) &lt;br /&gt;
GO &lt;br /&gt;
INSERT INTO dbo.TEST (ROWID) VALUES (NEWID())&amp;nbsp; &lt;br /&gt;
GO 1000&lt;/blockquote&gt;&lt;br /&gt;
&lt;strong&gt;Note Second Go 1000.&amp;nbsp; This will insert 1000 row to table test.&lt;/strong&gt;</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/3905771108261347573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/3905771108261347573' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/3905771108261347573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/3905771108261347573'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/11/what-is-other-use-of-go-statement-in.html' title='What is other use of Go statement in TSQL?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-2312164131831472572</id><published>2010-11-23T01:38:00.000-08:00</published><updated>2010-11-23T01:44:27.585-08:00</updated><title type='text'>Show tooltip text in gridview row on mouseover.</title><content type='html'>&lt;strong&gt;This Code segment explains, How to show tooltip text in gridview row on mouseover from Code behind&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# Code&lt;/strong&gt;&lt;br /&gt; protected void GridView_RowDataBound(Object sender, GridViewRowEventArgs e) &lt;br /&gt; {      &lt;br /&gt;    if (e.Row.RowType e == DataControlRowType.DataRow)    &lt;br /&gt;    {&lt;br /&gt;       //ShowToolTip &lt;br /&gt;       e.Row.ToolTip = &quot;This text needs to shown on mouseover of the row!&quot;; &lt;br /&gt;    } &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br /&gt;protected  sub GridView_RowDataBound(ByVal sender As Object,  e as GridViewRowEventArg) &lt;br /&gt;    if  e.Row.RowType e = DataControlRowType.DataRow then &lt;br /&gt;     &#39;ShowToolTip &lt;br /&gt;       e.Row.ToolTip = &quot;This text needs to shown on mouseover of the row!&quot;; &lt;br /&gt;   End if  &lt;br /&gt;End Sub</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/2312164131831472572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/2312164131831472572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/2312164131831472572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/2312164131831472572'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/11/show-tooltip-text-in-gridview-row-on.html' title='Show tooltip text in gridview row on mouseover.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-976752450032019366</id><published>2010-11-23T00:20:00.000-08:00</published><updated>2010-11-23T00:38:25.926-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascipt"/><category scheme="http://www.blogger.com/atom/ns#" term="print"/><title type='text'>How to Call print Dialog Box from JavaScript.</title><content type='html'>The Code segment show you, How to call print Dialog Box from JavaScript.&lt;br /&gt;&lt;br /&gt;It is Very Simple, Just call &lt;strong&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;window.print()&lt;/span&gt;&lt;/strong&gt; function from java script&lt;br /&gt;See Sample below…&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;&amp;#60;a href=&quot;JavaScript:window.print();&quot;&amp;#62;&lt;br /&gt;    &amp;#60;img src=&quot;set the image name&quot; border=&quot;0&quot; &lt;br /&gt;    width=&quot;17&quot; height=&quot;17&quot; align=&quot;middle&quot; alt=&quot;Print Version&quot; /&amp;#62;&lt;br /&gt;    &amp;#60;/a&amp;#62;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/976752450032019366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/976752450032019366' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/976752450032019366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/976752450032019366'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/11/how-to-call-print-dialog-box-from.html' title='How to Call print Dialog Box from JavaScript.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-7977891838940515415</id><published>2010-10-21T04:53:00.000-07:00</published><updated>2010-10-21T04:55:52.168-07:00</updated><title type='text'>Regular expressions in C#</title><content type='html'>&lt;blockquote&gt;Regular expressions are addictive. Playing with these compressed but powerful patterns is better than solving a Sudoku.&lt;br /&gt;&lt;br /&gt;If you are wondering what this is all about because, obviously, regular expressions are just the use of “*?”, then read on because the truth is a lot more subtle and the result is a lot more powerful than you might suspect. Equally, regular expressions are something that you will find in more than just C#, they are useful in JavaScript, Perl, Java, Ruby and even in applications such as word processors. &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt; &lt;a href=&quot;http://www.developerfusion.com/article/84524/deep-c-regular-expressions-8211-the-director8217s-cut/&quot;&gt; Read more , Click here&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/7977891838940515415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/7977891838940515415' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/7977891838940515415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/7977891838940515415'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/regular-expressions-in-c.html' title='Regular expressions in C#'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-15068569794091686</id><published>2010-10-21T03:45:00.000-07:00</published><updated>2010-10-21T03:47:06.644-07:00</updated><title type='text'>Explain Linked Sever and How Add a Linked server?</title><content type='html'>Linked servers are a way to link to different OLEDB compatible data sources from within SQL Server. Here I am Explains the Concept with an example.&lt;br /&gt;&lt;br /&gt;And Also How Add a Linked server?&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.dotnetspark.com/kb/2800-explain-linked-sever-and-how-add-linked.aspx&quot;&gt; Read it here   &lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/15068569794091686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/15068569794091686' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/15068569794091686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/15068569794091686'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/explain-linked-sever-and-how-add-linked.html' title='Explain Linked Sever and How Add a Linked server?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-5876982892492329472</id><published>2010-10-20T09:48:00.000-07:00</published><updated>2010-10-20T09:50:04.139-07:00</updated><title type='text'>Find out Free disk space using SQL query</title><content type='html'>This code demonstrates use of master.sys.xp_fixeddrives. This returns all the drives available in the server and its free space in MB &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt; Exec master.sys.xp_fixeddrives &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;RESULT&lt;br /&gt;&lt;br /&gt;Drive   MB Free&lt;br /&gt;*****   *******&lt;br /&gt;C         10002&lt;br /&gt;D         20002 &lt;br /&gt;F         57481&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This will be very useful before large data load operation.  We can check the disk space before starting the any large data load processes</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/5876982892492329472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/5876982892492329472' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/5876982892492329472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/5876982892492329472'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/find-out-free-disk-space-using-sql.html' title='Find out Free disk space using SQL query'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-5672309332990030142</id><published>2010-10-18T06:30:00.000-07:00</published><updated>2010-10-18T06:31:17.724-07:00</updated><title type='text'>do u know that windows XP is having a hidden &quot;Star Wars Movie&quot; inside it???</title><content type='html'>do u know that windows XP is having a hidden &quot;Star Wars Movie&quot; inside it???&lt;br /&gt;&lt;br /&gt;You should be connected to the INTERNET for using this.&lt;br /&gt;&lt;br /&gt;Go to Starts--&gt;Programs--&gt;Run &lt;br /&gt;Type&lt;br /&gt;telnet towel.blinkenlights.nl&lt;br /&gt;&lt;br /&gt;And hit enter......... Enjoy the magic!!!!</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/5672309332990030142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/5672309332990030142' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/5672309332990030142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/5672309332990030142'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/do-u-know-that-windows-xp-is-having.html' title='do u know that windows XP is having a hidden &quot;Star Wars Movie&quot; inside it???'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-4368732221276637931</id><published>2010-10-16T05:31:00.000-07:00</published><updated>2010-10-16T05:33:59.064-07:00</updated><title type='text'>How to Enable CLR integration in SQL Server</title><content type='html'>This code segment explain you, How to Enable CLR integration in SQL Server using TSQL&lt;br /&gt;&lt;br /&gt;To enable CLR integration in SQL Server, Use follwing TSQL statment.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt; EXEC sp_configure &#39;clr enabled&#39;, 1;  &lt;br /&gt;&lt;br /&gt; RECONFIGURE WITH OVERRIDE;   &lt;br /&gt;&lt;br /&gt; GO;&lt;/blockquote&gt; &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;similarly for Disabling use follwing.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;blockquote&gt;EXEC sp_configure &#39;clr enabled&#39;, 0;  &lt;br /&gt;&lt;br /&gt; RECONFIGURE WITH OVERRIDE;   &lt;br /&gt;&lt;br /&gt; GO ;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/4368732221276637931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/4368732221276637931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/4368732221276637931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/4368732221276637931'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/how-to-enable-clr-integration-in-sql.html' title='How to Enable CLR integration in SQL Server'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-4166406406793203715</id><published>2010-10-14T01:32:00.001-07:00</published><updated>2010-10-14T01:32:39.393-07:00</updated><title type='text'>C# code for Lock windows</title><content type='html'>This simple code segment explain you, How to lock windows using C# code (same as pressing Windows logo key and the letter L)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is nothing but calling of   “C:\WINDOWS\system32\rundll32.exe user32.dll, LockWorkStation” command from C#&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Linq;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.Diagnostics;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;namespace Sajid.LockComputer&lt;br /&gt;&lt;br /&gt;  {  &lt;br /&gt;&lt;br /&gt;     class Program &lt;br /&gt;      {  &lt;br /&gt;          static void Main(string[] args)    &lt;br /&gt;               {    &lt;br /&gt;                     Process.Start(@&quot;C:\WINDOWS\system32\rundll32.exe&quot;, &quot;user32.dll,LockWorkStation&quot;) ;     &lt;br /&gt;               } &lt;br /&gt;      }&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/4166406406793203715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/4166406406793203715' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/4166406406793203715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/4166406406793203715'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/c-code-for-lock-windows.html' title='C# code for Lock windows'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-7539115076779824532</id><published>2010-10-14T01:16:00.000-07:00</published><updated>2010-10-14T01:18:00.308-07:00</updated><title type='text'>XML to HTML transformation using Xslt</title><content type='html'>Namespace Required:&lt;br /&gt;&lt;br /&gt;1. System.Xml &lt;br /&gt;2. System.Xml.XPath &lt;br /&gt;3. System.Xml.Xsl&lt;br /&gt;&lt;br /&gt;public static void Transform(string sXmlPath, string sXslPath)  &lt;br /&gt;&lt;br /&gt; {   &lt;br /&gt;&lt;br /&gt; try &lt;br /&gt;&lt;br /&gt;     {     &lt;br /&gt;&lt;br /&gt;       // Step 1:   load the Xml doc    &lt;br /&gt;&lt;br /&gt;       XPathDocument myXPathDoc = new XPathDocument(sXmlPath) ;             &lt;br /&gt;&lt;br /&gt;        XslTransform myXslTrans = new XslTransform() ;    &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;      // Step 2:   load the Xsl    &lt;br /&gt;&lt;br /&gt;     myXslTrans.Load(sXslPath) ;     &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;      // Step 3:   create the output stream &lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;br /&gt;&lt;br /&gt;       XmlTextWriter myWriter = new XmlTextWriter(&quot;result.html&quot;, null);       &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;     // Step 4:   do the actual transform of Xml &lt;/P&gt;&lt;P&gt; &lt;/P&gt;  &lt;br /&gt;&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;      myXslTrans.Transform(myXPathDoc,null, myWriter);   &lt;br /&gt;&lt;br /&gt;     myWriter.Close() ;       &lt;br /&gt;&lt;br /&gt;    }  &lt;br /&gt;&lt;br /&gt;  catch(Exception e)  &lt;br /&gt;&lt;br /&gt;   {  &lt;br /&gt;&lt;br /&gt;             Console.WriteLine(&quot;Exception: {0}&quot;, e.ToString());        &lt;br /&gt;&lt;br /&gt;   }  &lt;br /&gt;&lt;br /&gt; }</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/7539115076779824532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/7539115076779824532' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/7539115076779824532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/7539115076779824532'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/xml-to-html-transformation-using-xslt.html' title='XML to HTML transformation using Xslt'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-3620864127459464453</id><published>2010-10-14T00:01:00.000-07:00</published><updated>2010-10-14T00:03:18.810-07:00</updated><title type='text'>Change SQL Server Authentication Mode Using TSQL</title><content type='html'>We can use undocumented procedure xp_regwrite/xp_instance_regwrite, to change the authentication mode form query.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;exec master..xp_instance_regwrite N&#39;HKEY_LOCAL_MACHINE&#39;,N&#39;SOFTWARE\Microsoft\MSSQLServer\MSSQLServer&#39;,&#39;LoginMode&#39;, N&#39;REG_DWORD&#39;, 2 &lt;br /&gt;&lt;br /&gt;  0 or 2 =&gt; Mixed Mode  &lt;br /&gt;&lt;br /&gt;   1    =&gt;  integrated</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/3620864127459464453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/3620864127459464453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/3620864127459464453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/3620864127459464453'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/change-sql-server-authentication-mode.html' title='Change SQL Server Authentication Mode Using TSQL'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-2751378406344530501</id><published>2010-10-13T04:12:00.000-07:00</published><updated>2010-10-13T04:15:42.868-07:00</updated><title type='text'>How to Format A Excle Column.</title><content type='html'>Summary : This Code Code Snippets Guide you to format EXCEL Column progrmaticaly. Here i am doing number formating &lt;br /&gt;&lt;br /&gt;Follwing is the COde for formating the first Column of EXcel sheet. You Have to change the Column index of cell to format the required column  &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; Dim Wb As Excel.Workbook =     &lt;br /&gt; Dim xWS As Excel.Worksheet&lt;br /&gt; xWS = Wb.ActiveSheet&lt;br /&gt; CType(xWS.Cells(1, 1),   Excel.Range).EntireColumn.NumberFormat = &quot;#,##0.00&quot;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;          Excel.Workbook wb =    ;&lt;br /&gt;          Excel.Worksheet xWS;&lt;br /&gt;          xWS = wb.ActiveSheet;&lt;br /&gt;          Excel.Range rng =     xWS.Cells[1,1] as  Excel.Range;&lt;br /&gt;          rng.EntireColumn.NumberFormat = &quot;#,##0.00&quot;;</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/2751378406344530501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/2751378406344530501' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/2751378406344530501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/2751378406344530501'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/how-to-format-excle-column.html' title='How to Format A Excle Column.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-4356460702098516441</id><published>2010-10-12T00:23:00.000-07:00</published><updated>2010-10-12T00:26:19.169-07:00</updated><title type='text'>5 Traps to Avoid in C#</title><content type='html'>C# Corner columnist Patrick Steele offers a heads up on five gotchas that can trip up even veteran C# programmers.  This is Very  usefull for C# programmers&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://visualstudiomagazine.com/articles/2010/08/31/5-traps-to-avoid-in-csharp.aspx&quot;&gt;Clik here to view the post&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/4356460702098516441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/4356460702098516441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/4356460702098516441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/4356460702098516441'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/5-traps-to-avoid-in-c.html' title='5 Traps to Avoid in C#'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-6879307440436939418</id><published>2010-10-11T03:17:00.000-07:00</published><updated>2010-10-11T03:22:08.402-07:00</updated><title type='text'>How to Convert Image to Binary String?</title><content type='html'>Here you will learn How  Convert Image to Binary String using of C# and the .NET Framework.&lt;br /&gt;&lt;br /&gt;Basically, the program &quot;reads&quot; the image pixel by pixel, and where there is a pixel that is something else than white it will Append 1, else 0 in the string.&lt;br /&gt;&lt;br /&gt;    &lt;blockquote&gt;private string ConvertoToString(string imagePath)   &lt;br /&gt;       {   &lt;br /&gt;           string text = &quot;&quot;;      &lt;br /&gt;           System.Drawing.Bitmap bitMap = new Bitmap(imagePath);       &lt;br /&gt;           for (int i = 0; i &lt; bitMap.Height; i++)   &lt;br /&gt;              { &lt;br /&gt;               for (int j = 0; j &lt; bitMap.Width; j++)           &lt;br /&gt;               {                &lt;br /&gt;                   if (bitMap.GetPixel(j, i).A.ToString() == &quot;255&quot; &amp;&amp; bitMap.GetPixel(j, i).B.ToString() == &quot;255&quot; &amp;&amp; bitMap.GetPixel(j, i).G.ToString() == &quot;255&quot; &amp;&amp; bitMap.GetPixel(j, i).R.ToString() == &quot;255&quot;)       &lt;br /&gt;                   {                     &lt;br /&gt;                       text = text + &quot;0&quot;;                   &lt;br /&gt;                   }                 &lt;br /&gt;                   else               &lt;br /&gt;                   {                  &lt;br /&gt;                       text = text + &quot;1&quot;;              &lt;br /&gt;                   }             &lt;br /&gt;               }                &lt;br /&gt;               text = text + &quot;&quot;;            &lt;br /&gt;           }             &lt;br /&gt;           return ( text);             &lt;br /&gt;       }    &lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/6879307440436939418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/6879307440436939418' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/6879307440436939418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/6879307440436939418'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/how-to-convert-image-to-binary-string.html' title='How to Convert Image to Binary String?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-3696032530568838499</id><published>2010-10-11T03:08:00.000-07:00</published><updated>2010-10-11T03:09:11.770-07:00</updated><title type='text'>How to capture/store screen shot</title><content type='html'>Here I am trying to simulate &quot;print screen&quot; using C#. &lt;br /&gt;&lt;br /&gt;We all are familiar with taking screen shot manully by pressing &quot;Print Screen&quot; key. There are two alternative for using &quot;Print Screen&quot; key&lt;br /&gt;&lt;br /&gt;1) Alt+PrtScn -Image of active screen&lt;br /&gt;2) PrtScn - Image of Desktop&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Follwing is the code for that.&lt;br /&gt;&lt;br /&gt;  /// &lt;summary&gt;&lt;br /&gt;    /// capture/store the screen shot&lt;br /&gt;    /// &lt;/summary&gt;&lt;br /&gt;    /// &lt;param name=&quot;currentScreen&quot;&gt; true-Active screen   &lt;/param&gt;&lt;br /&gt;    /// &lt;returns&gt;image&lt;/returns&gt;&lt;br /&gt;    public static Image GetScreenShot(bool currentScreen)&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;        if (currentScreen)&lt;br /&gt;            // Simulate Alt+PrtScn keypress.&lt;br /&gt;            SendKeys.Send(&quot;{%}({PRTSC})&quot;);&lt;br /&gt;        else&lt;br /&gt;            // Simulate PrtScn keypress.&lt;br /&gt;            SendKeys.Send(&quot;{PRTSC}&quot;);&lt;br /&gt;&lt;br /&gt;        // Get the image from the clipboard.&lt;br /&gt;        return (Image)Clipboard.GetImage();&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;In the above example, GetScreenShot() function gets the screen shot and returns an Image object from the Clipboard.</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/3696032530568838499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/3696032530568838499' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/3696032530568838499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/3696032530568838499'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/how-to-capturestore-screen-shot.html' title='How to capture/store screen shot'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-2010691688487728335</id><published>2010-10-11T00:51:00.000-07:00</published><updated>2010-10-11T01:03:03.957-07:00</updated><title type='text'>Get Contact information from outlook using C#</title><content type='html'>The following Code sample guide you to get contact information form outlook ( 2003 or 2007). Before using this code, you need to refer “Microsoft outlook object libary “ in you project . &lt;br /&gt;&lt;br /&gt;Note 1: To execute this code outlook must be running in the machine. &lt;br /&gt;&lt;br /&gt;Note 2: You have to create an alias for a namespace “Microsoft.Office.Interop.Outlook” &lt;br /&gt;like using Outlook = Microsoft.Office.Interop.Outlook;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; private List GetContacts(string findLastName) &lt;br /&gt;        { &lt;br /&gt;            List foundContacts = new List(); &lt;br /&gt;            Outlook.Application outlookApp = new Outlook.ApplicationClass(); &lt;br /&gt;            Outlook.MAPIFolder folderContacts = outlookApp.ActiveExplorer().Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts); &lt;br /&gt;            Microsoft.Office.Interop.Outlook.Items searchFolder = folderContacts.Items; &lt;br /&gt;            foreach (Microsoft.Office.Interop.Outlook.ContactItem foundContact in searchFolder)&lt;br /&gt;            { &lt;br /&gt;                if (foundContact.LastName.Contains(findLastName)) &lt;br /&gt;                { &lt;br /&gt;                    foundContact.Display(false); &lt;br /&gt;                    foundContacts.Add(foundContact);&lt;br /&gt;                }&lt;br /&gt;            } return foundContacts;&lt;br /&gt;        }</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/2010691688487728335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/2010691688487728335' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/2010691688487728335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/2010691688487728335'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/get-contact-information-from-outlook.html' title='Get Contact information from outlook using C#'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-947616507351092762</id><published>2010-10-09T12:34:00.000-07:00</published><updated>2010-10-09T12:38:55.170-07:00</updated><title type='text'>Send a mail, whenever a new record is inserted in a table using Sqlserver 2000</title><content type='html'>Here, we have to create a trigger on required table as show below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CREATE TRIGGER reminder2&lt;br /&gt;ON TableX&lt;br /&gt;AFTER INSERT&lt;br /&gt;AS&lt;br /&gt;&lt;br /&gt;EXEC master..xp_sendmail &lt;br /&gt;@recipients=&#39;you@you.com&#39;, &lt;br /&gt;@message = &#39;body&#39; &lt;br /&gt;@subject = &#39;foo was fired.&#39;&lt;br /&gt;GO</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/947616507351092762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/947616507351092762' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/947616507351092762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/947616507351092762'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/send-mail-whenever-new-record-is.html' title='Send a mail, whenever a new record is inserted in a table using Sqlserver 2000'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2333475978780582195.post-2635571491293435385</id><published>2010-10-09T10:54:00.000-07:00</published><updated>2010-10-09T11:44:47.614-07:00</updated><title type='text'>Find out particular row form grid view using LINQ</title><content type='html'>Usually getting a row from Grid view, we will loop thou the grids row collection and check for Specific conditions.&lt;br /&gt;&lt;br /&gt;GridViewRow SelectedRow;&lt;br /&gt;&lt;br /&gt;foreach (GridViewRow gr in GridView1.Rows)&lt;br /&gt;{&lt;br /&gt;if ( gr.Cells[1].ToString() == &quot;Value1&quot; &amp;amp;&amp;amp; gr.Cells[2].ToString() == &quot;Value2&quot;)&lt;br /&gt;{&lt;br /&gt;SelectedRow = gr; break;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;But using LINQ we can write same thing as more readable manners as given below.&lt;br /&gt;&lt;br /&gt;GridViewRow SelectedRow = GridView1.Rows.OfType&lt;gridviewrow&gt;().FirstOrDefault(row =&gt; row.Cells[1].ToString() == &quot;Value1&quot; &amp;amp;&amp;amp; row.Cells[2].ToString() == &quot;Value2&quot;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--&lt;br /&gt;google_ad_client = &quot;pub-9005588364067091&quot;;&lt;br /&gt;/* 300x250, created 10/9/10 */&lt;br /&gt;google_ad_slot = &quot;7555610599&quot;;&lt;br /&gt;google_ad_width = 300;&lt;br /&gt;google_ad_height = 250;&lt;br /&gt;//--&gt;&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type=&quot;text/javascript&quot;&lt;br /&gt;src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;&lt;br /&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sajidpk-saji.blogspot.com/feeds/2635571491293435385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2333475978780582195/2635571491293435385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/2635571491293435385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2333475978780582195/posts/default/2635571491293435385'/><link rel='alternate' type='text/html' href='http://sajidpk-saji.blogspot.com/2010/10/find-out-particular-row-form-grid-view.html' title='Find out particular row form grid view using LINQ'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>