<?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-4180143169669041845</id><updated>2011-11-21T12:34:34.902+02:00</updated><category term='data type'/><category term='xor'/><category term='rowdatabound'/><category term='WebService'/><category term='comment'/><category term='funny'/><category term='connection'/><category term='bug'/><category term='Trigger'/><category term='Date'/><category term='Primary Key'/><category term='conversion'/><category term='DataTable'/><category term='Active Record'/><category term='export'/><category term='general'/><category term='insert'/><category term='Ajax'/><category term='Spybot'/><category term='concatenate'/><category term='string'/><category term='download'/><category term='SQL Server Management Studio'/><category term='cursor'/><category term='BackGroundColor'/><category term='not'/><category term='browser'/><category term='script'/><category term='Monthname'/><category term='link'/><category term='could not load'/><category term='like'/><category term='dos'/><category term='count'/><category term='file'/><category term='UpdatePanel'/><category term='Dot Net'/><category term='float'/><category term='Yahoo'/><category term='try-catch'/><category term='PageCount'/><category term='debug'/><category term='table'/><category term='nHibernate'/><category term='Contains'/><category term='innerHTML'/><category term='good2know'/><category term='foreign key'/><category term='variable'/><category term='select'/><category term='stored procedure'/><category term='client side'/><category term='GridView'/><category term='refresh'/><category term='format'/><category term='constraint'/><category term='AjaxControlToolkit'/><category term='question'/><category term='2005'/><category term='DataRow'/><category term='properties'/><category term='server side'/><category term='C#'/><category term='split'/><category term='Code review'/><category term='Month'/><category term='sql'/><category term='soundex'/><category term='software'/><category term='color'/><category term='HTML'/><category term='charindex'/><category term='design'/><category term='underscore'/><category term='VB.Net'/><category term='Enum'/><category term='JavaScript'/><category term='decimal'/><category term='error'/><category term='msi installer'/><category term='Column'/><category term='google'/><category term='web config'/><title type='text'>Swoosh`s Code stuff</title><subtitle type='html'>SQL, C#, VB, .net, asp, JavaScript, you name it. Code samples, Error messages and stuff like that. Please add coments if you think I said something stupid :D or if you have a better idea ... or anything at all ...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Admin</name><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>51</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4180143169669041845.post-3155736545619717489</id><published>2011-11-21T12:34:00.001+02:00</published><updated>2011-11-21T12:34:34.947+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='msi installer'/><title type='text'>How does Add/Remove Programs get the size and other information?</title><content type='html'>Interesting article on this one &lt;a href="http://blogs.msdn.com/b/oldnewthing/archive/2004/07/09/178342.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-3155736545619717489?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/3155736545619717489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=3155736545619717489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3155736545619717489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3155736545619717489'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2011/11/how-does-addremove-programs-get-size.html' title='How does Add/Remove Programs get the size and other information?'/><author><name>Admin</name><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-4180143169669041845.post-8190399520315802217</id><published>2011-11-10T11:55:00.001+02:00</published><updated>2011-11-10T11:55:13.561+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>How to Build a Chrome Extension</title><content type='html'>I saw this article on lifehacker, thought it pretty cool:&lt;a href="http://lifehacker.com/5857721/how-to-build-a-chrome-extension"&gt;How to Build a Chrome Extension&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-8190399520315802217?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/8190399520315802217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=8190399520315802217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8190399520315802217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8190399520315802217'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2011/11/how-to-build-chrome-extension.html' title='How to Build a Chrome Extension'/><author><name>Admin</name><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-4180143169669041845.post-2440607779157714690</id><published>2011-07-14T15:23:00.000+03:00</published><updated>2011-07-14T15:24:43.635+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='string'/><title type='text'>SQL capitalize words</title><content type='html'>this is from L.E.&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 230px; width:410px; background-color:Beige;"&gt;&lt;div style="width:800px;"&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;set ANSI_NULLS ON&lt;br /&gt;set QUOTED_IDENTIFIER ON&lt;br /&gt;go&lt;br /&gt;&lt;br /&gt;ALTER FUNCTION [dbo].[fn_capitalize] &lt;br /&gt;( &lt;br /&gt;@str AS nvarchar(100) &lt;br /&gt;) &lt;br /&gt;RETURNS nvarchar(100) &lt;br /&gt;AS &lt;br /&gt;BEGIN &lt;br /&gt;&lt;br /&gt;DECLARE &lt;br /&gt;@ret_str AS varchar(100), &lt;br /&gt;@pos AS int, &lt;br /&gt;@len AS int &lt;br /&gt;&lt;br /&gt;SELECT &lt;br /&gt;@ret_str = N' ' + LOWER(@str), &lt;br /&gt;@pos = 1, &lt;br /&gt;@len = LEN(@str) + 1 &lt;br /&gt;&lt;br /&gt;WHILE @pos &gt; 0 AND @pos &lt; @len &lt;br /&gt;BEGIN &lt;br /&gt;SET @ret_str = STUFF(@ret_str, &lt;br /&gt;@pos + 1, &lt;br /&gt;1, &lt;br /&gt;UPPER(SUBSTRING(@ret_str,@pos + 1, 1))) &lt;br /&gt;SET @pos = CHARINDEX(N' ', @ret_str, @pos + 1) &lt;br /&gt;END &lt;br /&gt;RETURN RIGHT(@ret_str, @len - 1) &lt;br /&gt;&lt;br /&gt;END &lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-2440607779157714690?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/2440607779157714690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=2440607779157714690' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/2440607779157714690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/2440607779157714690'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2011/07/sql-capitalize-words.html' title='SQL capitalize words'/><author><name>Admin</name><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-4180143169669041845.post-8778687049522077861</id><published>2011-06-02T12:45:00.001+03:00</published><updated>2011-06-02T12:47:17.423+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='comment'/><title type='text'>SQL - turn debug on-off</title><content type='html'>This is what I do in stored procedures to turn debug print stuff on and off&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 230px; width:410px; background-color:Beige;"&gt;&lt;div style="width:800px;"&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;DECLARE @isDebug BIT; SET @isDebug = 0; IF @isDebug = 0 BEGIN SET NOCOUNT ON END&lt;br /&gt;/* ... sql stuff ...  */&lt;br /&gt;IF @isDebug = 1 PRINT (@strSQL)&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-8778687049522077861?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/8778687049522077861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=8778687049522077861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8778687049522077861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8778687049522077861'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2011/06/sql-turn-debug-on-off.html' title='SQL - turn debug on-off'/><author><name>Admin</name><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-4180143169669041845.post-6856825362103688233</id><published>2011-04-26T15:42:00.003+03:00</published><updated>2011-04-26T15:52:44.744+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DataTable'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Column'/><title type='text'>DataTable move the Column</title><content type='html'>If I don't put the code here, I bet I'll never find it again when I need it ...&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 230px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;       &lt;br /&gt;DataColumn dc = dtRatesManagerAll.Columns["RateId"];&lt;br /&gt;dc.SetOrdinal(dtRatesManagerAll.Columns.Count - 1);&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&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/4180143169669041845-6856825362103688233?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/6856825362103688233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=6856825362103688233' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/6856825362103688233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/6856825362103688233'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2011/04/datatable-move-column.html' title='DataTable move the Column'/><author><name>Admin</name><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-4180143169669041845.post-968408691475576777</id><published>2011-04-13T17:30:00.001+03:00</published><updated>2011-04-13T17:30:43.007+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><title type='text'>Add inserted IDs in a temp table</title><content type='html'>&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 430px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;        &lt;br /&gt;&lt;br /&gt;        CREATE TABLE #cucu(bau int)&lt;br /&gt;CREATE TABLE #cucuafter(bau int)&lt;br /&gt;&lt;br /&gt;  INSERT INTO #cucu(bau)&lt;br /&gt;  OUTPUT inserted.[bau] INTO #cucuafter&lt;br /&gt;  SELECT RateTypeId&lt;br /&gt;  FROM TARFSS_RateType &lt;br /&gt;&lt;br /&gt;select * from #cucu&lt;br /&gt;select * from #cucuafter&lt;br /&gt;&lt;br /&gt;drop TABLE #cucu&lt;br /&gt;drop table #cucuafter&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&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/4180143169669041845-968408691475576777?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/968408691475576777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=968408691475576777' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/968408691475576777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/968408691475576777'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2011/04/add-inserted-ids-in-temp-table.html' title='Add inserted IDs in a temp table'/><author><name>Admin</name><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-4180143169669041845.post-1738494555338035866</id><published>2011-03-10T16:44:00.002+02:00</published><updated>2011-03-10T16:46:23.009+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='download'/><category scheme='http://www.blogger.com/atom/ns#' term='file'/><category scheme='http://www.blogger.com/atom/ns#' term='Dot Net'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Download file from server</title><content type='html'>Download xlsx file from server&lt;br /&gt;(already created)&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 430px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;        &lt;br /&gt;&lt;br /&gt;        public void GenerateXLSXFile(string fileName, ExcelDocument theDocument)&lt;br /&gt;        {&lt;br /&gt;            string filePath = Server.MapPath("~/TempFiles/" + fileName + ".xlsx");&lt;br /&gt;            theDocument.esd_WriteXLSXFile(filePath);&lt;br /&gt;&lt;br /&gt;            Response.Clear();&lt;br /&gt;            Response.AddHeader("Content-Type", "application/vnd.ms-excel");&lt;br /&gt;            Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName + ".xlsx");&lt;br /&gt;            Response.WriteFile(filePath);&lt;br /&gt;&lt;br /&gt;            Response.Flush();&lt;br /&gt;            System.IO.File.Delete(filePath);&lt;br /&gt;            Response.End();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&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/4180143169669041845-1738494555338035866?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/1738494555338035866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=1738494555338035866' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/1738494555338035866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/1738494555338035866'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2011/03/download-file-from-server.html' title='Download file from server'/><author><name>Admin</name><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-4180143169669041845.post-8245053614492576494</id><published>2010-09-30T16:51:00.003+03:00</published><updated>2010-09-30T17:01:38.779+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='variable'/><category scheme='http://www.blogger.com/atom/ns#' term='xor'/><category scheme='http://www.blogger.com/atom/ns#' term='not'/><title type='text'>SQL "not" for a variable</title><content type='html'>in c# i have a:&lt;br /&gt;&lt;br /&gt;&lt;code&gt; a = !a &lt;/code&gt;&lt;br /&gt;(if false makes it true, if true makes it false)&lt;br /&gt;&lt;br /&gt;in sql i want to do the same with a BIT variable, something like:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt; declare @a bit&lt;br /&gt; set @a = 1&lt;br /&gt; select @a&lt;br /&gt; set @a = not (@a)&lt;br /&gt; select @a&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;can i?&lt;br /&gt;&lt;br /&gt;i could always do an IF, but this would "look better" :)&lt;br /&gt;&lt;br /&gt;with the help of stackoverflow.com:&lt;br /&gt;you can do either:&lt;br /&gt;1. &lt;code&gt; @a = @a ^ 1 &lt;/code&gt;&lt;br /&gt;or&lt;br /&gt;2. &lt;code&gt; @a = ~@a &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;i personally prefer #2&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-8245053614492576494?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/8245053614492576494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=8245053614492576494' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8245053614492576494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8245053614492576494'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2010/09/sql-not-for-variable.html' title='SQL &quot;not&quot; for a variable'/><author><name>Admin</name><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-4180143169669041845.post-4843460943781295063</id><published>2010-09-20T11:18:00.001+03:00</published><updated>2010-09-20T11:18:23.972+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='funny'/><title type='text'>Funny Comments</title><content type='html'>&lt;a href="http://cobaia.net/2010/09/top-funny-source-code-comments/" target="_blank"&gt;http://cobaia.net&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-4843460943781295063?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/4843460943781295063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=4843460943781295063' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/4843460943781295063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/4843460943781295063'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2010/09/funny-comments.html' title='Funny Comments'/><author><name>Admin</name><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-4180143169669041845.post-3738494357996132217</id><published>2010-09-03T18:25:00.000+03:00</published><updated>2010-09-03T18:26:06.665+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='link'/><title type='text'>A periodic table for HTML</title><content type='html'>&lt;a href="http://joshduck.com/periodic-table.html" target="_blank"&gt;A periodic table for HTML&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-3738494357996132217?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/3738494357996132217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=3738494357996132217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3738494357996132217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3738494357996132217'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2010/09/periodic-table-for-html.html' title='A periodic table for HTML'/><author><name>Admin</name><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-4180143169669041845.post-5804059098353494194</id><published>2010-08-31T17:49:00.002+03:00</published><updated>2010-08-31T17:52:32.842+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server side'/><category scheme='http://www.blogger.com/atom/ns#' term='format'/><category scheme='http://www.blogger.com/atom/ns#' term='data type'/><category scheme='http://www.blogger.com/atom/ns#' term='decimal'/><category scheme='http://www.blogger.com/atom/ns#' term='Dot Net'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='string'/><title type='text'>Textbox validate characters digits only - Desktop App</title><content type='html'>I wanted to let the user enter onlydigits in a Textbox and validate the characters when the types.&lt;br /&gt;I came up with this:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 400px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;        &lt;br /&gt;private void numericUpDown_Count_KeyPress(object sender, KeyPressEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            if ("1234567890".IndexOf(e.KeyChar.ToString()) &gt; 0)&lt;br /&gt;            {&lt;br /&gt;                e.Handled = false;&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                e.Handled = true;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;tell me if there's an easier way :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-5804059098353494194?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/5804059098353494194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=5804059098353494194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/5804059098353494194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/5804059098353494194'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2010/08/textbox-validate-characters-digits-only.html' title='Textbox validate characters digits only - Desktop App'/><author><name>Admin</name><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-4180143169669041845.post-404204757191021668</id><published>2010-06-16T14:49:00.001+03:00</published><updated>2010-06-16T14:50:22.805+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='good2know'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><title type='text'>Citrix: how do you ctrl + alt + delete ?</title><content type='html'>in Citrix, the ctrl + alt + delete can be done like this:&lt;br /&gt;ctrl + f1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-404204757191021668?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/404204757191021668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=404204757191021668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/404204757191021668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/404204757191021668'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2010/06/citrix-how-do-you-ctrl-alt-delete.html' title='Citrix: how do you ctrl + alt + delete ?'/><author><name>Admin</name><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-4180143169669041845.post-8079471495510001510</id><published>2010-05-11T17:35:00.004+03:00</published><updated>2010-05-11T17:56:41.271+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='msi installer'/><category scheme='http://www.blogger.com/atom/ns#' term='Dot Net'/><category scheme='http://www.blogger.com/atom/ns#' term='connection'/><category scheme='http://www.blogger.com/atom/ns#' term='error'/><title type='text'>The ConnectionString property has not been initialized</title><content type='html'>I had this error:&lt;br /&gt;&lt;br /&gt;The ConnectionString property has not been initialized.&lt;br /&gt;&lt;br /&gt;I have a MSI installer, that is installed in our QA environment.&lt;br /&gt;&lt;br /&gt;It was working before, and suddenly, I only had this error.&lt;br /&gt;Googled up a bit, all this info on how to get the connection string and all that.&lt;br /&gt;&lt;br /&gt;I finally realized that I rebuilt the whole solution, but I didn't rebuild the Deployment project. After a rebuild ... everything back to normal.&lt;br /&gt;&lt;br /&gt;#:-S&lt;br /&gt;&lt;br /&gt;Hope this helps someone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-8079471495510001510?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/8079471495510001510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=8079471495510001510' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8079471495510001510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8079471495510001510'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2010/05/connectionstring-property-has-not-been.html' title='The ConnectionString property has not been initialized'/><author><name>Admin</name><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-4180143169669041845.post-3857059027665531820</id><published>2010-04-01T18:30:00.002+03:00</published><updated>2010-04-01T18:33:18.492+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dot Net'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><category scheme='http://www.blogger.com/atom/ns#' term='rowdatabound'/><category scheme='http://www.blogger.com/atom/ns#' term='GridView'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Gridview nowrap</title><content type='html'>What do you do when you have&lt;br /&gt;AllowPaging="False" AllowSorting="False" AutoGenerateColumns="True" Width="800px" ShowHeader="true"&lt;br /&gt;&lt;br /&gt;And it wraps all your data?&lt;br /&gt;&lt;br /&gt;you add:&lt;br /&gt;&lt;br /&gt;OnRowDataBound="GridView_RowDataBound"&lt;br /&gt;&lt;br /&gt;and then:&lt;br /&gt;&lt;br /&gt;protected void GridView_RowDataBound(object sender, GridViewRowEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            for (int i = 0; i &lt; e.Row.Cells.Count; i++)&lt;br /&gt;            {&lt;br /&gt;                e.Row.Cells[i].Attributes.Add("style", "white-space: nowrap;");&lt;br /&gt;            }&lt;br /&gt;        }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-3857059027665531820?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/3857059027665531820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=3857059027665531820' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3857059027665531820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3857059027665531820'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2010/04/gridview-nowrap.html' title='Gridview nowrap'/><author><name>Admin</name><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-4180143169669041845.post-3103550873423610035</id><published>2010-03-02T16:13:00.003+02:00</published><updated>2010-03-02T16:16:35.878+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DataTable'/><category scheme='http://www.blogger.com/atom/ns#' term='data type'/><category scheme='http://www.blogger.com/atom/ns#' term='Enum'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Enum to DataTable</title><content type='html'>I had a lot of ENUM-s and needed to make DataTable - s with the same structure for pretty much all of them.&lt;br /&gt;I came up with this:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 400px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;        private static DataTable CreateDataTable &lt; TheSQLtable &gt; ()&lt;br /&gt;        {&lt;br /&gt;            Type t = typeof(TheSQLtable);&lt;br /&gt;            if (!t.IsEnum)&lt;br /&gt;            {&lt;br /&gt;                throw new InvalidOperationException("Type is not Enum");&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            DataTable dt = new DataTable();&lt;br /&gt;            dt.TableName = t.Name;&lt;br /&gt;            DataColumn dc;&lt;br /&gt;&lt;br /&gt;            string[] names = Enum.GetNames(t);&lt;br /&gt;            foreach (string name in names)&lt;br /&gt;            {&lt;br /&gt;                dc = new DataColumn();&lt;br /&gt;                dc.DataType = System.Type.GetType("System.String");&lt;br /&gt;                dc.ColumnName = name;&lt;br /&gt;                dc.Unique = false;&lt;br /&gt;                dt.Columns.Add(dc);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            return dt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;(with a little help from stackoverflow)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-3103550873423610035?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/3103550873423610035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=3103550873423610035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3103550873423610035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3103550873423610035'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2010/03/enum-to-datatable.html' title='Enum to DataTable'/><author><name>Admin</name><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-4180143169669041845.post-1230876753395057311</id><published>2010-02-24T16:34:00.002+02:00</published><updated>2010-02-25T11:11:41.362+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DataTable'/><category scheme='http://www.blogger.com/atom/ns#' term='DataRow'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>How to check in C# if a DataRow is Empty. (nothing in any column)</title><content type='html'>I was hoping i find something like dr.isEmpty(), but there's nothing "this nice". So you do something plain like:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 400px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;bool AreAllColumnsEmpty(DataRow dr)&lt;br /&gt;{&lt;br /&gt; if (dr == null)&lt;br /&gt; {&lt;br /&gt;  return true;&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt;  foreach(var value in dr.ItemArray)&lt;br /&gt;  {&lt;br /&gt;    if (value != null)&lt;br /&gt;                    {&lt;br /&gt;                        if (value.ToString() != "")&lt;br /&gt;                        {&lt;br /&gt;                            return false;&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;  }&lt;br /&gt;  return true;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&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/4180143169669041845-1230876753395057311?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/1230876753395057311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=1230876753395057311' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/1230876753395057311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/1230876753395057311'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2010/02/how-to-check-in-c-if-datarow-is-empty.html' title='How to check in C# if a DataRow is Empty. (nothing in any column)'/><author><name>Admin</name><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-4180143169669041845.post-949811945073644983</id><published>2009-11-05T15:41:00.002+02:00</published><updated>2009-11-05T15:41:47.100+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='constraint'/><title type='text'>SQL Unique constraint</title><content type='html'>ALTER TABLE [CMST_Country]&lt;br /&gt;ADD CONSTRAINT uc_CountryCode UNIQUE (Code)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-949811945073644983?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/949811945073644983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=949811945073644983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/949811945073644983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/949811945073644983'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2009/11/sql-unique-constraint.html' title='SQL Unique constraint'/><author><name>Admin</name><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-4180143169669041845.post-4991084166253260448</id><published>2009-10-12T14:56:00.001+03:00</published><updated>2009-10-12T14:57:42.378+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='split'/><title type='text'>SQL split</title><content type='html'>found this on the net&lt;br /&gt;&lt;br /&gt;i like this very much&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 400px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;CREATE TABLE #t (UserName VARCHAR(50))&lt;br /&gt;&lt;br /&gt; DECLARE @sql VARCHAR(MAX)&lt;br /&gt; SELECT @sql = 'INSERT INTO #t SELECT ''' + REPLACE(@UserList, ',', ''' UNION SELECT ''') + ''''&lt;br /&gt; PRINT (@sql)&lt;br /&gt; EXEC (@sql)&lt;br /&gt;&lt;br /&gt; SELECT * FROM #t&lt;br /&gt;&lt;br /&gt; IF OBJECT_ID('tempdb..#t') IS NOT NULL BEGIN DROP TABLE #t END&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;you can feedback also :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-4991084166253260448?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/4991084166253260448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=4991084166253260448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/4991084166253260448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/4991084166253260448'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2009/10/sql-split.html' title='SQL split'/><author><name>Admin</name><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-4180143169669041845.post-3754325903129607639</id><published>2009-10-02T14:47:00.001+03:00</published><updated>2009-10-02T14:49:26.554+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Disable browser's back button ?</title><content type='html'>you can disable the back button, they say.&lt;br /&gt;&lt;br /&gt;didn't test the code yet, will be back with feedback&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 180px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt; script type="text/javascript"&gt;&lt;br /&gt;&lt;br /&gt;function noBack(){window.history.forward()}&lt;br /&gt;noBack();&lt;br /&gt;window.onload=noBack;&lt;br /&gt;window.onpageshow=function(evt){if(evt.persisted)noBack()}&lt;br /&gt;window.onunload=function(){void(0)}&lt;br /&gt;&lt;br /&gt;&lt; / script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;you can feedback also :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-3754325903129607639?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/3754325903129607639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=3754325903129607639' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3754325903129607639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3754325903129607639'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2009/10/disable-browsers-back-button.html' title='Disable browser&apos;s back button ?'/><author><name>Admin</name><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-4180143169669041845.post-398244557800886731</id><published>2009-06-30T14:17:00.003+03:00</published><updated>2009-08-24T13:24:40.334+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='error'/><category scheme='http://www.blogger.com/atom/ns#' term='web config'/><category scheme='http://www.blogger.com/atom/ns#' term='WebService'/><title type='text'>Session state can only be used when enablesessionstate is set to true</title><content type='html'>I had a JavaScript function, that called a WebService, and I had this "Session state can only be used when enablesessionstate is set to true ..." error over and over again.&lt;br /&gt;&lt;br /&gt;Everything was all right, in the web.config and in the "&lt; % @ Page " too.&lt;br /&gt;&lt;br /&gt;It was still giving me the error.&lt;br /&gt;&lt;br /&gt;I made it work doing this:&lt;br /&gt;start -- control panel -- administrative tools -- services -- asp.net state server&lt;br /&gt;&lt;br /&gt;by default it is stopped. i started it.&lt;br /&gt;that's it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-398244557800886731?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/398244557800886731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=398244557800886731' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/398244557800886731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/398244557800886731'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2009/06/session-state-can-only-be-used-when.html' title='Session state can only be used when enablesessionstate is set to true'/><author><name>Admin</name><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-4180143169669041845.post-4692168958298925270</id><published>2009-03-13T14:35:00.004+02:00</published><updated>2009-03-13T14:42:47.556+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='soundex'/><category scheme='http://www.blogger.com/atom/ns#' term='charindex'/><category scheme='http://www.blogger.com/atom/ns#' term='string'/><category scheme='http://www.blogger.com/atom/ns#' term='stored procedure'/><category scheme='http://www.blogger.com/atom/ns#' term='select'/><title type='text'>Select all from all tables all columns</title><content type='html'>I sometimes need to search for something that I know I added in one of the tables in a database, but i just don't know where I added it.&lt;br /&gt;So for this one, I would need something to search in all the tables. &lt;br /&gt;This case, only 'char', 'varchar', 'nchar', 'nvarchar' columns.&lt;br /&gt;&lt;br /&gt;I searched on the internet, and found &lt;a href="http://blog.richnetapps.com/index.php/searching_in_all_tables_and_columns_of_a" target="_blank"&gt;this&lt;/a&gt; guy.&lt;br /&gt;The stored procedure is pretty cool, it works just the way I wanted.&lt;br /&gt;I only added a SOUNDEX to it, so it can find even if you misspell the word.&lt;br /&gt;&lt;br /&gt;it takes a while (around 10 seconds on a 400 tables database), but it is very cool.&lt;br /&gt;&lt;br /&gt;I am thinking about how nice would it be to implement a search like this in your application (linking to the right screen, that might need a lot of parameters is probably the hard part)&lt;br /&gt;&lt;br /&gt;So here's the code:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 600px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;CREATE PROC ADMNSP_HotSearch&lt;br /&gt;(&lt;br /&gt;        @SearchStr NVARCHAR(100)&lt;br /&gt;)&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;        CREATE TABLE #Results (ColumnName NVARCHAR(370), ColumnValue NVARCHAR(3630), Accuracy INT)&lt;br /&gt;&lt;br /&gt;        SET NOCOUNT ON&lt;br /&gt;&lt;br /&gt;        DECLARE @TableName NVARCHAR(256), @ColumnName NVARCHAR(128), @SearchStr2 NVARCHAR(110), @mySQL VARCHAR(8000)&lt;br /&gt;        SET  @TableName = ''&lt;br /&gt;        SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')&lt;br /&gt;&lt;br /&gt;        WHILE @TableName IS NOT NULL&lt;br /&gt;        BEGIN&lt;br /&gt;                SET @ColumnName = ''&lt;br /&gt;                SET @TableName = &lt;br /&gt;                (&lt;br /&gt;                        SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))&lt;br /&gt;                        FROM    INFORMATION_SCHEMA.TABLES&lt;br /&gt;                        WHERE           TABLE_TYPE = 'BASE TABLE'&lt;br /&gt;                                AND     QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) &gt; @TableName&lt;br /&gt;                                AND     OBJECTPROPERTY(&lt;br /&gt;                                                OBJECT_ID(&lt;br /&gt;                                                        QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)&lt;br /&gt;                                                         ), 'IsMSShipped'&lt;br /&gt;                                                       ) = 0&lt;br /&gt;                )&lt;br /&gt;&lt;br /&gt;                WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)&lt;br /&gt;                BEGIN&lt;br /&gt;                        SET @ColumnName =&lt;br /&gt;                        (&lt;br /&gt;                                SELECT MIN(QUOTENAME(COLUMN_NAME))&lt;br /&gt;                                FROM    INFORMATION_SCHEMA.COLUMNS&lt;br /&gt;                                WHERE           TABLE_SCHEMA    = PARSENAME(@TableName, 2)&lt;br /&gt;                                        AND     TABLE_NAME      = PARSENAME(@TableName, 1)&lt;br /&gt;                                        AND     DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar')&lt;br /&gt;                                        AND     QUOTENAME(COLUMN_NAME) &gt; @ColumnName&lt;br /&gt;                        )&lt;br /&gt;        &lt;br /&gt;                        IF @ColumnName IS NOT NULL&lt;br /&gt;                        BEGIN&lt;br /&gt;        SET @mySQL = 'SELECT ''' + @TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630) , 1&lt;br /&gt;                                        FROM ' + @TableName + ' (NOLOCK) ' +&lt;br /&gt;                                        ' WHERE SOUNDEX(' + @ColumnName + ') = SOUNDEX(''' + @SearchStr + ''') AND ABS( LEN(' + @ColumnName + ') - LEN(''' + @SearchStr + ''') ) &lt; 10 '&lt;br /&gt;&lt;br /&gt;                                /*PRINT (@mySQL)*/&lt;br /&gt;                           &lt;br /&gt;           INSERT INTO #Results&lt;br /&gt;                                EXEC (@mySQL)&lt;br /&gt;                        END&lt;br /&gt;                END     &lt;br /&gt;        END&lt;br /&gt;&lt;br /&gt;  UPDATE #Results SET Accuracy = 0 WHERE CHARINDEX(@SearchStr, ColumnValue) &gt; 0&lt;br /&gt;&lt;br /&gt;        SELECT DISTINCT ColumnName, ColumnValue, Accuracy, CHARINDEX(@SearchStr, ColumnValue) AS [CHARINDEX] FROM #Results Order by Accuracy, ColumnValue&lt;br /&gt;  DROP TABLE #Results &lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&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/4180143169669041845-4692168958298925270?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/4692168958298925270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=4692168958298925270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/4692168958298925270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/4692168958298925270'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2009/03/select-all-from-all-tables-all-columns.html' title='Select all from all tables all columns'/><author><name>Admin</name><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-4180143169669041845.post-3241263098426220692</id><published>2009-03-06T14:10:00.005+02:00</published><updated>2009-03-06T14:15:13.764+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='conversion'/><category scheme='http://www.blogger.com/atom/ns#' term='data type'/><category scheme='http://www.blogger.com/atom/ns#' term='float'/><category scheme='http://www.blogger.com/atom/ns#' term='decimal'/><title type='text'>Float vs. Decimal</title><content type='html'>I used float instead of decimal, I'll never do that again.&lt;br /&gt;I found some stored procedures, that had numeric parameters used as varchar. I'll never do that either.&lt;br /&gt;Check out why:&lt;br /&gt;&lt;br /&gt;1st case:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 300px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;declare @a as float&lt;br /&gt;set @a = 13705.05&lt;br /&gt;select @a&lt;br /&gt;&lt;br /&gt;declare @b as varchar(100)&lt;br /&gt;set @b = @a&lt;br /&gt;select @b&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;2nd case:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 300px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;declare @a as float&lt;br /&gt;set @a = 137.86&lt;br /&gt;select @a&lt;br /&gt;&lt;br /&gt;declare @b as varchar(100)&lt;br /&gt;set @b = @a&lt;br /&gt;select @b&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Run them, You'll get this:&lt;br /&gt;1st case:&lt;br /&gt;&lt;br /&gt;13705.05&lt;br /&gt;13705&lt;br /&gt;&lt;br /&gt;2nd case:&lt;br /&gt;&lt;br /&gt;137.86&lt;br /&gt;137.86&lt;br /&gt;&lt;br /&gt;see my point?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-3241263098426220692?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/3241263098426220692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=3241263098426220692' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3241263098426220692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3241263098426220692'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2009/03/float-vs-decimal.html' title='Float vs. Decimal'/><author><name>Admin</name><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-4180143169669041845.post-4138995976598917810</id><published>2009-02-25T18:36:00.006+02:00</published><updated>2009-02-25T18:42:38.673+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='foreign key'/><category scheme='http://www.blogger.com/atom/ns#' term='constraint'/><category scheme='http://www.blogger.com/atom/ns#' term='table'/><category scheme='http://www.blogger.com/atom/ns#' term='Column'/><title type='text'>How to add a constraint on a table that has 2 iD columns</title><content type='html'>How to add a constraint on a table that has 2 iD columns&lt;br /&gt;The idea is that both id columns have allow nulls, but you would like to have an ID at least in one of them all the time.&lt;br /&gt;&lt;br /&gt;This is how you do it:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 240px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;ALTER TABLE [PTCTSS_FactorGroup] ADD &lt;br /&gt;CONSTRAINT [CK_PTCTSS_FactorGroup_2cols] CHECK (((not([ContractSectionId] is null))) or ((not([CustomModuleId] is null))))&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Thanks 2 Cris ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-4138995976598917810?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/4138995976598917810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=4138995976598917810' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/4138995976598917810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/4138995976598917810'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2009/02/how-to-add-constraint-on-table-that-has.html' title='How to add a constraint on a table that has 2 iD columns'/><author><name>Admin</name><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-4180143169669041845.post-6672677338652551135</id><published>2009-02-05T11:13:00.000+02:00</published><updated>2009-02-05T11:14:16.814+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='file'/><category scheme='http://www.blogger.com/atom/ns#' term='dos'/><category scheme='http://www.blogger.com/atom/ns#' term='concatenate'/><title type='text'>Dos - glue (sql) files together</title><content type='html'>I wanted to concatenate files together&lt;br /&gt;I had like 20 sql files&lt;br /&gt;I knew there had to be a way ... other than the "hard" way.&lt;br /&gt;&lt;br /&gt;Romica helped me out ;)&lt;br /&gt;&lt;br /&gt;this is what he did:&lt;br /&gt;opened a CMD&lt;br /&gt;and go:&lt;br /&gt;&lt;br /&gt;type *.sql &gt;&gt; t.sql&lt;br /&gt;&lt;br /&gt;done&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-6672677338652551135?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/6672677338652551135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=6672677338652551135' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/6672677338652551135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/6672677338652551135'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2009/02/dos-glue-sql-files-together.html' title='Dos - glue (sql) files together'/><author><name>Admin</name><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-4180143169669041845.post-6869047704210848610</id><published>2009-02-04T17:24:00.002+02:00</published><updated>2009-02-04T17:27:15.627+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='innerHTML'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>innerHTML not working in ie7</title><content type='html'>I had a bug&lt;br /&gt;It looked like innerHTML is not working in ie7.&lt;br /&gt;It was somthing like this:&lt;br /&gt;function ShowLblError(msg)&lt;br /&gt;    {&lt;br /&gt;        document.getElementById("&lt;%=lblError.ClientID%&gt;").innerHTML = msg;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;It worked fine in IE6, but not in IE7.&lt;br /&gt;Finally I found out that it is working in IE7 too, I just had a panel with some weird height (it was ok in in IE6, ugly in IE7), and I just couldn't see the Label.&lt;br /&gt;&lt;br /&gt;So innerHTML IS working in ie7&lt;br /&gt;:)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-6869047704210848610?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/6869047704210848610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=6869047704210848610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/6869047704210848610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/6869047704210848610'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2009/02/innerhtml-not-working-in-ie7.html' title='innerHTML not working in ie7'/><author><name>Admin</name><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-4180143169669041845.post-8340551835459889912</id><published>2009-01-26T12:15:00.002+02:00</published><updated>2009-01-26T12:34:44.570+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='Spybot'/><category scheme='http://www.blogger.com/atom/ns#' term='Yahoo'/><title type='text'>Yahoo Messenger disappears</title><content type='html'>A friend of mine had this problem, and asked me to try to help him out.&lt;br /&gt;After he logged on to Yahoo Messenger, the Messenger disappeared. Just plain and simple "closed himself" :)&lt;br /&gt;&lt;br /&gt;I looked into it, even opened the Task Manager, and saw that the application just vanishes from there too.&lt;br /&gt;&lt;br /&gt;I had no idea what to do at first, but I saw some forums saying that it was a virus, or something like this, related to the PC-s safety.&lt;br /&gt;People was saying about using Hijackthis and stuff like that.&lt;br /&gt;&lt;br /&gt;What I did was: installed Spybot Search and Destroy. Ran it once, found 18 problems. I never even checked what was all that, I just clicked on "Fix selected problems". Problem fixed ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-8340551835459889912?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/8340551835459889912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=8340551835459889912' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8340551835459889912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8340551835459889912'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2009/01/yahoo-messenger-disappears.html' title='Yahoo Messenger disappears'/><author><name>Admin</name><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-4180143169669041845.post-3771757105508862586</id><published>2008-10-09T16:44:00.010+03:00</published><updated>2008-10-09T16:57:21.388+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='string'/><category scheme='http://www.blogger.com/atom/ns#' term='stored procedure'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>Generate Stored procedures scripts for SP-s modified after a specific date</title><content type='html'>When I am installing my changes in an other environment (test envir in my case) i need to get scripts for the &lt;span style="font-weight:bold;"&gt;modified&lt;/span&gt; stored procedures only. When you have a lot of sp-s, and you only need scripts for 3-4 of them, then you should use a script like this one:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 800px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:1200px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE [dbo].[GenerateLatestProcedures]&lt;br /&gt;@DateFrom DATETIME&lt;br /&gt;&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt; &lt;br /&gt; DECLARE @spName NVARCHAR(128), @object_id INT&lt;br /&gt; DECLARE myCursor CURSOR FOR &lt;br /&gt;  SELECT name&lt;br /&gt;  FROM sys.procedures &lt;br /&gt;  WHERE modify_date &gt;= @DateFrom OR create_date &gt;= @DateFrom&lt;br /&gt;  ORDER BY modify_date DESC&lt;br /&gt;&lt;br /&gt; OPEN myCursor&lt;br /&gt; FETCH NEXT FROM myCursor INTO @spName&lt;br /&gt; WHILE @@fetch_status = 0&lt;br /&gt; BEGIN&lt;br /&gt;&lt;br /&gt;  PRINT 'IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N''[' + CONVERT(VARCHAR(255), @spName) + ']'') AND type in (N''P'', N''PC''))&lt;br /&gt;  DROP PROCEDURE [' + CONVERT(VARCHAR(255), @spName) + ']'&lt;br /&gt;&lt;br /&gt;  SELECT @object_id = object_id FROM sys.procedures WHERE NAME = @spName&lt;br /&gt;  PRINT OBJECT_DEFINITION(@object_id)&lt;br /&gt;&lt;br /&gt; FETCH NEXT FROM myCursor INTO @spName&lt;br /&gt; END&lt;br /&gt; CLOSE myCursor&lt;br /&gt; DEALLOCATE myCursor&lt;br /&gt;&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&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/4180143169669041845-3771757105508862586?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/3771757105508862586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=3771757105508862586' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3771757105508862586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3771757105508862586'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/10/generate-stored-procedures-scripts-for.html' title='Generate Stored procedures scripts for SP-s modified after a specific date'/><author><name>Admin</name><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-4180143169669041845.post-3847665672623026430</id><published>2008-09-29T18:25:00.004+03:00</published><updated>2009-02-25T18:43:48.648+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='connection'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='web config'/><title type='text'>The ConnectionString property has not been initialized.</title><content type='html'>The ConnectionString property has not been initialized.&lt;br /&gt;&lt;br /&gt;????&lt;br /&gt;&lt;br /&gt;:D&lt;br /&gt;&lt;br /&gt;it is sooo easy. but you can waste a lot of time on this one.&lt;br /&gt;&lt;br /&gt;Here is what was my problem:&lt;br /&gt;1.) web.config:&lt;br /&gt;&lt;br /&gt;&lt; appSettings &gt;&lt;br /&gt;&lt; add key="aaa" value="server=swoosh\sqlserver2k5;database=swdb;uid=sa;password=;" /&gt;&lt;br /&gt;&lt; / appSettings &gt;&lt;br /&gt;&lt;br /&gt;2.) accessing:&lt;br /&gt;string strConnRSS = System.Configuration.ConfigurationManager.AppSettings["bbb"];&lt;br /&gt;&lt;br /&gt;yes.&lt;br /&gt;aaa &lt;&gt; bbb&lt;br /&gt;&lt;br /&gt;Hope this'll help someone :)&lt;br /&gt;don't look for anything too complicated :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-3847665672623026430?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/3847665672623026430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=3847665672623026430' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3847665672623026430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3847665672623026430'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/09/connectionstring-property-has-not-been.html' title='The ConnectionString property has not been initialized.'/><author><name>Admin</name><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-4180143169669041845.post-2561029459532630738</id><published>2008-09-19T15:53:00.003+03:00</published><updated>2008-09-19T15:55:58.299+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Month'/><category scheme='http://www.blogger.com/atom/ns#' term='Monthname'/><category scheme='http://www.blogger.com/atom/ns#' term='Date'/><category scheme='http://www.blogger.com/atom/ns#' term='Dot Net'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='string'/><title type='text'>Monthname in C# (C Sharp)</title><content type='html'>I think there's no Monthname (like is asp for ex. - which is weird)&lt;br /&gt;&lt;br /&gt;But this is easy:&lt;br /&gt;&lt;br /&gt;DateTime swTest = new DateTime(2000, 11, 1);&lt;br /&gt;Page.Response.Write(swTest.ToString("MMMM"));&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-2561029459532630738?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/2561029459532630738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=2561029459532630738' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/2561029459532630738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/2561029459532630738'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/09/monthname-in-c-c-sharp.html' title='Monthname in C# (C Sharp)'/><author><name>Admin</name><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-4180143169669041845.post-8251737824078559093</id><published>2008-09-01T19:12:00.006+03:00</published><updated>2008-09-01T19:18:17.999+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='string'/><title type='text'>SQL - add zeros to the left</title><content type='html'>Ever needed to add zeros to the left of your string?&lt;br /&gt;For example: instead of "1", you need "0001" displayed.&lt;br /&gt;All this from SQL ...&lt;br /&gt;&lt;br /&gt;I think this is an easy way of doing that:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 180px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;select replicate('0', 6-len(convert(varchar(50), 'aaa'))) + convert(varchar(50), 'aaa')&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;You need to change the '6' if longer, and 'aaa' is your string ...&lt;br /&gt;&lt;br /&gt;what do you think?&lt;br /&gt;comment!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-8251737824078559093?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/8251737824078559093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=8251737824078559093' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8251737824078559093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8251737824078559093'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/09/sql-add-zeros-to-left.html' title='SQL - add zeros to the left'/><author><name>Admin</name><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-4180143169669041845.post-2715224558123541983</id><published>2008-09-01T18:55:00.015+03:00</published><updated>2008-09-01T19:23:45.644+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='server side'/><category scheme='http://www.blogger.com/atom/ns#' term='client side'/><category scheme='http://www.blogger.com/atom/ns#' term='VB.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='Dot Net'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Calling a server side from client's Javascript</title><content type='html'>Did you ever need something like calling a server side thing from client's? Javascript ... ?&lt;br /&gt;&lt;br /&gt;I think this is an easy way of doing that:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 280px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:1900px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;Response.Write ( " &lt; script language="javascript"&gt; function SetPmoR_Id() { document.all('" + lkbPmoRepAdd.ClientID + "').click(); } &lt; / script&gt;")&lt;br /&gt;&lt;br /&gt;//or:&lt;br /&gt;&lt;br /&gt;ClientScript.RegisterClientScriptBlock(this.GetType(), "somethn", " &lt; script type='text/javascript'&gt; function whatdoyouwannacalit() { try {document.all('" + yourlinkbutton.ClientID + "').click();} catch(e){} } &lt; / script&gt;");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;what do you think?&lt;br /&gt;&lt;br /&gt;you think there's an easier way? comment!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-2715224558123541983?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/2715224558123541983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=2715224558123541983' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/2715224558123541983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/2715224558123541983'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/09/did-you-ever-need-something-like.html' title='Calling a server side from client&apos;s Javascript'/><author><name>Admin</name><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-4180143169669041845.post-1135626005719052706</id><published>2008-08-20T18:00:00.005+03:00</published><updated>2008-08-20T18:05:52.680+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Primary Key'/><category scheme='http://www.blogger.com/atom/ns#' term='DataTable'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Column'/><category scheme='http://www.blogger.com/atom/ns#' term='Contains'/><title type='text'>DataTable C# Primary Key column .Contains</title><content type='html'>I needed to do something like use DataTable in C#, set Primary Key column, and later on maybe a "contains" ... to see if my set of ID is inside the DataTable&lt;br /&gt;Anyways: this is how I did it: &lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 350px; width:710px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;DataTable myFilteredTerms = objSomethn.getresultsinDT ...&lt;br /&gt;DataColumn[] myPrimaryKeyColumn = new DataColumn[1];&lt;br /&gt;myPrimaryKeyColumn.SetValue(myFilteredTerms.Columns[0], 0);&lt;br /&gt;myFilteredTerms.PrimaryKey = myPrimaryKeyColumn;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;if (myFilteredTerms.Rows.Contains(intTheIdYouAreLookingFor))&lt;br /&gt;{&lt;br /&gt;...&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;(first column is the one with the ID-s ...)&lt;br /&gt;&lt;br /&gt;as always, if you got pro or contra ... tell me bout it&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-1135626005719052706?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/1135626005719052706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=1135626005719052706' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/1135626005719052706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/1135626005719052706'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/08/datatable-c-primary-key-column-contains.html' title='DataTable C# Primary Key column .Contains'/><author><name>Admin</name><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-4180143169669041845.post-5411342960458867824</id><published>2008-08-15T15:31:00.002+03:00</published><updated>2008-08-15T15:34:10.307+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Enum'/><category scheme='http://www.blogger.com/atom/ns#' term='count'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>How to count enum elements in C#?</title><content type='html'>If you need to count the enum elements ...&lt;br /&gt;&lt;br /&gt;this is how you do it:&lt;br /&gt;&lt;br /&gt;int nYourNumber = Enum.GetValues(typeof(YourEnumName)).Length;&lt;br /&gt;&lt;br /&gt;as always: if you have something neater ;) comment ... I'll update the post if needed ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-5411342960458867824?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/5411342960458867824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=5411342960458867824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/5411342960458867824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/5411342960458867824'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/08/how-to-count-enum-elements-in-c.html' title='How to count enum elements in C#?'/><author><name>Admin</name><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-4180143169669041845.post-229582164446739416</id><published>2008-07-31T10:53:00.003+03:00</published><updated>2008-07-31T10:58:00.377+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='color'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='BackGroundColor'/><title type='text'>Parse html table cells</title><content type='html'>I wanted to parse a html table and color the TD - s (background).&lt;br /&gt;All of them.&lt;br /&gt;I have a column that has links in it. My basic Idea was to change the background color of the TD when you click the link inside that. That's easy, but without some global (js?) variable, you don't know what was previously clicked, and you might want to turn that "off" :)&lt;br /&gt;Anyways: this is how I did it: &lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 350px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;function ParseTableAndColorTheBackground(objTbl, WhatColorShouldItBe)&lt;br /&gt;{&lt;br /&gt;   var intNrOfTrs = objTbl.tBodies[0].rows.length;&lt;br /&gt;   for (var i=0; i &lt; intNrOfTrs; i++)&lt;br /&gt;   {&lt;br /&gt;     objTbl.tBodies[0].rows[i].cells[1].style.backgroundColor = WhatColorShouldItBe;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;you have a better way to do this?&lt;br /&gt;&lt;br /&gt;comment me pls&lt;br /&gt;;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-229582164446739416?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/229582164446739416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=229582164446739416' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/229582164446739416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/229582164446739416'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/07/parse-html-table-cells.html' title='Parse html table cells'/><author><name>Admin</name><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-4180143169669041845.post-1000437505789762420</id><published>2008-07-11T12:37:00.001+03:00</published><updated>2008-07-11T12:40:26.972+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UpdatePanel'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='AjaxControlToolkit'/><category scheme='http://www.blogger.com/atom/ns#' term='Trigger'/><category scheme='http://www.blogger.com/atom/ns#' term='error'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='refresh'/><title type='text'>Ajax Databind – javascript error “unknown runtime error”</title><content type='html'>I had this error a few minutes ago. It was the weirdest thing. On a Save button (linkbutton) I had a gridview repopulated using Ajax. The Save linkbutton was also added as a trigger for the Ajax’s UpdatePanel. The save went well, saved in the database, but when it came to refresh the gridview, this javascript error popped up.&lt;br /&gt;&lt;br /&gt;The fix was move the stuff around. Scriptmanager, UpdatePanel, ObjectDataSource … all of them inside the form … Anyways … if you have this error, you don’t necessarily have a big problem, you just need to figure out what did you put in the wrong place.&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 450px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;    &lt; form id="form1" runat="server"&gt;&lt;br /&gt;&lt;br /&gt;            &lt; ajax:ScriptManager runat="server" ID="ScriptManager1" EnablePartialRendering="true"&gt;&lt;br /&gt;                &lt; Services&gt;&lt;br /&gt;                    &lt; ajax:ServiceReference Path="../Include/WebService.asmx" InlineScript="true" /&gt;&lt;br /&gt;                &lt; /Services&gt;&lt;br /&gt;            &lt; /ajax:ScriptManager&gt;&lt;br /&gt;            &lt; ajax:UpdatePanel ID="up2" runat="server"&gt;&lt;br /&gt;                &lt; ContentTemplate&gt;&lt;br /&gt;                        &lt; asp:GridView&gt;&lt;br /&gt;                            ...&lt;br /&gt;                        &lt; /asp:GridView&gt;&lt;br /&gt;                &lt; /ContentTemplate&gt;&lt;br /&gt;            &lt; Triggers&gt;&lt;br /&gt;                &lt; ajax:AsyncPostBackTrigger ControlID="lbnSave" EventName="Click" /&gt;&lt;br /&gt;            &lt; /Triggers&gt;&lt;br /&gt;            &lt; /ajax:UpdatePanel&gt;&lt;br /&gt;&lt;br /&gt;            &lt; asp:ObjectDataSource ID="ods" ...&lt;br /&gt;                &lt; SelectParameters&gt;&lt;br /&gt;                    &lt; asp:QueryStringParameter ...&lt;br /&gt;                &lt; /SelectParameters&gt;&lt;br /&gt;            &lt; /asp:ObjectDataSource&gt;&lt;br /&gt;&lt;br /&gt;    &lt; /form&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;see ya&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-1000437505789762420?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/1000437505789762420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=1000437505789762420' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/1000437505789762420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/1000437505789762420'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/07/ajax-databind-javascript-error-unknown.html' title='Ajax Databind – javascript error “unknown runtime error”'/><author><name>Admin</name><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-4180143169669041845.post-6771639300356992031</id><published>2008-07-03T16:42:00.005+03:00</published><updated>2008-07-03T16:52:23.252+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='format'/><category scheme='http://www.blogger.com/atom/ns#' term='Date'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='string'/><title type='text'>C# convert mm/dd/yyyy string to "5 minute(s) ago"</title><content type='html'>this is how utube does it:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_w7znZm9Wi7k/SGzZXPFPC_I/AAAAAAAAGv4/SRqkUOcdGJ0/s1600-h/uTubeDate.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_w7znZm9Wi7k/SGzZXPFPC_I/AAAAAAAAGv4/SRqkUOcdGJ0/s320/uTubeDate.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5218785061424270322" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For a forum-kinda thing I wanted to (C#) convert mm/dd/yyyy string to "5 minute(s) ago" - like Youtube does.&lt;br /&gt;&lt;br /&gt;Here's how u I did it:&lt;br /&gt;(please feel free to comment, get me a better way to do this :D)&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 450px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;/// &lt; summary&gt;&lt;br /&gt;/// transform into "9 hours ago" or "8 days ago" etc ...&lt;br /&gt;/// &lt; /summary&gt;&lt;br /&gt;/// &lt; param name="makeThisNiceDateFormat"&gt;some date string ... "mm/dd/yyyy"&lt; /param&gt;&lt;br /&gt;/// &lt; returns &gt;example: "5 minute(s) ago"&lt; /returns&gt;&lt;br /&gt;public static string ConvertDateToHoursAgo(string makeThisNiceDateFormat)&lt;br /&gt;{&lt;br /&gt;if (!IsDate(makeThisNiceDateFormat))&lt;br /&gt;{&lt;br /&gt;return makeThisNiceDateFormat;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;DateTime dtOriginal = DateTime.Parse(makeThisNiceDateFormat);&lt;br /&gt;//check if we need to display minutes&lt;br /&gt;if (Math.Abs(DateDiff(DateInterval.Minute, dtOriginal, DateTime.Now)) &lt; 60)&lt;br /&gt;{&lt;br /&gt;                    if (DateDiff(DateInterval.Minute, dtOriginal, DateTime.Now) == 0)&lt;br /&gt;                    {&lt;br /&gt;                        return "just now";&lt;br /&gt;                    }&lt;br /&gt;                    return (Math.Abs(DateDiff(DateInterval.Minute, dtOriginal, DateTime.Now)) + " minute(s) ago");&lt;br /&gt;                }&lt;br /&gt;                //check if we need to display hours&lt;br /&gt;                if (Math.Abs(DateDiff(DateInterval.Hour, dtOriginal, DateTime.Now)) &lt; 24)&lt;br /&gt;                {&lt;br /&gt;                    return Math.Abs(DateDiff(DateInterval.Hour, dtOriginal, DateTime.Now)) + " hour(s) ago";&lt;br /&gt;                }&lt;br /&gt;                //check if we need to display days&lt;br /&gt;                if (Math.Abs(DateDiff(DateInterval.Day, dtOriginal, DateTime.Now)) &lt; 31)&lt;br /&gt;                {&lt;br /&gt;                    return Math.Abs(DateDiff(DateInterval.Day, dtOriginal, DateTime.Now)) + " day(s) ago";&lt;br /&gt;                }&lt;br /&gt;                //check if we need to display months&lt;br /&gt;                if (Math.Abs(DateDiff(DateInterval.Month, dtOriginal, DateTime.Now)) &lt; 12)&lt;br /&gt;                {&lt;br /&gt;                    return Math.Abs(DateDiff(DateInterval.Month, dtOriginal, DateTime.Now)) + " month(s) ago";&lt;br /&gt;                }&lt;br /&gt;                return Math.Abs(DateDiff(DateInterval.Year, dtOriginal, DateTime.Now)) + " year(s) ago";&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;thoughts?&lt;br /&gt;Note: I got an IsDate function in there which returns true/false ... in case someone tries to send me something that is not a date ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-6771639300356992031?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/6771639300356992031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=6771639300356992031' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/6771639300356992031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/6771639300356992031'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/07/c-convert-mmddyyyy-string-to-5-minutes.html' title='C# convert mm/dd/yyyy string to &quot;5 minute(s) ago&quot;'/><author><name>Admin</name><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://2.bp.blogspot.com/_w7znZm9Wi7k/SGzZXPFPC_I/AAAAAAAAGv4/SRqkUOcdGJ0/s72-c/uTubeDate.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4180143169669041845.post-5061493439765525339</id><published>2008-06-24T12:04:00.004+03:00</published><updated>2008-06-24T12:21:13.790+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nHibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>nHibernate - a thing i like</title><content type='html'>I have a table: Act, and an other table Service Name&lt;br /&gt;between them, there's an other table, that has actId and ServicenameId too ...&lt;br /&gt;&lt;br /&gt;I needed somehow for the act object to see all the servicenames. somehow ... in a list maybe? or an ilist?&lt;br /&gt;&lt;br /&gt;Here's how u do it:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 250px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt; bag name="ServiceNameList" lazy="false" table="BOMMSS_ServiceNameAct"&gt;&lt;br /&gt;   &lt; key column="TARFSS_ActId"/&gt;&lt;br /&gt;   &lt; many-to-many class="Atlas.Tariff.DataAccess.ServiceName,Atlas.Tariff.DataAccess" column="ServiceNameId"/&gt;&lt;br /&gt;  &lt; /bag&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;in the mapping file (xml), and add something like this:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 250px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;public IList ServiceNameList&lt;br /&gt;        {&lt;br /&gt;            get { return m_servicenamelist; }&lt;br /&gt;            set { m_isChanged |= (m_servicenamelist != value); m_servicenamelist = value; }&lt;br /&gt;        }&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;in the class def.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-5061493439765525339?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/5061493439765525339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=5061493439765525339' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/5061493439765525339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/5061493439765525339'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/06/nhibernate-thing-i-like.html' title='nHibernate - a thing i like'/><author><name>Admin</name><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-4180143169669041845.post-8966688203235347668</id><published>2008-06-10T16:54:00.001+03:00</published><updated>2008-06-10T16:57:35.157+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='like'/><category scheme='http://www.blogger.com/atom/ns#' term='underscore'/><title type='text'>SQL and Underscore</title><content type='html'>Recently one of our QA told me that searching for a record with _ in it, won't work.&lt;br /&gt;Actually it works, but the thing is that the '_' ( underscore ) is a reserved SQL character, and you have to know how to use it.&lt;br /&gt;&lt;br /&gt;Originally the '_' ( underscore ) was designed to:&lt;br /&gt;Let's say you want to find the word 'synopsys' in your table. But you don't if it was 'synopsys' or 'sinopsys' :)&lt;br /&gt;In this case you should do this:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 150px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;select Title from YourTable where title like 's_nopsys'&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;And this will find them both. (if any)&lt;br /&gt;&lt;br /&gt;Back to Our case.&lt;br /&gt;What our code looked like was something like this:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 150px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;select Title from YourTable where title like '%_%'&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Of course it returned everything from the table ... so QA was kinda right ... filter was not working.&lt;br /&gt;But if QA would've known to search for '[_]' ... then it would've worked ...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It is doable, of course, not to have to add the '[' and the ']' in the search box ... but ... does it worth it?&lt;br /&gt;If you can explain your 'client', how to use the '_' ( underscore ), and how to use the % sign ... in the search query ...&lt;br /&gt;well maybe you don't have to change any of your code, because your 'client' might be happy to use these extra features.&lt;br /&gt;&lt;br /&gt;If you can't talk your 'client' into this, you can try something like SQL's escape:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 150px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;select Title from YourTable where title like '%\_%' escape '\'&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;or, add some extra character, because next time they'll search for '\' :)&lt;br /&gt;so maybe do something like this:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 150px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;select Title from YourTable where title like '%' + char(13) + '_%' escape char(13)&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If you have some thoughts on this ... tell me about it ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-8966688203235347668?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/8966688203235347668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=8966688203235347668' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8966688203235347668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8966688203235347668'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/06/sql-and-underscore.html' title='SQL and Underscore'/><author><name>Admin</name><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-4180143169669041845.post-3936221684008333821</id><published>2008-06-09T10:50:00.002+03:00</published><updated>2008-06-09T10:53:56.988+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Youtube "bug" ?</title><content type='html'>Ever since the new youtube-player is in, i am experiencing this problem&lt;br /&gt;frecvently. My colleagues can see a video , I get a (youtube) link from them, and&lt;br /&gt;I can't see anything.&lt;br /&gt;&lt;br /&gt;I re-installed flash player too.&lt;br /&gt;&lt;br /&gt;If the videos are available in poor and also better quality one of them&lt;br /&gt;it loads forever and never starts, the other one has this error.&lt;br /&gt;&lt;br /&gt;Browser: ie6&lt;br /&gt;allvideos: no&lt;br /&gt;conntype: lan&lt;br /&gt;errormsg: We're sorry, this video is no longer available&lt;br /&gt;os: xp_pro&lt;br /&gt;&lt;br /&gt;I wrote youtube. They told me that "Google Web Accelerator" might be the problem. That is right ... I uninstalled ... and it works ...&lt;br /&gt;&lt;br /&gt;I thought I'd write down, maybe it'll help some1&lt;br /&gt;&lt;br /&gt;;)&lt;br /&gt;&lt;br /&gt;cheers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-3936221684008333821?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/3936221684008333821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=3936221684008333821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3936221684008333821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3936221684008333821'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/06/youtube-bug.html' title='Youtube &quot;bug&quot; ?'/><author><name>Admin</name><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-4180143169669041845.post-1257302275534809072</id><published>2008-06-06T12:43:00.009+03:00</published><updated>2008-06-06T12:56:50.105+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='export'/><category scheme='http://www.blogger.com/atom/ns#' term='insert'/><title type='text'>SQL Generate Insert script for pretty much any table ...</title><content type='html'>I am pretty proud of this code ... I made it a while ago, but still use it pretty often.&lt;br /&gt;What does it do?&lt;br /&gt;generates insert script for each row in a table ...&lt;br /&gt;Let's say you create a table, you insert some data, and you'd like to generate a script to put the table and the data in an other database ... well ... you first script your table ... and then you run: sp_GenerateInsert 'YourTableNameHere'&lt;br /&gt;&lt;br /&gt;(this is a stored procedure, and the result is only printing a string on the screen - you can run it whenever you want - won't harm your database structure OR data)&lt;br /&gt;&lt;br /&gt;and that is it !&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 400px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_GenerateInsert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)&lt;br /&gt;drop procedure [dbo].[sp_GenerateInsert]&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;SET QUOTED_IDENTIFIER ON &lt;br /&gt;GO&lt;br /&gt;SET ANSI_NULLS OFF &lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CREATE procedure sp_GenerateInsert&lt;br /&gt;@TableName varchar(50)&lt;br /&gt;as&lt;br /&gt;Begin&lt;br /&gt;&lt;br /&gt;-- Utility stored Procedure &lt;br /&gt;-- Returns the list with inserts (re-create the table with all the data)&lt;br /&gt;&lt;br /&gt;print '-- Swoosh 2004'&lt;br /&gt;print ''&lt;br /&gt;print 'SET IDENTITY_INSERT ' + @TableName + ' ON'&lt;br /&gt;print 'GO'&lt;br /&gt;print ''&lt;br /&gt;&lt;br /&gt;declare @strSQL varchar(8000)&lt;br /&gt;declare @ColumnList varchar(8000)&lt;br /&gt;declare @ColumnListInOne varchar(8000)&lt;br /&gt;declare @ColumnName varchar(8000)&lt;br /&gt;declare @ColumnType int&lt;br /&gt;declare @ID as integer&lt;br /&gt;&lt;br /&gt;select @ID = id from sysobjects where type = 'U' and name = @TableName&lt;br /&gt;set @ColumnList = ''&lt;br /&gt;set @ColumnListInOne = ''&lt;br /&gt;&lt;br /&gt;declare ccursor cursor for&lt;br /&gt; select Name, Xtype&lt;br /&gt; from syscolumns&lt;br /&gt; where id = @ID&lt;br /&gt;&lt;br /&gt;open ccursor&lt;br /&gt;fetch next from ccursor into @ColumnName, @ColumnType&lt;br /&gt;while @@FETCH_STATUS = 0&lt;br /&gt;begin&lt;br /&gt;&lt;br /&gt; Select @ColumnList = @ColumnList + @ColumnName + ', '&lt;br /&gt;&lt;br /&gt; if (@ColumnType = (select xtype from systypes where name = 'int')) or (@ColumnType = (select xtype from systypes where name = 'float'))&lt;br /&gt; begin&lt;br /&gt;  Select @ColumnListInOne = @ColumnListInOne&lt;br /&gt;  Select @ColumnListInOne = @ColumnListInOne + ' ltrim(rtrim(replace(isnull(convert(varchar(3000), ' + @ColumnName + '),''{|SWOOSH_NULL_REPLACER|}''),'''''''','''''''''''')))'&lt;br /&gt; end&lt;br /&gt; else&lt;br /&gt; begin&lt;br /&gt;  Select @ColumnListInOne = @ColumnListInOne + '''''''''' + ' + '&lt;br /&gt;  Select @ColumnListInOne = @ColumnListInOne + ' ltrim(rtrim(replace(isnull(convert(varchar(3000), ' + @ColumnName + '),''''),'''''''','''''''''''')))'&lt;br /&gt; end&lt;br /&gt;&lt;br /&gt; if (@ColumnType = (select xtype from systypes where name = 'int')) or (@ColumnType = (select xtype from systypes where name = 'float'))&lt;br /&gt; begin&lt;br /&gt;  Select @ColumnListInOne = @ColumnListInOne&lt;br /&gt; end&lt;br /&gt; else&lt;br /&gt; begin&lt;br /&gt;  Select @ColumnListInOne = @ColumnListInOne + ' + ' + ''''''''''&lt;br /&gt; end&lt;br /&gt;&lt;br /&gt; Select @ColumnListInOne = @ColumnListInOne + ' + '', '' + '&lt;br /&gt;&lt;br /&gt;fetch next from ccursor into @ColumnName, @ColumnType&lt;br /&gt;end --while @@FETCH_STATUS = 0&lt;br /&gt;close ccursor&lt;br /&gt;&lt;br /&gt;deallocate ccursor&lt;br /&gt;&lt;br /&gt;set @ColumnList = Left(@ColumnList,len(@ColumnList)-1)&lt;br /&gt;set @ColumnListInOne = Left(@ColumnListInOne,len(@ColumnListInOne)-9)&lt;br /&gt;&lt;br /&gt;set @strSQL = ''&lt;br /&gt;set @strSQL = @strSQL + ' declare @AllValues varchar(8000)'&lt;br /&gt;set @strSQL = @strSQL + ' set @AllValues  = '''''&lt;br /&gt;set @strSQL = @strSQL + ' declare ccursor cursor for '&lt;br /&gt;set @strSQL = @strSQL + '  select ' + @ColumnListInOne + ' from ' + @TableName&lt;br /&gt;set @strSQL = @strSQL + ' open ccursor '&lt;br /&gt;set @strSQL = @strSQL + ' fetch next from ccursor into @AllValues '&lt;br /&gt;set @strSQL = @strSQL + ' while @@FETCH_STATUS = 0 '&lt;br /&gt;set @strSQL = @strSQL + ' begin '&lt;br /&gt;set @strSQL = @strSQL + ' print ''insert into ' + @TableName + ' (' + @ColumnList + ') values ('' + replace(@AllValues, ''{|SWOOSH_NULL_REPLACER|}'', ''NULL'') + '')'' '&lt;br /&gt;set @strSQL = @strSQL + ' fetch next from ccursor into @AllValues '&lt;br /&gt;set @strSQL = @strSQL + ' end '&lt;br /&gt;set @strSQL = @strSQL + ' close ccursor '&lt;br /&gt;set @strSQL = @strSQL + ' deallocate ccursor '&lt;br /&gt;exec (@strSQL )&lt;br /&gt;&lt;br /&gt;print ''&lt;br /&gt;print 'SET IDENTITY_INSERT ' + @TableName + ' OFF'&lt;br /&gt;print 'GO'&lt;br /&gt;&lt;br /&gt;End&lt;br /&gt;GO&lt;br /&gt;SET QUOTED_IDENTIFIER OFF &lt;br /&gt;GO&lt;br /&gt;SET ANSI_NULLS ON &lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Have fun with it ...&lt;br /&gt;and if you come up with some cool "extension" / "upgrade" to it ... tell me about it ;)&lt;br /&gt;p.s. there is an other version, that doesn't include the first column (generates the insert script without the Identity column ... which is also usable ...)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-1257302275534809072?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/1257302275534809072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=1257302275534809072' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/1257302275534809072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/1257302275534809072'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/06/sql-generate-insert-script-for-pretty.html' title='SQL Generate Insert script for pretty much any table ...'/><author><name>Admin</name><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-4180143169669041845.post-9070573055432659922</id><published>2008-06-05T17:08:00.003+03:00</published><updated>2008-06-05T17:11:26.034+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='question'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Google Analytics</title><content type='html'>Google Analytics - This is a screenshot:&lt;br /&gt;(site traffic for one of my sites)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_w7znZm9Wi7k/SEfzjWa7gII/AAAAAAAAGqw/reAMHSgBkbg/s1600-h/2008-06-05_170710.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_w7znZm9Wi7k/SEfzjWa7gII/AAAAAAAAGqw/reAMHSgBkbg/s320/2008-06-05_170710.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5208399282716770434" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Question ...&lt;br /&gt;Can anyone pls tell me what is "other" ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-9070573055432659922?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/9070573055432659922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=9070573055432659922' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/9070573055432659922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/9070573055432659922'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/06/google-analytics.html' title='Google Analytics'/><author><name>Admin</name><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://2.bp.blogspot.com/_w7znZm9Wi7k/SEfzjWa7gII/AAAAAAAAGqw/reAMHSgBkbg/s72-c/2008-06-05_170710.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4180143169669041845.post-2860021196730666799</id><published>2008-06-05T12:43:00.001+03:00</published><updated>2008-06-05T12:48:20.890+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nHibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Active Record'/><title type='text'>nHibernate vs. Active Record</title><content type='html'>I have used nHibernate in 3 projects&lt;br /&gt;&lt;br /&gt;read more on it &lt;a href="http://www.hibernate.org/362.html" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://www.hibernate.org/366.html" target="_blank"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I didn't like it because of the XML stuff.&lt;br /&gt;&lt;br /&gt;next time i'll use Active Record (read more about that &lt;a href="http://www.castleproject.org/activerecord/index.html" target="_blank"&gt;here&lt;/a&gt;), to see how that behaves, maybe i'll post something new afterwards ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-2860021196730666799?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/2860021196730666799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=2860021196730666799' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/2860021196730666799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/2860021196730666799'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/06/nhibernate-vs-active-record.html' title='nHibernate vs. Active Record'/><author><name>Admin</name><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-4180143169669041845.post-7117176413226623005</id><published>2008-05-23T15:20:00.001+03:00</published><updated>2008-05-23T15:27:27.045+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code review'/><title type='text'>Code review</title><content type='html'>I just had to code review a project i have never seen before.&lt;br /&gt;The result has to be a Word document, it's nice if it is not only one page :)&lt;br /&gt;&lt;br /&gt;I copy - pasted a checklist from an other document, with questions like:&lt;br /&gt;"Is the code easy to read easy to understand?"&lt;br /&gt;"Is the code properly commented?"&lt;br /&gt;etc.&lt;br /&gt;etc.&lt;br /&gt;&lt;br /&gt;Then I tried to find stuff that I didn't consider ok to be there.&lt;br /&gt;I found a few stuff ... code (variables, functions) that was declared over and over again, instead of using one public instance.&lt;br /&gt;Yeah. I know. And it is boring too.&lt;br /&gt;&lt;br /&gt;Have you ever done anything like this before?&lt;br /&gt;Do you have any ideas how to make something like this?&lt;br /&gt;&lt;br /&gt;Basically the main idea is this:&lt;br /&gt;The client would like to have an "outsider"-s review of the code (because of course the ones that are building the project - they think it's perfect).&lt;br /&gt;The client will probably not understand a thing of it, but it will probably have a clue about what's what.&lt;br /&gt;&lt;br /&gt;Tell me if you have something like a checklist, or a list with common mistakes.&lt;br /&gt;I'd like to see new things sometimes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-7117176413226623005?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/7117176413226623005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=7117176413226623005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/7117176413226623005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/7117176413226623005'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/05/code-review.html' title='Code review'/><author><name>Admin</name><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-4180143169669041845.post-4494098820021638980</id><published>2008-04-21T13:47:00.002+03:00</published><updated>2008-04-21T13:48:47.527+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Management Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='2005'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>SQL server 2005 - generate scripts. Can i do this faster?</title><content type='html'>i am preparing scripts from DEV server, to an other environment.&lt;br /&gt;step 1. script all the objects (drop script)&lt;br /&gt;- 1.1. right click on tasks &gt; select "Generate script"&lt;br /&gt;- 1.2. select database click next&lt;br /&gt;- 1.3. script behaviour: "Generate DROP statements only." also select&lt;br /&gt;false for all the table/view options from bottom side, click Next&lt;br /&gt;- 1.4. select stored procedures, user defined functions, views (this&lt;br /&gt;way i won't forget any of them ... might have been modified by other&lt;br /&gt;developer). click next&lt;br /&gt;- 1.5. click "Select All", then Next (sps)&lt;br /&gt;- 1.6. click "Select All", then Next (func)&lt;br /&gt;- 1.7. click "Select All", then Next (views)&lt;br /&gt;- 1.8. select script to file (any other option would be ok), change&lt;br /&gt;file name to "drop scripts.sql" ? (doesn't matter) and click next&lt;br /&gt;- 1.9. click finish&lt;br /&gt;- 1.10 WAIT a LOT :)&lt;br /&gt;then comes step 2 (2.1 - 2.10) with the only difference that at step&lt;br /&gt;2.3. i'll select "Generate CREATE statements only."&lt;br /&gt;&lt;br /&gt;i'll have 2 scripts.&lt;br /&gt;in sql 2000 it was easier.&lt;br /&gt;&lt;br /&gt;and now, the question:&lt;br /&gt;can i make this somehow faster?&lt;br /&gt;is there a script I could run and have the same result ...&lt;br /&gt;or is there at least a way to have drop AND create-s generate all in&lt;br /&gt;the same time?&lt;br /&gt;&lt;br /&gt;I'll post an answer when i find a good one.&lt;br /&gt;&lt;br /&gt;If you can help, just comment here pls.&lt;br /&gt;&lt;br /&gt;Thanks&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-4494098820021638980?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/4494098820021638980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=4494098820021638980' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/4494098820021638980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/4494098820021638980'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/04/sql-server-2005-generate-scripts-can-i.html' title='SQL server 2005 - generate scripts. Can i do this faster?'/><author><name>Admin</name><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-4180143169669041845.post-8906174999019983984</id><published>2008-04-16T11:27:00.000+03:00</published><updated>2008-04-16T11:29:45.355+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GridView'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Column'/><title type='text'>GridView Id column</title><content type='html'>If I make a "BoundColumn" for the Id, with visible - false, I can't get the Id ...&lt;br /&gt;&lt;br /&gt;This one works:&lt;br /&gt;(rowdatabound)&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 140px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:800px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;e.Row.Cells["mycolumn"].Style.Add("display", "none");&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;this way the Id is still there, you just cannot see it...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-8906174999019983984?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/8906174999019983984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=8906174999019983984' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8906174999019983984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/8906174999019983984'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/04/gridview-id-column.html' title='GridView Id column'/><author><name>Admin</name><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-4180143169669041845.post-6106176868405629221</id><published>2008-04-16T11:15:00.014+03:00</published><updated>2008-04-17T17:24:43.422+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='AjaxControlToolkit'/><category scheme='http://www.blogger.com/atom/ns#' term='GridView'/><category scheme='http://www.blogger.com/atom/ns#' term='PageCount'/><title type='text'>Gridview rowcount from Js</title><content type='html'>I needed to get some rowcont in a Js variable, to have a google-like "select all" (all from all pages) button, that i didn't want to show up if there is only one page in my gridview.&lt;br /&gt;&lt;br /&gt;Radu helped me out with this idea:&lt;br /&gt;(I am using this on rowDataBound, because I didn't want to use an other event, I already had this one ...)&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 140px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;div style="width:2000px;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;ScriptManager.RegisterClientScriptBlock(grvAgentCommissionFeePercentage, this.GetType(), "ScriptIDAndTicksForRefreshnumber" + DateTime.Now.Ticks.ToString(), "multiplePages = " + grvAgentCommissionFeePercentage.PageCount.ToString() + ";", true);&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;if you need the whole nine yards, just comment ... i'll get back to you&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-6106176868405629221?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/6106176868405629221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=6106176868405629221' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/6106176868405629221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/6106176868405629221'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/04/gridview-rowcount-from-js.html' title='Gridview rowcount from Js'/><author><name>Admin</name><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-4180143169669041845.post-5118111652543178771</id><published>2008-04-10T11:15:00.003+03:00</published><updated>2008-04-10T11:17:03.627+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='funny'/><title type='text'>Programming Languages and their Celebrity Equivalents</title><content type='html'>I found this "article" and i think it is very funny&lt;br /&gt;:)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.brandnoo.com/2008/04/07/programming-languages-and-their-celebrity-equivalents/"&gt;click here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-5118111652543178771?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/5118111652543178771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=5118111652543178771' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/5118111652543178771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/5118111652543178771'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/04/programming-languages-and-their.html' title='Programming Languages and their Celebrity Equivalents'/><author><name>Admin</name><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-4180143169669041845.post-3131707244336812877</id><published>2008-04-04T16:31:00.000+03:00</published><updated>2008-04-04T16:33:51.231+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AjaxControlToolkit'/><category scheme='http://www.blogger.com/atom/ns#' term='error'/><category scheme='http://www.blogger.com/atom/ns#' term='could not load'/><title type='text'>Could not load file or assembly AjaxControlToolkit</title><content type='html'>I had this error today, after I installed my app on a server (wix installer btw)&lt;br /&gt;&lt;br /&gt;what did i do?&lt;br /&gt;googled :)&lt;br /&gt;and then ...&lt;br /&gt;&lt;br /&gt;delete all the data from &lt;br /&gt;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\"my prj"\&lt;br /&gt;&lt;br /&gt;and reinstalled the app&lt;br /&gt;&lt;br /&gt;it worked&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-3131707244336812877?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/3131707244336812877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=3131707244336812877' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3131707244336812877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3131707244336812877'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/04/could-not-load-file-or-assembly.html' title='Could not load file or assembly AjaxControlToolkit'/><author><name>Admin</name><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-4180143169669041845.post-5590893021918741835</id><published>2008-04-03T13:18:00.005+03:00</published><updated>2008-04-03T13:23:17.408+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='properties'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><title type='text'>Javascript - properties for any HTML object</title><content type='html'>Sometimes you need to see what properties can you use for any given object.&lt;br /&gt;Just copy-paste this:&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 175px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;var stuff = '';&lt;br /&gt;for (p in document.Form1.elements)&lt;br /&gt;stuff = stuff + ' ' + p;&lt;br /&gt;alert(stuff);&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;( ... and replace the document.form1.elements with anything you'd like. For example document.body, or document.getElementById("someTDfromYourTable"), etc. ...)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4180143169669041845-5590893021918741835?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/5590893021918741835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=5590893021918741835' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/5590893021918741835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/5590893021918741835'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/04/javascript-properties-for-any-html.html' title='Javascript - properties for any HTML object'/><author><name>Admin</name><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-4180143169669041845.post-4299633373690836101</id><published>2008-04-03T12:08:00.003+03:00</published><updated>2008-04-03T13:23:49.090+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='try-catch'/><title type='text'>Try-catch in SQL</title><content type='html'>Ever wanted Try-catch in SQL?&lt;br /&gt;Here's your chance!&lt;br /&gt;2005 only&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 250px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;BEGIN TRY&lt;br /&gt;   SELECT convert(smallint, '2003121')&lt;br /&gt;END TRY&lt;br /&gt;BEGIN CATCH&lt;br /&gt;   select 'errno: ' + ltrim(str(error_number()))&lt;br /&gt;   select 'errmsg:  ' + error_message()&lt;br /&gt;END CATCH&lt;br /&gt;&lt;/font&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/4180143169669041845-4299633373690836101?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/4299633373690836101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=4299633373690836101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/4299633373690836101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/4299633373690836101'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/04/try-catch-in-sql.html' title='Try-catch in SQL'/><author><name>Admin</name><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-4180143169669041845.post-3232679928490805411</id><published>2008-04-03T10:59:00.002+03:00</published><updated>2008-04-03T13:24:11.874+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='cursor'/><title type='text'>SQL Cursor Sample</title><content type='html'>I need this piece of code pretty often&lt;br /&gt;A clean, almost empty, sql cursor example&lt;br /&gt;Would be a lot better if you'd have a query, select it, right click, and "surround with: cursor" :)&lt;br /&gt;But cannot be done just yet&lt;br /&gt;&lt;br /&gt;&lt;div id="div2" style="overflow-y: auto; overflow-x: scroll;height: 450px; width:410px; background-color:Beige;"&gt;&lt;br /&gt;&lt;font style="font-family:Courier New; font-size:small;"&gt;&lt;br /&gt;DECLARE @CPilot INT&lt;br /&gt;&lt;br /&gt;DECLARE cursorServProvDefServ CURSOR FOR&lt;br /&gt; SELECT Company&lt;br /&gt; FROM Company&lt;br /&gt;&lt;br /&gt;OPEN cursorServProvDefServ&lt;br /&gt;FETCH NEXT FROM cursorServProvDefServ INTO @CPilot&lt;br /&gt;WHILE @@FETCH_STATUS = 0&lt;br /&gt;BEGIN&lt;br /&gt;&lt;br /&gt; PRINT @CPilot&lt;br /&gt;&lt;br /&gt;FETCH NEXT FROM cursorServProvDefServ INTO @CPilot&lt;br /&gt;END --while @@FETCH_STATUS = 0&lt;br /&gt;CLOSE cursorServProvDefServ&lt;br /&gt;&lt;br /&gt;DEALLOCATE cursorServProvDefServ&lt;br /&gt;&lt;/font&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/4180143169669041845-3232679928490805411?l=swooshcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swooshcode.blogspot.com/feeds/3232679928490805411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4180143169669041845&amp;postID=3232679928490805411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3232679928490805411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4180143169669041845/posts/default/3232679928490805411'/><link rel='alternate' type='text/html' href='http://swooshcode.blogspot.com/2008/04/test.html' title='SQL Cursor Sample'/><author><name>Admin</name><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>
