<?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-1747922403984523201</id><updated>2012-02-10T15:13:17.933-08:00</updated><category term='Visual studio Test to NUnit'/><category term='Automatic Loging in Webpage without clicking Login button'/><category term='How to write a StoreProc with &quot;Where in&quot; clause'/><category term='.chm files Page cannot be displayed'/><category term='Null == Null'/><category term='method'/><category term='How to Download a report without opening the report viewer-Sql Server Reporting 2005'/><category term='Deserializing XML to object'/><category term='SQL Server Reporting in 5 minutes'/><category term='Adding a column to DataSet at any position'/><category term='Foxy Proxy BBC iVideo Hack'/><category term='Inline code %# is not working in Telerik RadToolBar radtoolbarbutton item NavigateURL'/><category term='Deserialize XML with Namespace'/><category term='An object reference is required for the non-static field'/><category term='Visual Studio Test Debugger'/><category term='DataTable to XML and XML to DataTable'/><category term='LtrimRtrim'/><category term='Reflector and Viewstate Decoder'/><category term='COM object in C#.NET and Object Instantiating'/><category term='using statement in .net'/><category term='Programatically writing XML Values and Retrieving it'/><category term='Could not open a connection to SQL Server'/><category term='RadtreeView'/><category term='Using Telerik without installing'/><category term='How to get the Ip address of the client'/><category term='Function to return start of the week'/><category term='Find the Column Name in a Table'/><category term='HowTo Post Codes in blog'/><category term='or property'/><title type='text'>Here You Go!!!!!!</title><subtitle type='html'>"Do this Code" or "Dot his code" or "Dothis Code"</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>WinBros</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>36</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1747922403984523201.post-156804589873831374</id><published>2012-02-10T15:10:00.000-08:00</published><updated>2012-02-10T15:13:17.997-08:00</updated><title type='text'>To check column name in a database</title><content type='html'>If you know column name but to find out which table has that&lt;br /&gt;Do this:&lt;br /&gt;Select Name from sysobjects where id in (select id from syscolumns where name like '%userid%')&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-156804589873831374?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/156804589873831374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2012/02/to-check-column-name-in-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/156804589873831374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/156804589873831374'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2012/02/to-check-column-name-in-database.html' title='To check column name in a database'/><author><name>WinBros</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-1747922403984523201.post-6169690642343637544</id><published>2011-05-11T20:53:00.000-07:00</published><updated>2011-05-13T13:33:31.867-07:00</updated><title type='text'>Telerik Error Creating Control</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 14px; line-height: 19px; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span class="Apple-style-span" &gt;Error Creating Control ....&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 14px; line-height: 19px; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span class="Apple-style-span" &gt;PublicKeyToken=121fae78165ba3d4'&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 14px; line-height: 19px; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;On visual studio if you are not able to view the Telerik controls and if it shows the above follow these steps&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1) Copy Telerik.Web.design.dll to the Bin folder of your application. No need to add a reference to the web application just copy it.&lt;/div&gt;&lt;div&gt;2) Search ProjectAssemblies folder under C:\Documents and settings\&lt;username&gt;\ and &lt;b&gt;delete&lt;/b&gt; the folder or If Vista or Win7 search it under c:\Users\&lt;username&gt;&lt;/username&gt;&lt;/username&gt;&lt;/div&gt;&lt;div&gt;3) Restart Visual studio&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-6169690642343637544?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/6169690642343637544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2011/05/telerik-error-creating-control.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/6169690642343637544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/6169690642343637544'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2011/05/telerik-error-creating-control.html' title='Telerik Error Creating Control'/><author><name>WinBros</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-1747922403984523201.post-2732794587133015411</id><published>2011-02-24T07:13:00.000-08:00</published><updated>2011-02-24T07:35:04.225-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RadtreeView'/><title type='text'>RadtreeView Nodes Font size Font size increases when Expanding</title><content type='html'>When you click on the expand button to view the child nodes the font of the child nodes are increased for each node. And you dont want to display in the increasing order and everythign should be in xx-small,&lt;br /&gt;Ex:&lt;br /&gt;&lt;span style="font-size:78%;"&gt;Root(xx-small)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;- Child1(x-small)&lt;/span&gt;&lt;br /&gt;-Child1-1(Small)&lt;br /&gt;&lt;span style="font-size:130%;"&gt;- child1-1-1(Medium)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;&lt; style="FONT-SIZE: xx-small"&gt;&lt;br /&gt;&lt; id="rtvTreeView" runat="server" checkboxes="true" size="XX-Small" onnodeexpand="rtvTreeView_NodeExpand" enabledraganddrop="True" enabledraganddropbetweennodes="True" onnodedrop="rtvTreeView_NodeDrop"&gt;&lt;br /&gt;&lt; type="InQuint" duration="100"&gt;&lt; /collapseanimation&gt;&lt;br /&gt;&lt; type="None" duration="100"&gt;&lt; /expandanimation&gt;&lt;br /&gt;&lt; /telerik:radtreeview&gt;&lt;br /&gt;&lt; /div&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Even if you give the Font-size XX-small in div or inside the telerik :radtreeview tag it wont take it.So assignt the Font size before binding to the each node.&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;Telerik.Web.UI.RadTreeNode subnode = new Telerik.Web.UI.RadTreeNode(fullname, userid.ToString());&lt;br /&gt;                subnode.Attributes.Add("nodetype", "user");&lt;br /&gt;                subnode.ExpandMode = Telerik.Web.UI.TreeNodeExpandMode.ServerSideCallBack;&lt;br /&gt;                subnode.Checkable = false;&lt;br /&gt;                subnode.Font.Size= FontUnit.xx-small;&lt;br /&gt;                parentnode.Nodes.Add(subnode);&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-2732794587133015411?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/2732794587133015411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2011/02/radtreeview-nodes-font-size-font-size.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/2732794587133015411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/2732794587133015411'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2011/02/radtreeview-nodes-font-size-font-size.html' title='RadtreeView Nodes Font size Font size increases when Expanding'/><author><name>WinBros</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-1747922403984523201.post-1522776461849114543</id><published>2010-10-11T14:30:00.000-07:00</published><updated>2010-10-11T14:37:18.023-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LtrimRtrim'/><title type='text'>Ltrim Rtrim not working</title><content type='html'>In Sql server when you find ltrim and rtrim is not working.Then it must be some ascii characters added to it.&lt;br /&gt;You can find the ascii characters&lt;br /&gt;&lt;br /&gt;DECLARE @Val VARCHAR(50)&lt;br /&gt;DECLARE @i INT&lt;br /&gt;&lt;br /&gt;SET @Val = 'Pastehere   '&lt;br /&gt;SET @i = 0&lt;br /&gt;&lt;br /&gt;WHILE @i &lt;= DATALENGTH(@Val)&lt;br /&gt;BEGIN&lt;br /&gt; PRINT SUBSTRING(@Val, @i, 1) + ' : ' + CAST(ASCII(SUBSTRING(@Val, @i, 1)) AS VARCHAR(3))&lt;br /&gt; SET @i = @i + 1&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;Once you find the ascii characters replace it with space '' or char(32)&lt;br /&gt;update REPLACE(City,CHAR(160),''),City from tblAddress where id=140&lt;br /&gt;Then&lt;br /&gt;Trim it&lt;br /&gt;update ltrim(rtrim(City))from tblAddress where id=140&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-1522776461849114543?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/1522776461849114543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2010/10/ltrim-rtrim-not-working.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/1522776461849114543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/1522776461849114543'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2010/10/ltrim-rtrim-not-working.html' title='Ltrim Rtrim not working'/><author><name>WinBros</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-1747922403984523201.post-6725261306327192348</id><published>2010-05-10T14:35:00.000-07:00</published><updated>2010-05-10T14:46:28.941-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='How to Download a report without opening the report viewer-Sql Server Reporting 2005'/><title type='text'>How to Download a report without opening the report viewer-Sql Server Reporting 2005</title><content type='html'>If you are displaying your reports in aspx page&lt;br /&gt;you should know the following&lt;br /&gt;1) Report Server name&lt;br /&gt;2) Report Path&lt;br /&gt;3) Report Name&lt;br /&gt;4) Parameters&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;&amp;lt;a href="http://reportservername/ReportsServer?folder%20name/reportname/rs:Command=Renderrs:format=EXCELparameter=parametervalue"&amp;gt;Download&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-6725261306327192348?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/6725261306327192348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2010/05/how-to-download-report-without-opening.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/6725261306327192348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/6725261306327192348'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2010/05/how-to-download-report-without-opening.html' title='How to Download a report without opening the report viewer-Sql Server Reporting 2005'/><author><name>WinBros</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-1747922403984523201.post-2753280492692148715</id><published>2010-03-05T12:50:00.001-08:00</published><updated>2010-03-05T13:02:46.544-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Function to return start of the week'/><title type='text'>Function to return start of the week</title><content type='html'>You might wonder how to get the start of the week.&lt;br /&gt;You have a datetime column value and you want to get get the start week of that date&lt;br /&gt;Say for e.g:&lt;br /&gt;today is march 5th 2010 and the week starts from 1st of march 2010 which is Monday&lt;br /&gt;In order to do that create one function and call this function in your store procedure&lt;br /&gt;code&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;SET ANSI_NULLS ON&lt;br /&gt;GO&lt;br /&gt;SET QUOTED_IDENTIFIER ON&lt;br /&gt;GO&lt;br /&gt;create FUNCTION [dbo].[fn_startweek]&lt;br /&gt;(@REPORT_DATE DATETIME)&lt;br /&gt;RETURNS varchar(30)&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;DECLARE @WEEK_BEGINING VARCHAR(10)&lt;br /&gt;&lt;br /&gt;DECLARE @WEEK_START_DATE DATETIME, @WEEK_END_DATE DATETIME&lt;br /&gt;--GET THE WEEK START DATE&lt;br /&gt;SELECT  @WEEK_START_DATE = @REPORT_DATE - (DATEPART(DW,  @REPORT_DATE) - 1)&lt;br /&gt;&lt;br /&gt;--GET THE WEEK END DATE&lt;br /&gt;SELECT  @WEEK_END_DATE = @REPORT_DATE + (7 - DATEPART(DW,  @REPORT_DATE))&lt;br /&gt;&lt;br /&gt;return CONVERT(VARCHAR, @WEEK_START_DATE,101)&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;To call this function:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;select dbo.fn_startweek ('2010-03-05 14:51:47.840')  //pass the datetime value or a.datecolumnStartdate&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-2753280492692148715?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/2753280492692148715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2010/03/function-to-return-start-of-week.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/2753280492692148715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/2753280492692148715'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2010/03/function-to-return-start-of-week.html' title='Function to return start of the week'/><author><name>WinBros</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-1747922403984523201.post-3876066444562711322</id><published>2010-01-11T10:19:00.000-08:00</published><updated>2010-01-11T10:22:32.540-08:00</updated><title type='text'>Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)</title><content type='html'>If you have a Creative &lt;span id="ctl00_PHmCenterNav__2149302_lProductName"&gt;WebCam Vista webcamera and you come across this error message&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="ctl00_PHmCenterNav__2149302_lProductName"&gt;"Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)"&lt;/span&gt;&lt;br /&gt;&lt;p&gt;Delete the UpperFilters and LowerFilters registry values, follow these steps:&lt;/p&gt;&lt;p&gt;1. Start Registry Editor (Regedit.exe).&lt;br /&gt;START &gt; RUN &gt; (Type) REGEDIT (and hit ENTER)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;2. Locate the UpperFilters and LowerFilters value under the following key in the registry&lt;br /&gt; HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contr&lt;wbr&gt;ol\Class\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}&lt;/p&gt;&lt;p&gt;3. On the Edit menu, click Delete, and then click OK.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Goto Device  Manager in Windows XP &gt; IMAGING DEVICES &gt; CREATIVE WEBCAM LIVE! ULTRA then right mouseclick and chose DISABLE.Right mouse click again and chose ENABLE.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;It will work and it worked for my friend.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-3876066444562711322?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/3876066444562711322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2010/01/windows-cannot-load-device-driver-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/3876066444562711322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/3876066444562711322'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2010/01/windows-cannot-load-device-driver-for.html' title='Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)'/><author><name>WinBros</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-1747922403984523201.post-4286551676846745674</id><published>2010-01-05T08:54:00.000-08:00</published><updated>2010-01-05T08:58:11.537-08:00</updated><title type='text'>How to find the .Net version Programatically</title><content type='html'>You might come across how to find the .Net version programatically.&lt;br /&gt;&lt;br /&gt;You can find it by :&lt;br /&gt;&lt;br /&gt;&lt;span dir="ltr" id=":28x"&gt;Response.Write(&lt;wbr&gt;Environment.Ver&lt;wbr&gt;sion.ToString)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-4286551676846745674?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/4286551676846745674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2010/01/how-to-find-net-version-programatically.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/4286551676846745674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/4286551676846745674'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2010/01/how-to-find-net-version-programatically.html' title='How to find the .Net version Programatically'/><author><name>WinBros</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-1747922403984523201.post-76106276094422964</id><published>2009-12-28T13:43:00.000-08:00</published><updated>2009-12-28T13:49:43.912-08:00</updated><title type='text'>Adding date to filename in report subscription</title><content type='html'>In report Subscription,i.e sending the report as an email at specific time or uploading the report file in ftp server,you might add custom filename or Custom subject in an email.&lt;br /&gt;Like ReportName executed on 1-1-2010&lt;br /&gt;    reportName1-1-2010.xls&lt;br /&gt;&lt;br /&gt;In order to achieve this you can add @timestamp next to the Filename&lt;br /&gt;&lt;table class="msrs-contentFrame" width="100%" cellpadding="0" cellspacing="0" height="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;span&gt;&lt;/span&gt;&lt;td valign="top" width="10"&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="10" height="0" /&gt;&lt;/td&gt;     &lt;td valign="top" height="100%"&gt;&lt;span&gt;&lt;script language="Javascript" type="text/Javascript"&gt;function ControlConditionalEnable4(topLevelEnable) {if (document.getElementById('ui_rdoOnSharedSchedule') != null) if (document.getElementById('ui_rdoOnSharedSchedule').checked == true) {ControlConditionalEnable2(topLevelEnable);} else {ControlConditionalEnable2(false);}}&lt;/script&gt;&lt;input name="ui_hiddenScheduleXml" id="ui_hiddenScheduleXml" value="&amp;lt;ScheduleDefinition xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&amp;gt;&amp;lt;StartDateTime xmlns=&amp;quot;http://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices&amp;quot;&amp;gt;2009-12-28T16:00:00.000-06:00&amp;lt;/StartDateTime&amp;gt;&amp;lt;WeeklyRecurrence xmlns=&amp;quot;http://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices&amp;quot;&amp;gt;&amp;lt;WeeksInterval&amp;gt;1&amp;lt;/WeeksInterval&amp;gt;&amp;lt;DaysOfWeek&amp;gt;&amp;lt;Sunday&amp;gt;true&amp;lt;/Sunday&amp;gt;&amp;lt;Monday&amp;gt;true&amp;lt;/Monday&amp;gt;&amp;lt;Tuesday&amp;gt;true&amp;lt;/Tuesday&amp;gt;&amp;lt;Wednesday&amp;gt;true&amp;lt;/Wednesday&amp;gt;&amp;lt;Thursday&amp;gt;true&amp;lt;/Thursday&amp;gt;&amp;lt;Friday&amp;gt;true&amp;lt;/Friday&amp;gt;&amp;lt;Saturday&amp;gt;true&amp;lt;/Saturday&amp;gt;&amp;lt;/DaysOfWeek&amp;gt;&amp;lt;/WeeklyRecurrence&amp;gt;&amp;lt;/ScheduleDefinition&amp;gt;" type="hidden"&gt;&lt;table class="msrs-normal" width="100%" height="100%"&gt;      &lt;tbody&gt;&lt;tr&gt;       &lt;td valign="top"&gt;&lt;table class="msrs-normal" width="100%" cellpadding="0" cellspacing="0"&gt;        &lt;tbody&gt;&lt;tr&gt;         &lt;td valign="top"&gt;&lt;br /&gt;&lt;/td&gt;        &lt;/tr&gt;       &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;      &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;&lt;table style="width: 664px; height: 82px;" class="msrs-normal"&gt;        &lt;tbody&gt;&lt;tr&gt;         &lt;td colspan="4" valign="top"&gt;&lt;span&gt;&lt;table class="msrs-normal" width="100%" cellpadding="0" cellspacing="0"&gt;          &lt;tbody&gt;&lt;tr&gt;           &lt;td valign="top"&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="1" border="0" height="8" /&gt;&lt;/td&gt;          &lt;/tr&gt;          &lt;tr&gt;           &lt;td class="msrs-rptSectionHead" valign="middle" nowrap="nowrap"&gt;Report Delivery Options&lt;/td&gt;           &lt;td valign="top" width="5"&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="5" height="0" /&gt;&lt;/td&gt;           &lt;td valign="middle" width="100%"&gt;&lt;table class="msrs-normal" width="100%" cellpadding="0" cellspacing="0"&gt;            &lt;tbody&gt;&lt;tr&gt;             &lt;td colspan="2" class="msrs-sectionline" valign="top"&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="1" border="0" height="1" /&gt;&lt;/td&gt;            &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;           &lt;/td&gt;          &lt;/tr&gt;          &lt;tr&gt;           &lt;td valign="top"&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="1" border="0" height="4" /&gt;&lt;/td&gt;          &lt;/tr&gt;         &lt;/tbody&gt;&lt;/table&gt;         &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;         &lt;td colspan="3" valign="top"&gt;&lt;span&gt;Specify options for report delivery.&lt;/span&gt;&lt;/td&gt;         &lt;td valign="top" width="100%"&gt;&lt;br /&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="middle" nowrap="nowrap"&gt;&lt;span&gt;Delivered by:&lt;/span&gt;&lt;/td&gt;         &lt;td valign="top" width="5"&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="5" height="0" /&gt;&lt;/td&gt;         &lt;td valign="top" width="100%"&gt;&lt;select name="ui_dropdownDeliveryProvider" onchange="javascript:setTimeout('__doPostBack(\'ui_dropdownDeliveryProvider\',\'\')', 0)" id="ui_dropdownDeliveryProvider" class="msrs-dropdowns"&gt;          &lt;option value="Report Server Email"&gt;E-Mail&lt;/option&gt;          &lt;option selected="selected" value="Report Server FileShare"&gt;Windows File Share&lt;/option&gt;          &lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Filename :reportName@timeshare&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If it is in Subject of the email then you have to update here&lt;br /&gt;&lt;table class="msrs-contentFrame" width="100%" cellpadding="0" cellspacing="0" height="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;span&gt;&lt;/span&gt;&lt;td valign="top" width="10"&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="10" height="0" /&gt;&lt;/td&gt;     &lt;td valign="top" height="100%"&gt;&lt;span&gt;&lt;script language="Javascript" type="text/Javascript"&gt;function ControlConditionalEnable4(topLevelEnable) {if (document.getElementById('ui_rdoOnSharedSchedule') != null) if (document.getElementById('ui_rdoOnSharedSchedule').checked == true) {ControlConditionalEnable2(topLevelEnable);} else {ControlConditionalEnable2(false);}}&lt;/script&gt;&lt;input name="ui_hiddenScheduleXml" id="ui_hiddenScheduleXml" value="&amp;lt;ScheduleDefinition xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&amp;gt;&amp;lt;StartDateTime xmlns=&amp;quot;http://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices&amp;quot;&amp;gt;2009-12-21T14:59:00.000-06:00&amp;lt;/StartDateTime&amp;gt;&amp;lt;WeeklyRecurrence xmlns=&amp;quot;http://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices&amp;quot;&amp;gt;&amp;lt;WeeksInterval&amp;gt;1&amp;lt;/WeeksInterval&amp;gt;&amp;lt;DaysOfWeek&amp;gt;&amp;lt;Sunday&amp;gt;true&amp;lt;/Sunday&amp;gt;&amp;lt;Monday&amp;gt;true&amp;lt;/Monday&amp;gt;&amp;lt;Tuesday&amp;gt;true&amp;lt;/Tuesday&amp;gt;&amp;lt;Wednesday&amp;gt;true&amp;lt;/Wednesday&amp;gt;&amp;lt;Thursday&amp;gt;true&amp;lt;/Thursday&amp;gt;&amp;lt;Friday&amp;gt;true&amp;lt;/Friday&amp;gt;&amp;lt;Saturday&amp;gt;true&amp;lt;/Saturday&amp;gt;&amp;lt;/DaysOfWeek&amp;gt;&amp;lt;/WeeklyRecurrence&amp;gt;&amp;lt;/ScheduleDefinition&amp;gt;" type="hidden"&gt;&lt;table class="msrs-normal" width="100%" height="100%"&gt;      &lt;tbody&gt;&lt;tr&gt;       &lt;td valign="top"&gt;&lt;table class="msrs-normal" width="100%" cellpadding="0" cellspacing="0"&gt;        &lt;tbody&gt;&lt;tr&gt;         &lt;td valign="top"&gt;&lt;br /&gt;&lt;/td&gt;        &lt;/tr&gt;       &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;      &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;&lt;table class="msrs-normal" width="100%"&gt;        &lt;tbody&gt;&lt;tr&gt;         &lt;td colspan="4" valign="top"&gt;&lt;span&gt;&lt;table class="msrs-normal" width="100%" cellpadding="0" cellspacing="0"&gt;          &lt;tbody&gt;&lt;tr&gt;           &lt;td valign="top"&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="1" border="0" height="8" /&gt;&lt;/td&gt;          &lt;/tr&gt;          &lt;tr&gt;           &lt;td class="msrs-rptSectionHead" valign="middle" nowrap="nowrap"&gt;Report Delivery Options&lt;/td&gt;           &lt;td valign="top" width="5"&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="5" height="0" /&gt;&lt;/td&gt;           &lt;td valign="middle" width="100%"&gt;&lt;table class="msrs-normal" width="100%" cellpadding="0" cellspacing="0"&gt;            &lt;tbody&gt;&lt;tr&gt;             &lt;td colspan="2" class="msrs-sectionline" valign="top"&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="1" border="0" height="1" /&gt;&lt;/td&gt;            &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;           &lt;/td&gt;          &lt;/tr&gt;          &lt;tr&gt;           &lt;td valign="top"&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="1" border="0" height="4" /&gt;&lt;/td&gt;          &lt;/tr&gt;         &lt;/tbody&gt;&lt;/table&gt;         &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;         &lt;td colspan="3" valign="top"&gt;&lt;span&gt;Specify options for report delivery.&lt;/span&gt;&lt;/td&gt;         &lt;td valign="top" width="100%"&gt;&lt;br /&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="middle" nowrap="nowrap"&gt;&lt;span&gt;Delivered by:&lt;/span&gt;&lt;/td&gt;         &lt;td valign="top" width="5"&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="5" height="0" /&gt;&lt;/td&gt;         &lt;td valign="top" width="100%"&gt;&lt;select name="ui_dropdownDeliveryProvider" onchange="javascript:setTimeout('__doPostBack(\'ui_dropdownDeliveryProvider\',\'\')', 0)" id="ui_dropdownDeliveryProvider" class="msrs-dropdowns"&gt;          &lt;option selected="selected" value="Report Server Email"&gt;E-Mail&lt;/option&gt;          &lt;option value="Report Server FileShare"&gt;Windows File Share&lt;/option&gt;          &lt;/select&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="middle" nowrap="nowrap"&gt;&lt;br /&gt;&lt;/td&gt;         &lt;td valign="top" align="Left" nowrap="nowrap"&gt;&lt;br /&gt;&lt;/td&gt;         &lt;td valign="top"&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="1" border="0" height="12" /&gt;&lt;/td&gt;        &lt;/tr&gt;       &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;      &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;&lt;span&gt;&lt;script language="Javascript" type="text/Javascript"&gt;function EmailExtensionControlConditionalEnable(topLevelEnable) {ToggleButtonBasedOnCheckBoxWithOverride('ui_cbIncludeReport', 'RenderFormatID', !topLevelEnable);}&lt;/script&gt;&lt;script language="Javascript" type="text/Javascript"&gt;                 function ValidateNoSemiColon(source, args)                 {                     var obj = document.getElementById(source.controltovalidate);                      if (obj.value != null)                     {                         if (obj.value.indexOf(';') &gt;= 0)                         {                             args.IsValid = false;                             return;                         }                     }                      args.IsValid = true;                 }                 &lt;/script&gt;                 &lt;table class="msrs-normal" width="100%" cellpadding="0" cellspacing="0"&gt;        &lt;tbody&gt;&lt;tr&gt;         &lt;td width="10%" nowrap="nowrap"&gt;&lt;br /&gt;&lt;/td&gt;         &lt;td width="25%" nowrap="nowrap"&gt;&lt;br /&gt;&lt;/td&gt;         &lt;td width="40%" nowrap="nowrap"&gt;&lt;br /&gt;&lt;/td&gt;         &lt;td width="100%" nowrap="nowrap"&gt;&lt;br /&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;         &lt;td nowrap="nowrap"&gt;&lt;span&gt;To:&lt;/span&gt;&lt;/td&gt;         &lt;td colspan="2" nowrap="nowrap"&gt;&lt;input name="ToEmailAddressesID" value="emailaddress" id="ToEmailAddressesID" class="msrs-txtBox" style="width: 100%;" type="text"&gt;&lt;/td&gt;         &lt;td width="100%" nowrap="nowrap"&gt;&lt;span id="ctl937" style="display: none;color:Red;" &gt;&lt;table&gt;          &lt;tbody&gt;&lt;tr&gt;           &lt;td class="msrs-validationerror" valign="middle"&gt;&lt;img src="http://reports.etheridge.com/Report/images/line_err1.gif" alt="Error" /&gt;&lt;/td&gt;           &lt;td class="msrs-validationerror" valign="middle" nowrap="nowrap"&gt;Please enter an e-mail address.&lt;/td&gt;          &lt;/tr&gt;         &lt;/tbody&gt;&lt;/table&gt;         &lt;/span&gt;&lt;br /&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;         &lt;td nowrap="nowrap"&gt;&lt;span&gt;Cc:&lt;/span&gt;&lt;/td&gt;         &lt;td colspan="2" nowrap="nowrap"&gt;&lt;input name="CcEmailAddressesID" id="CcEmailAddressesID" class="msrs-txtBox" style="width: 100%;" type="text"&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;         &lt;td nowrap="nowrap"&gt;&lt;span&gt;Bcc:&lt;/span&gt;&lt;/td&gt;         &lt;td colspan="2" nowrap="nowrap"&gt;&lt;input name="BccEmailAddressesID" id="BccEmailAddressesID" class="msrs-txtBox" style="width: 100%;" type="text"&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;         &lt;td nowrap="nowrap"&gt;&lt;br /&gt;&lt;/td&gt;         &lt;td colspan="2" nowrap="nowrap"&gt;&lt;span&gt;(Use (;) to separate multiple e-mail addresses.)&lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;         &lt;td nowrap="nowrap"&gt;&lt;span&gt;Reply-To:&lt;/span&gt;&lt;/td&gt;         &lt;td colspan="2" nowrap="nowrap"&gt;&lt;input name="ReplyToEmailAddressesID" id="ReplyToEmailAddressesID" class="msrs-txtBox" style="width: 100%;" type="text"&gt;&lt;/td&gt;         &lt;td nowrap="nowrap"&gt;&lt;span id="ctl960" style="display: none;color:Red;" &gt;&lt;table&gt;          &lt;tbody&gt;&lt;tr&gt;           &lt;td class="msrs-validationerror" valign="middle"&gt;&lt;img src="http://reports.etheridge.com/Report/images/line_err1.gif" alt="Error" /&gt;&lt;/td&gt;           &lt;td class="msrs-validationerror" valign="middle" nowrap="nowrap"&gt;Only one address is allowed in Reply-To.&lt;/td&gt;          &lt;/tr&gt;         &lt;/tbody&gt;&lt;/table&gt;         &lt;/span&gt;&lt;br /&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;         &lt;td nowrap="nowrap"&gt;&lt;span&gt;Subject:&lt;/span&gt;&lt;/td&gt;         &lt;td colspan="2" nowrap="nowrap"&gt;&lt;input name="SubjectID" value="@ReportName was executed at @ExecutionTime" id="SubjectID" class="msrs-txtBox" style="width: 100%;" type="text"&gt;&lt;/td&gt;         &lt;td nowrap="nowrap"&gt;&lt;span id="ctl971" style="display: none;color:Red;" &gt;&lt;table&gt;          &lt;tbody&gt;&lt;tr&gt;           &lt;td class="msrs-validationerror" valign="middle"&gt;&lt;img src="http://reports.etheridge.com/Report/images/line_err1.gif" alt="Error" /&gt;&lt;/td&gt;           &lt;td class="msrs-validationerror" valign="middle" nowrap="nowrap"&gt;The Subject line requires a value.&lt;/td&gt;          &lt;/tr&gt;         &lt;/tbody&gt;&lt;/table&gt;         &lt;/span&gt;&lt;br /&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;         &lt;td nowrap="nowrap"&gt;&lt;br /&gt;&lt;/td&gt;         &lt;td colspan="2" nowrap="nowrap"&gt;&lt;table class="msrs-normal" cellpadding="0" cellspacing="0"&gt;          &lt;tbody&gt;&lt;tr&gt;           &lt;td nowrap="nowrap"&gt;&lt;input id="ui_cbIncludeReport" name="ui_cbIncludeReport" checked="checked" onclick="EmailExtensionControlConditionalEnable(true);" type="checkbox"&gt;&lt;label for="ui_cbIncludeReport"&gt;Include Report&lt;/label&gt;&lt;/td&gt;           &lt;td&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="20" /&gt;&lt;/td&gt;           &lt;td nowrap="nowrap"&gt;&lt;span&gt;Render Format:&lt;/span&gt;&lt;/td&gt;           &lt;td&gt;&lt;img src="http://reports.etheridge.com/Report/images/blank.gif" width="10" /&gt;&lt;/td&gt;           &lt;td nowrap="nowrap"&gt;&lt;select name="RenderFormatID" id="RenderFormatID" class="msrs-dropdowns"&gt;            &lt;option value="XML"&gt;XML file with report data&lt;/option&gt;            &lt;option value="CSV"&gt;CSV (comma delimited)&lt;/option&gt;            &lt;option value="IMAGE"&gt;TIFF file&lt;/option&gt;            &lt;option value="PDF"&gt;Acrobat (PDF) file&lt;/option&gt;            &lt;option selected="selected" value="MHTML"&gt;Web archive&lt;/option&gt;            &lt;option value="EXCEL"&gt;Excel&lt;/option&gt;            &lt;/select&gt;&lt;/td&gt;           &lt;td width="100%"&gt;&lt;br /&gt;&lt;/td&gt;          &lt;/tr&gt;         &lt;/tbody&gt;&lt;/table&gt;         &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;         &lt;td nowrap="nowrap"&gt;&lt;br /&gt;&lt;/td&gt;         &lt;td nowrap="nowrap"&gt;&lt;input id="ui_cbIncludeLink" name="ui_cbIncludeLink" checked="checked" type="checkbox"&gt;&lt;label for="ui_cbIncludeLink"&gt;Include Link&lt;/label&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-76106276094422964?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/76106276094422964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/12/adding-date-to-filename-in-report.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/76106276094422964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/76106276094422964'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/12/adding-date-to-filename-in-report.html' title='Adding date to filename in report subscription'/><author><name>WinBros</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-1747922403984523201.post-3006567521818488846</id><published>2009-12-17T09:02:00.000-08:00</published><updated>2009-12-17T09:10:45.065-08:00</updated><title type='text'>Excel Delimited file</title><content type='html'>This is a common technique Developers.Testers.DB admin come across most of the time.&lt;br /&gt;&lt;br /&gt;You got a delimited files with a comma or a space or a Tab and you want to make that to a  separate column.&lt;br /&gt;Open the text file in Excel.Excel-&gt;Open-&gt;View all files and select the file.If it is Excel 2007 it will automatically pops up a window that says Text Import Wizard Mode.&lt;br /&gt;&lt;br /&gt;otherwise if it is older excel version Click on Data-&gt;Text to Columns&lt;br /&gt;It will open a Wizard Select it as Delimited and Click on Next and Select the Delimiters and click Next and Finish.The final conversion will be the values in delimited file are seperated as Column.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-3006567521818488846?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/3006567521818488846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/12/excel-delimited-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/3006567521818488846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/3006567521818488846'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/12/excel-delimited-file.html' title='Excel Delimited file'/><author><name>WinBros</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-1747922403984523201.post-2369994522967118380</id><published>2009-12-09T13:52:00.000-08:00</published><updated>2009-12-09T14:07:20.539-08:00</updated><title type='text'>How to check the Server Time</title><content type='html'>If You want to know is the local time  of a server.&lt;br /&gt;&lt;br /&gt;type in your command prompt&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;NET TIME \\servername&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-2369994522967118380?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/2369994522967118380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/12/how-to-check-server-time.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/2369994522967118380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/2369994522967118380'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/12/how-to-check-server-time.html' title='How to check the Server Time'/><author><name>WinBros</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-1747922403984523201.post-7828305582697455093</id><published>2009-11-01T14:11:00.000-08:00</published><updated>2009-11-02T09:52:09.099-08:00</updated><title type='text'>C# - A Musical History!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_Rhgh965-edg/Su4KVaUHMqI/AAAAAAAACPU/11c_VOX3LQg/s1600-h/141130_Full.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 91px;" src="http://1.bp.blogspot.com/_Rhgh965-edg/Su4KVaUHMqI/AAAAAAAACPU/11c_VOX3LQg/s320/141130_Full.jpg" alt="" id="BLOGGER_PHOTO_ID_5399264366221013666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;In music, the symbol&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:x-large;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:x-large;"&gt;#&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt; is placed after the name of a note in the key signature, or before a note on the staff to indicate that the note is to be played a semitone higher&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Rhgh965-edg/Su4JVhKEJ8I/AAAAAAAACPM/NE8FMDOsOI0/s1600-h/cc.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 320px; height: 198px;" src="http://3.bp.blogspot.com/_Rhgh965-edg/Su4JVhKEJ8I/AAAAAAAACPM/NE8FMDOsOI0/s320/cc.jpg" alt="" id="BLOGGER_PHOTO_ID_5399263268546291650" border="0" /&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;C# was initially called COOL for C-like Object Oriented Language. It was &lt;/span&gt;&lt;/span&gt;&lt;span class="apple-style-span"&gt;&lt;span style="color:black;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;renamed C# because it is a step above C/C++&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman';"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;p class="MsoNormal" style="text-align: justify; margin-left: 22.5pt; text-indent: -0.25in; line-height: 13.5pt; vertical-align: baseline;"&gt;&lt;span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;·&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:7pt;"  &gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;                  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:black;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;# (sharp) means a semi-tone above in music&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify; margin-left: 22.5pt; text-indent: -0.25in; line-height: 13.5pt; vertical-align: baseline;"&gt;&lt;span style="color:black;"&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;·&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:7pt;"  &gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;                  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:black;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;can also be viewed as a stacked 4 pluses so C++++&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-align: justify; margin-left: 22.5pt; text-indent: -0.25in; line-height: 13.5pt; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-align: justify; margin-left: 22.5pt; text-indent: -0.25in; line-height: 13.5pt; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 13.5pt; vertical-align: baseline;"&gt;&lt;span style="color:black;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-7828305582697455093?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/7828305582697455093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/11/c-musical-history.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/7828305582697455093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/7828305582697455093'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/11/c-musical-history.html' title='C# - A Musical History!'/><author><name>.</name><uri>http://www.blogger.com/profile/00911460710117704866</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='24' src='http://2.bp.blogspot.com/_Rhgh965-edg/S5q_Hb4MF5I/AAAAAAAACY8/AS-qWTRMSmQ/S220/DSC00722.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_Rhgh965-edg/Su4KVaUHMqI/AAAAAAAACPU/11c_VOX3LQg/s72-c/141130_Full.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1747922403984523201.post-4192039692827155679</id><published>2009-10-16T10:36:00.000-07:00</published><updated>2009-10-16T10:55:37.664-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Reporting in 5 minutes'/><title type='text'>Get Start with SQL Server and Reporting in 5 minutes</title><content type='html'>If you are using Sql server 2000..To open Query analyser from Run..&lt;br /&gt;Use this Start-&gt;Run-&gt;isqlw-&gt;enter&lt;br /&gt;&lt;br /&gt;Sql server 2005 and Sql server 2008 comes with Management Studio similar to Enterprise Manager in Sql server 2000.&lt;br /&gt;These Management studio are free to download.&lt;br /&gt;So if you dont have Visual Studio and Sql server installed in your system but you know you can access SQL server in your network you can download this and connect to SQL server&lt;br /&gt;&lt;br /&gt;http://www.microsoft.com/Sqlserver/2005/en/us/express-down.aspx&lt;br /&gt;&lt;br /&gt;Reporting:&lt;br /&gt;For reporting you need Business Intelligence which comes with installation of SQL server advanced tool kit for free download.So this will install Visual studio which is only for Reporting.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Filename:&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;SQLEXPR_ADV&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Reporting needs an Reporting server and Sql server&lt;br /&gt;&lt;br /&gt;In Reporting Server where you will host all your reports and it can be accesses via URL.These reports are deployed to the reporting server through Business Intelligence visual studio solution.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;like http://reportingServer.domainName/reportsfolder/reportFilname.rdl&lt;br /&gt;&lt;br /&gt;Open Business Intelligence Solution similar to Visual studio solution icon but it will be placed in SQl server Installed folder (Start-&gt;All programs-&gt;Microsoft Sql server 2005-&gt;Sql server Business Intelligencedevelopment Studio)&lt;br /&gt;&lt;br /&gt;Create a new Solution ,add a new data source .This datasource will be your database where your reports data are there.And this datasource is deployed to reporting server.&lt;br /&gt;Right click on the Solution-&gt;Properties-&gt;Deployment-&gt;&lt;br /&gt;Target Data source Folder:Data Sources&lt;br /&gt;TargetReportFolder:reportsfolder/&lt;br /&gt;TargetServerURL:http://reportingServer.domainName&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Create a new Report which has file format .rdl&lt;br /&gt;Now do all modifications in your report ,hook the store procedure,display those column name which returned from these storeproc...If you want to add parameters you can do that in Report parameter..&lt;br /&gt;&lt;br /&gt;Now build the report and if it is succeeded right click on that report and properties-&gt;Deploy&lt;br /&gt;&lt;br /&gt;This wll deploy the report to the reporting server where we mentioned on the Solution properties..&lt;br /&gt;&lt;br /&gt;Here you go!!! Reporting for you in 5 minutes&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-4192039692827155679?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/4192039692827155679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/10/get-start-with-sql-server-and-reporting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/4192039692827155679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/4192039692827155679'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/10/get-start-with-sql-server-and-reporting.html' title='Get Start with SQL Server and Reporting in 5 minutes'/><author><name>WinBros</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-1747922403984523201.post-4958055046801038168</id><published>2009-10-16T10:29:00.000-07:00</published><updated>2009-10-16T10:36:07.415-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Find the Column Name in a Table'/><title type='text'>Find the Column Name in a Table which is in a database</title><content type='html'>You might encounter this problem...You forget the tablename where a column recides...&lt;br /&gt;Inorder to search the column name where it is in a table&lt;br /&gt;use this in SQL Server&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;SELECT name FROM sysobjects WHERE id IN ( SELECT id FROM syscolumns WHERE name like '%employeeId%' )&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This will search the current database and returns all the rows of sysobject (tables,views,storeproc,function etc., )which has this columnname employeeId.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-4958055046801038168?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/4958055046801038168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/10/find-column-name-in-table-which-is-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/4958055046801038168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/4958055046801038168'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/10/find-column-name-in-table-which-is-in.html' title='Find the Column Name in a Table which is in a database'/><author><name>WinBros</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-1747922403984523201.post-8008522366586438780</id><published>2009-09-23T10:20:00.000-07:00</published><updated>2009-09-23T15:11:00.891-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='How to write a StoreProc with &quot;Where in&quot; clause'/><title type='text'>How you write a StoreProc with "Where in" clause</title><content type='html'>This is usual store procedure we will write to get particular userid by passing single Userid as parameter&lt;br /&gt;&lt;br /&gt;create Procedure [dbo].[procName]&lt;br /&gt;(@Userid int)                                                                                                    &lt;br /&gt;AS select  * from users where UserId =@Userid&lt;br /&gt;&lt;br /&gt;If you want to pass a List of values to fetch the userId's&lt;br /&gt;like&lt;br /&gt;select  * from users  UserId in (101,102,103);&lt;br /&gt;&lt;br /&gt;How we will pass these list of values in storeProc?&lt;br /&gt;&lt;br /&gt;Modify the StoreProcedure like this&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;&lt;br /&gt;Create Procedure [dbo].[procName]&lt;br /&gt;(@Userid varchar(500))&lt;br /&gt;&lt;br /&gt;AS&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;SET NOCOUNT ON&lt;br /&gt;&lt;br /&gt;DECLARE @SQL varchar(600)&lt;br /&gt;&lt;br /&gt;SET @SQL =&lt;br /&gt;&lt;br /&gt;'select  * from users&lt;br /&gt;where UserId IN (' + @Userid + ')'&lt;br /&gt;&lt;br /&gt;EXEC(@SQL)&lt;br /&gt;END&lt;br /&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Now pass the input parameter as Varchar @Userid varchar(500)&lt;/li&gt;&lt;li&gt;DECLARE @SQL varchar(600)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Now Use the @SQL as a String so the Value of the string will be 'select  * from users where UserId IN ('+ @Userid + ')'&lt;/li&gt;&lt;li&gt;Now Execute sql by EXEC(@SQL)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Now in Your C# Code you can get the List values and convert to values with comma seperated&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;  List&amp;lt;int&amp;gt; someVal = new List&amp;lt;int&amp;gt;()&lt;br /&gt;            {&lt;br /&gt;                101,102,103,104,105&lt;br /&gt;            };&lt;br /&gt;         &lt;br /&gt;            string Val=&amp;quot;&amp;quot;;&lt;br /&gt;            string finalVal;&lt;br /&gt;            foreach (var i in someVal)&lt;br /&gt;            {&lt;br /&gt;                Val = Val+i + &amp;quot;,&amp;quot;;&lt;br /&gt;            }&lt;br /&gt;            finalVal = Val.TrimEnd(',');&lt;br /&gt;&lt;br /&gt;DataTable dt=GetUserData(finalVal );&lt;br /&gt;&lt;br /&gt;public DataTable GetUserData(string userID)&lt;br /&gt;    {&lt;br /&gt;        SqlConnection conn = null;&lt;br /&gt;        SqlDataReader rdr = null;&lt;br /&gt;        DataTable dt1 = new DataTable();&lt;br /&gt;&lt;br /&gt;        // create and open a connection object&lt;br /&gt;        conn = new&lt;br /&gt;            SqlConnection("Server=(local);DataBase=Northwind;Integrated Security=SSPI");&lt;br /&gt;        conn.Open();&lt;br /&gt;&lt;br /&gt;        // 1.  create a command object identifying&lt;br /&gt;        //     the stored procedure&lt;br /&gt;        SqlCommand cmd = new SqlCommand("procName", conn);&lt;br /&gt;&lt;br /&gt;        // 2. set the command object so it knows&lt;br /&gt;        //    to execute a stored procedure&lt;br /&gt;        cmd.CommandType = CommandType.StoredProcedure;&lt;br /&gt;&lt;br /&gt;        // 3. add parameter to command, which&lt;br /&gt;        //    will be passed to the stored procedure&lt;br /&gt;        cmd.Parameters.Add(&lt;br /&gt;            new SqlParameter("@Userid", Userid));&lt;br /&gt;&lt;br /&gt;        // execute the command&lt;br /&gt;        rdr = cmd.ExecuteReader();&lt;br /&gt;&lt;br /&gt;        dt1.Load(rdr);&lt;br /&gt;&lt;br /&gt;        return dt1;&lt;br /&gt;&lt;br /&gt;    }      &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/int&gt;&lt;/int&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-8008522366586438780?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/8008522366586438780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/09/how-you-write-storeproc-with-where-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/8008522366586438780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/8008522366586438780'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/09/how-you-write-storeproc-with-where-in.html' title='How you write a StoreProc with &quot;Where in&quot; clause'/><author><name>WinBros</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-1747922403984523201.post-7657493399622073993</id><published>2009-09-18T13:47:00.000-07:00</published><updated>2009-09-18T17:07:57.223-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Adding a column to DataSet at any position'/><title type='text'>Adding a column to DataSet ....Wherever you want it..</title><content type='html'>I hope atleast one person other than me finds this useful :)&lt;br /&gt;&lt;br /&gt;Normally, When we want to add an extra column to a dataset&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);font-family:lucida grande;" &gt;DataSet ds = new DataSet();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);font-family:lucida grande;" &gt;DataColumn column = new DataColumn("extraCol", System.Type.GetType("System.String"));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);font-family:lucida grande;" &gt;ds.Tables[j].Columns.Add(column);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Suppose we fill the dataset from a database and this dataset has 4 columns. The above two statements will add a 5th column called "extraCol" to the ds.&lt;br /&gt;&lt;br /&gt;But this addition will always happen at the end. I mean, after the 4 original columns, you will have this extraCol.&lt;br /&gt;&lt;br /&gt;What if you want this "extraCol" column to be added in the 3rd position??&lt;br /&gt;Here's what I did ( And it works!!)&lt;br /&gt;&lt;br /&gt;First I get a count of columns from the dataset and subtract the position which will get me the exact column number:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);font-family:lucida grande;" &gt;int columnNo = ds.Tables[j].Columns.Count - 1;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;this will get the column No as 3. ( total number of columns in ds: 4). Subtract 1, you get 3.&lt;br /&gt;&lt;br /&gt;Then do:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);font-family:lucida grande;" &gt;column.SetOrdinal(columnNo);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That's all. You now have the column "extraCol" at position 3.&lt;br /&gt;Here's the code:&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;DataSet ds = new DataSet();&lt;br /&gt;DataColumn column = new DataColumn("extraCol", System.Type.GetType("System.String"));&lt;br /&gt;ds.Tables[j].Columns.Add(column);&lt;br /&gt;int columnNo = ds.Tables[j].Columns.Count - 1;&lt;br /&gt;column.SetOrdinal(columnNo);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For more info on the SetOrdinal Method see this link:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.data.datacolumn.setordinal.aspx"&gt;http://msdn.microsoft.com/en-us/library/system.data.datacolumn.setordinal.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I hope this is useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-7657493399622073993?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/7657493399622073993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/09/adding-column-to-dataset-wherever-you.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/7657493399622073993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/7657493399622073993'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/09/adding-column-to-dataset-wherever-you.html' title='Adding a column to DataSet ....Wherever you want it..'/><author><name>Abhi</name><uri>http://www.blogger.com/profile/00129098800019667576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_y_MjKgPhPHY/SXOn935yFqI/AAAAAAAAFt8/XQSFIUSu0Ag/S220/DSC06940.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1747922403984523201.post-8142538988599839994</id><published>2009-09-11T08:21:00.000-07:00</published><updated>2009-09-13T14:50:54.464-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Foxy Proxy BBC iVideo Hack'/><title type='text'>Proxy</title><content type='html'>How to view some websites which are not viewable in other countries.&lt;br /&gt;Say for example you want to watch some videos in BBC website&lt;br /&gt;you might come across this message&lt;br /&gt;&lt;strong style="font-style: italic;"&gt;&lt;br /&gt;Non-UK users&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt; Unfortunately you are unable to access this content. This is offered only to audiences in the UK.  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Inorder to solve this ,&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Install Firefox latest version &lt;a href="http://www.mozilla.com/en-US/firefox/personal.html"&gt;http://www.mozilla.com/en-US/firefox/personal.html&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Install add-on foxy proxy&lt;a href="http://foxyproxy.mozdev.org/downloads.html"&gt;  http://foxyproxy.mozdev.org/downloads.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Once you install the add on foxyproxy to the Firefox,Search for Proxy list in Google,you will get many proxy sites with their ip address and port number.&lt;/li&gt;&lt;li&gt;If you see on the right side corner of your firefox screen,FoxyProxy disabled with red strike on it.Just click on it and give name and move to the next tab and copy paste the ip address and port number of the proxy list.Click ok ,you get a message ignore it and click OK&lt;/li&gt;&lt;li&gt;Now try to access the BBC site or anyother website which you want to gain access to it.&lt;/li&gt;&lt;/ul&gt;Note:Since you add the foxy proxy to the firefox browser ,the proxy will work only for this...If you are using IE or Chrome it will give your actual Ip address not the proxy Ip address&lt;br /&gt;Check it through whatismyip.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-8142538988599839994?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/8142538988599839994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/09/proxy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/8142538988599839994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/8142538988599839994'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/09/proxy.html' title='Proxy'/><author><name>WinBros</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-1747922403984523201.post-7238145137593798548</id><published>2009-09-04T11:38:00.000-07:00</published><updated>2009-09-04T12:03:12.842-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Inline code %# is not working in Telerik RadToolBar radtoolbarbutton item NavigateURL'/><title type='text'>Telerik RadToolBar</title><content type='html'>RadToolBar has Items,If the Items are RadtoolBarButton and if the user clicks on the button it has to goto the URL which you have already specified&lt;br /&gt;&lt;br /&gt;You can try like this&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;&amp;lt;telerik:radtoolbar id=&amp;quot;radToolBarID&amp;quot; runat=&amp;quot;server&amp;quot; cssclass=&amp;quot;toolbar&amp;quot;&amp;gt;&lt;br /&gt;  &amp;lt;items&amp;gt;&lt;br /&gt;      &amp;lt;telerik:radtoolbarbutton navigateurl=&amp;quot;~/default.aspx&amp;quot; postback=&amp;quot;false&amp;quot; text=&amp;quot;Goto Default Page&amp;quot; causesvalidation=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;      &amp;lt;telerik:radtoolbarbutton navigateurl=&amp;quot;~/HomePage.aspx&amp;quot; postback=&amp;quot;false&amp;quot; text=&amp;quot;Goto Home Page&amp;quot; causesvalidation=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;  &amp;lt;/items&amp;gt;&lt;br /&gt;&amp;lt;/telerik:radtoolbar&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you want to use the INLINE code in NavigateURl from codebehind file..it wont work ..see this example for asp:Hyperlink&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt; &amp;lt;asp:HyperLink runat=&amp;quot;server&amp;quot; ID=&amp;quot;hmURL&amp;quot; NavigateUrl='&amp;lt;%#this.homePageURL%&amp;gt;' Text=&amp;quot;Home&amp;quot;&amp;gt;&amp;lt;/asp:HyperLink&amp;gt;&lt;br /&gt;&lt;br /&gt;In codebehind.cs&lt;br /&gt;&lt;br /&gt;   protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;   {&lt;br /&gt;   &lt;br /&gt;           homePageURL = "~/projectFolder/homePage.aspx";&lt;br /&gt;   }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;%#this.homePageURL%&gt; this is the inline code used to get the value from the codebehind but samething cant be used in Telerik RadToolBar's radtoolbarbutton-&gt;NavigateURL&lt;br /&gt;So we have to use it in the codebehind like this and in the aspx file remove the navigateURL&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;&amp;lt;telerik:radtoolbar id=&amp;quot;radToolBarID&amp;quot; runat=&amp;quot;server&amp;quot; cssclass=&amp;quot;toolbar&amp;quot;&amp;gt;&lt;br /&gt; &amp;lt;items&amp;gt;&lt;br /&gt;     &amp;lt;telerik:radtoolbarbutton navigateurl=&amp;quot;~/default.aspx&amp;quot; postback=&amp;quot;false&amp;quot; text=&amp;quot;Goto Default Page&amp;quot; causesvalidation=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;     &amp;lt;telerik:radtoolbarbutton postback=&amp;quot;false&amp;quot; text=&amp;quot;Goto Home Page&amp;quot; causesvalidation=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt; &amp;lt;/telerik:radtoolbarbutton&amp;gt;&lt;br /&gt;&amp;lt;/telerik:radtoolbarbutton&amp;gt;&lt;br /&gt;&lt;br /&gt;codeBehind.cs&lt;br /&gt;&lt;br /&gt;public string homePageURL; &lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt; homePageURL = "~/projectFolder/homePage.aspx";&lt;br /&gt;   Telerik.Web.UI.RadToolBarButton radToolBarBtn = (Telerik.Web.UI.RadToolBarButton)radToolBarID.FindItemByText("Goto Home Page");&lt;br /&gt;   radToolBarBtn.NavigateUrl = homePageURL;  &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/items&gt;&lt;/telerik:radtoolbar&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-7238145137593798548?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/7238145137593798548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/09/telerik-radtoolbar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/7238145137593798548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/7238145137593798548'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/09/telerik-radtoolbar.html' title='Telerik RadToolBar'/><author><name>WinBros</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-1747922403984523201.post-7673317878266657145</id><published>2009-09-03T14:04:00.001-07:00</published><updated>2009-09-03T15:10:13.672-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Null == Null'/><title type='text'>Is null == null?</title><content type='html'>This is a classic question that every developer has faced. Well I guess it depends on how we define null.  Theoretically null is definitely not equal to another null. But pragmatically it is considered so in many cases. Databases will not allow direct comparison of null. We will have to use the statement "is null" to do check for null values from a database point of view.&lt;br /&gt;&lt;br /&gt;Try the following java code snippet:&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;System.out.println(null == null);&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; //Evaluates to true&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Object a = null;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Object b = null;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;System.out.println(a == b); //Evaluates to True&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;System.out.println(a.equals(b)); //Null Pointer Exception&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When we use == operator for objects, it looks whether both objects point to the same reference (In this case which Java accepts as true based on our previous test). Whereas when we call equals, it checks to see if the references to the object are the same. The references are null, so we get a Null Pointer Exception.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-7673317878266657145?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/7673317878266657145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/09/is-null-null.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/7673317878266657145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/7673317878266657145'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/09/is-null-null.html' title='Is null == null?'/><author><name>Randomizer</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-1747922403984523201.post-3228824214762551876</id><published>2009-09-02T14:36:00.000-07:00</published><updated>2009-09-03T15:07:07.184-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reflector and Viewstate Decoder'/><title type='text'>Viewstate Decoder &amp; Reflector</title><content type='html'>Did you ever thought to get the data in the Textbox or dropdown of an aspx page once it is processed.If the controls are server control then you cannot get the data as easy as html page -right click View source...All the values are passed as Viewstate with junk values and not readable...&lt;br /&gt;To get those Viewstate Data download this software and give the URL it will get all the viewstate details ...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;http://www.pluralsight.com/community/media/p/51688.aspx&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To get the code from DLL :&lt;br /&gt;DLL is a processed single file of thousand or more pages of code written in an application.With this single file you can get the whole functionality of a complete application .How to get the source code from these DLL files.Use this Reflector software you will get the class file structure and many more..&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;http://www.red-gate.com/products/reflector/&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-3228824214762551876?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/3228824214762551876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/09/viewstate-decoder.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/3228824214762551876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/3228824214762551876'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/09/viewstate-decoder.html' title='Viewstate Decoder &amp; Reflector'/><author><name>WinBros</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-1747922403984523201.post-3893305613267881917</id><published>2009-09-02T14:02:00.000-07:00</published><updated>2009-09-02T14:04:06.204-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Could not open a connection to SQL Server'/><title type='text'>A network-related or instance-specific error occurred while establishing a connection to SQL Server</title><content type='html'>If you com across this error which accessing your web application&lt;br /&gt;&lt;b&gt;A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Check your network connection&amp;nbsp;&lt;/li&gt;&lt;li&gt;Check whether you have given proper SQL server instance name&amp;nbsp;&lt;/li&gt;&lt;li&gt;Check your Sql server it might gone down or SQL service might be stopped.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Detailed article is here &lt;b&gt;...&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;i&gt;http://www.sqlmusings.com/2009/03/11/resolving-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection-to-sql-server/&lt;/i&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-3893305613267881917?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/3893305613267881917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/09/network-related-or-instance-specific.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/3893305613267881917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/3893305613267881917'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/09/network-related-or-instance-specific.html' title='A network-related or instance-specific error occurred while establishing a connection to SQL Server'/><author><name>WinBros</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-1747922403984523201.post-1413597077389165050</id><published>2009-09-01T12:59:00.000-07:00</published><updated>2009-09-03T12:39:46.889-07:00</updated><title type='text'>Gmail Down</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Ryu_S6dDAts/Sp19TnRquTI/AAAAAAAALlc/pc-7Uv45E8E/s1600-h/Gmaildown.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 183px;" src="http://4.bp.blogspot.com/_Ryu_S6dDAts/Sp19TnRquTI/AAAAAAAALlc/pc-7Uv45E8E/s320/Gmaildown.jpg" alt="" id="BLOGGER_PHOTO_ID_5376591306064312626" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Server Error&lt;br /&gt;The server encountered a temporary error and could not complete your request.&lt;br /&gt;&lt;br /&gt;Please try again in 30 seconds.&lt;br /&gt;&lt;br /&gt;Google Gmail Site Went Down around 2.55Pm Sep 1st...Yahoooooooooo!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-1413597077389165050?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/1413597077389165050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/09/gmail-down.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/1413597077389165050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/1413597077389165050'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/09/gmail-down.html' title='Gmail Down'/><author><name>WinBros</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://4.bp.blogspot.com/_Ryu_S6dDAts/Sp19TnRquTI/AAAAAAAALlc/pc-7Uv45E8E/s72-c/Gmaildown.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1747922403984523201.post-9027085238684878882</id><published>2009-08-31T09:43:00.000-07:00</published><updated>2009-09-11T09:14:18.293-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='method'/><category scheme='http://www.blogger.com/atom/ns#' term='An object reference is required for the non-static field'/><category scheme='http://www.blogger.com/atom/ns#' term='or property'/><title type='text'>Error 1 An object reference is required for the non-static field, method, or property</title><content type='html'>&lt;ul&gt;&lt;li&gt;When you are creating a Console application you might come across this error message.&lt;/li&gt;&lt;li&gt;And most of the time,if you are not instantiating the object of the class and calling the function you might get this error.&lt;/li&gt;&lt;/ul&gt;In console application, The initial method called by CLR is &lt;span style="font-weight: bold;"&gt;static void Main()&lt;/span&gt;&lt;br /&gt;Since the method is static, you dont need to create object to instantiate the class....when you are trying to access a method from static class (here class name is Program ) you will get an error &lt;span style="font-weight: bold; font-style: italic;"&gt;Error 1 An object reference is required for the non-static field, method, or property&lt;/span&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Linq;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.IO;&lt;br /&gt;&lt;br /&gt;namespace ConsoleApplication1&lt;br /&gt;{&lt;br /&gt;class Program&lt;br /&gt;{&lt;br /&gt;   private void func(string someName)&lt;br /&gt;   {&lt;br /&gt; &lt;br /&gt;       try&lt;br /&gt;       {&lt;br /&gt;           for (int i = 1; i &lt;= tot; i++)&lt;br /&gt;           {&lt;br /&gt;               ......&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;       catch (Exception ex)&lt;br /&gt;       {&lt;br /&gt;           Console.WriteLine(ex.Message);&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;   static void Main(string[] args)&lt;br /&gt;   {&lt;br /&gt;       string someName;&lt;br /&gt;       try&lt;br /&gt;       {&lt;br /&gt;           func(someName);//It will throw error here&lt;br /&gt;       }&lt;br /&gt;       catch (Exception ex)&lt;br /&gt;       {&lt;br /&gt;           Console.WriteLine(ex.Message);&lt;br /&gt;       }&lt;br /&gt;       finally&lt;br /&gt;       {&lt;br /&gt;           Console.WriteLine("The End");&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So use like this&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Linq;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.IO;&lt;br /&gt;&lt;br /&gt;namespace ConsoleApplication1&lt;br /&gt;{&lt;br /&gt;class Program&lt;br /&gt;{&lt;br /&gt;   private void func(string someName)&lt;br /&gt;   {&lt;br /&gt;    try&lt;br /&gt;       {&lt;br /&gt;           for (int i = 1; i &lt;= tot; i++)&lt;br /&gt;           {&lt;br /&gt;               ......&lt;br /&gt;           }&lt;br /&gt;        }&lt;br /&gt;    catch (Exception ex)&lt;br /&gt;    {&lt;br /&gt;        Console.WriteLine(ex.Message);&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;   static void Main(string[] args)&lt;br /&gt;   {&lt;br /&gt;       string someName;&lt;br /&gt;       Program classObj=new Program(); //Instantiate&lt;br /&gt;       try&lt;br /&gt;       {&lt;br /&gt;           classObj.func(someName); //If you dont want create an object for your class you can use  func(someName) and change the function definition to private static void func(string someName)&lt;br /&gt;       }&lt;br /&gt;       catch (Exception ex)&lt;br /&gt;       {&lt;br /&gt;           Console.WriteLine(ex.Message);&lt;br /&gt;       }&lt;br /&gt;       finally &lt;br /&gt;       {&lt;br /&gt;           Console.WriteLine("The End");&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If you dont want create an object for your class you can use  func(someName) and change the function definition to private static void func(string someName)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-9027085238684878882?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/9027085238684878882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/08/error-1-object-reference-is-required.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/9027085238684878882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/9027085238684878882'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/08/error-1-object-reference-is-required.html' title='Error 1 An object reference is required for the non-static field, method, or property'/><author><name>WinBros</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-1747922403984523201.post-3595979653860447678</id><published>2009-08-26T18:33:00.000-07:00</published><updated>2009-09-13T11:36:37.024-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='COM object in C#.NET and Object Instantiating'/><title type='text'>How to use COM object in C#.NET Visual studio 2008</title><content type='html'>Use COM object in Your project?&lt;br /&gt;&lt;br /&gt;What COM? legacy com .com+...Phew!!!!&lt;br /&gt;&lt;br /&gt;Its easy to use COM object in your project.&lt;br /&gt;&lt;br /&gt;If you have a dll which says it cannot be added as reference to your Project...So Register it using &lt;strong&gt;regsvr32 dllname.dll&lt;br /&gt;&lt;br /&gt;Goto start-&gt;Run-&gt;&lt;/strong&gt;&lt;strong&gt;regsvr32 dllname.dll&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;Once you register the com object dll ,now you can add as a reference by going to the COM tab in the Add reference Dialog box.&lt;br /&gt;Right click on Reference-&gt;Add Refernce-&gt;COM tab-&gt;search for the dll name which u registered&lt;br /&gt;&lt;br /&gt;Thats it you added com components to your project.Now you can access the COM object by adding&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;Using comClassName; // Add this mostly it will same as the dll name&lt;br /&gt;&lt;br /&gt;and instantiate an object for that&lt;br /&gt;&lt;br /&gt;comClassName obj=new comClassName;&lt;br /&gt;string returnsValofComFunc =obj.funcInComDLL();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Thats it now you can use the functions are properties inside the com component dll directly instantiating the class.&lt;br /&gt;&lt;br /&gt;What is instantiating?&lt;br /&gt;className obj =new className(); // creating an Object for a Class is called instantiating.&lt;br /&gt;&lt;br /&gt;What is Class?&lt;br /&gt;Skeleton structure of a component&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;Class Car&lt;br /&gt;{&lt;br /&gt;   int carWheels;&lt;br /&gt;   int carDoors;&lt;br /&gt;   string engine;&lt;br /&gt;&lt;br /&gt;   public int func()&lt;br /&gt;   {&lt;br /&gt;    carWheels=4;&lt;br /&gt;    return carWheels;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//Now if you instantiate this class you can get the class Car details&lt;br /&gt;//Do you want to findout how many wheels in the car&lt;br /&gt;&lt;br /&gt;Car carObj=new Car();&lt;br /&gt;int noWheels=carObj.func();&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-3595979653860447678?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/3595979653860447678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/08/how-to-use-com-object-in-cnet-visual.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/3595979653860447678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/3595979653860447678'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/08/how-to-use-com-object-in-cnet-visual.html' title='How to use COM object in C#.NET Visual studio 2008'/><author><name>WinBros</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-1747922403984523201.post-6959313547873084205</id><published>2009-08-25T21:48:00.000-07:00</published><updated>2009-09-13T14:51:44.118-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.chm files Page cannot be displayed'/><title type='text'>.chm files Page cannot be displayed</title><content type='html'>Most of them have encountered this Message when you open any .chm files "The Page Cannot Be displayed".&lt;br /&gt;&lt;br /&gt;If you are a C# developer and keeps your ebooks inside "c#" folder name ..there you go thats why its not opening the pages...Change the folder name remove the '#' and rename it and open the .chm file .&lt;br /&gt;Bingo!!!!&lt;br /&gt;Avoid special characters like +,? ,&amp;amp; in the folder name...&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-style-span" style="color: rgb(1, 24, 43); font-family: Verdana; font-size: 13px; text-align: justify;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;In XP i encountered the same issue couple of years before ...Right click on the chm file Properties Click on Unblock and click apply&amp;amp; ok and try to open it again..It will open..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-6959313547873084205?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/6959313547873084205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/08/chm-files-page-cannot-be-displayed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/6959313547873084205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/6959313547873084205'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/08/chm-files-page-cannot-be-displayed.html' title='.chm files Page cannot be displayed'/><author><name>WinBros</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-1747922403984523201.post-3165217162491866609</id><published>2009-08-25T09:08:00.000-07:00</published><updated>2009-08-25T09:17:41.566-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Using Telerik without installing'/><title type='text'>Telerik Controls</title><content type='html'>&lt;strong&gt;&lt;span style="font-weight: normal;"&gt;If you system is not installed with the 3rd party tools,How to get that in your MS visual studio...&lt;br /&gt;&lt;br /&gt;To get telerik control in Your toolbox or any controls you can just drag drop the dll to the MS visual studio Toolbox.&lt;br /&gt;I created a new toolbox menu by Right clicking on it ToolBox-&gt;Right click-&gt;Add Tab-&gt;Give ur control toolbox Name-&gt;Drag drop the Dll of the 3rd party tools like telerik or infragistics you can find that in the installed directory or existing application bin folder.Here im using Telerik.Web.UI.dll.&lt;br /&gt;&lt;br /&gt;Most of the Telerik Web tools are Ajax enabled.So if you just drag drop your tool to your aspx page it gives an error message like this&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Error message "The control with ID '[ControlID]' requires a  ScriptManager on the page. The ScriptManager must appear before any controls  that need it."&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;So use this code Ajax etension in your master page or the aspx page you are using .&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="color:blue;"&gt;&lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;asp:ScriptManager&lt;/span&gt; &lt;span style="color:red;"&gt;ID&lt;/span&gt;&lt;span style="color:black;"&gt;=&lt;/span&gt;&lt;span style="color:blue;"&gt;"ScriptManager1"&lt;/span&gt; &lt;span style="color:red;"&gt;runat&lt;/span&gt;&lt;span style="color:black;"&gt;=&lt;/span&gt;&lt;span style="color:blue;"&gt;"server"&lt;/span&gt; &lt;span style="color:blue;"&gt;/&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-3165217162491866609?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/3165217162491866609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/08/telerik-controls.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/3165217162491866609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/3165217162491866609'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/08/telerik-controls.html' title='Telerik Controls'/><author><name>WinBros</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-1747922403984523201.post-7940627927872376143</id><published>2009-08-16T07:19:00.000-07:00</published><updated>2009-09-13T14:52:37.527-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='How to get the Ip address of the client'/><title type='text'>How to get the Ip address of the client</title><content type='html'>You might wonder how &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Whatismyip&lt;/span&gt;.com gets your actual &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Ip&lt;/span&gt; address and displaying it.&lt;br /&gt;How to get the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;ip&lt;/span&gt; address of the client &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Pc&lt;/span&gt; who is accessing a website in server.&lt;br /&gt;First we have to understand&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;IP&lt;/span&gt; address are unique for every system if it is connected in Internet.(So &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;that's&lt;/span&gt; why through &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;IP&lt;/span&gt; address we can find the location of a person )&lt;/li&gt;&lt;li&gt;Your website is deployed in a server and you will be provided specific &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;Ip&lt;/span&gt; address for that&lt;/li&gt;&lt;li&gt;If you get an &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_8"&gt;Internet&lt;/span&gt; connection with static &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;IP&lt;/span&gt; address(you need to pay extra amount for this ,&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;Ip&lt;/span&gt; address wont change)you can run your website from your home PC&lt;/li&gt;&lt;/ul&gt;say for example i have a .Net web application running in a server. People are trying to access the website using the URL .But we need to restrict the Users accessing website and we need specific Users who registered their &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;Ip&lt;/span&gt; address with our .net web application.&lt;br /&gt;How to do that:&lt;br /&gt;Use Request.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;ServerVariables&lt;/span&gt;["REMOTE_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;ADDR&lt;/span&gt;"]&lt;br /&gt;You will get the client &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;Ip&lt;/span&gt;!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-7940627927872376143?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/7940627927872376143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/08/how-to-get-ip-address-of-client.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/7940627927872376143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/7940627927872376143'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/08/how-to-get-ip-address-of-client.html' title='How to get the Ip address of the client'/><author><name>WinBros</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-1747922403984523201.post-8041766661767961116</id><published>2009-08-14T07:29:00.000-07:00</published><updated>2009-08-14T08:50:58.840-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Deserialize XML with Namespace'/><title type='text'>How to:Deserialize XML with Namespace and no proper Schema(XSD)</title><content type='html'>Consider this XML&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-16"?&amp;gt;&lt;br /&gt;&amp;lt;ns1:Root xmlns:ns1="http://someWebsite.com/foldername/schemaFile" xmlns:ns2="http://someWebsite.com/foldername/BaseschemaFile" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://someWebsite.com/foldername/schemaFile file:/C:/xsd/schemaFile.xsd"&amp;gt;&lt;br /&gt;  &amp;lt;ns1:Root1 val1="abcd" val2="2008-05-04T18:13:51.0Z" /&amp;gt;&lt;br /&gt;  &amp;lt;ns1:Root2 r2val1="16" r2val2="1234" r2valcompanyName="Jing Company" r2valcontactName="Jinga" r2valcontactPhone="123-456-7890" r2val3status="A"&amp;gt;&lt;br /&gt;    &amp;lt;ns1:Address streetAddress1="jing jung  " streetAddress2="juck" city="jinjunakka" state="ji" zipCode="12345" /&amp;gt;&lt;br /&gt;  &amp;lt;/ns1:Root2&amp;gt;&lt;br /&gt;&amp;lt;/ns1:Root&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;If you see this XML ,You can see different things like ns1,url for Webiste and Schema file location.&lt;/p&gt;&lt;p&gt;If you try to deserialize using normal deserialization method you will get many errors like &lt;/p&gt;&lt;p&gt;"&lt;somename xmlns="'http://someWEbURL.com/XSDname'"&gt; was not expected."&lt;/p&gt;"was not expected" message error - deserialized xml&lt;br /&gt;&lt;br /&gt;Use name Space in all the Attribute and Element declaration you can get that from xsd file&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;[Serializable()]&lt;br /&gt;[XmlRoot("Root", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public sealed class RootClass&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;[XmlElement("Root1", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public Root1Class Root1 = new Root1Class();&lt;br /&gt;&lt;br /&gt;[XmlElement("Root2", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public Root2Class Root2 = new Root2Class();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;[Serializable()]&lt;br /&gt;[XmlRoot("Root1", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public sealed class Root1&lt;br /&gt;{&lt;br /&gt;[XmlAttribute("val1", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public string val1 = string.Empty;&lt;br /&gt;&lt;br /&gt;[XmlAttribute("val2", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public string val2 = string.Empty;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;[Serializable()]&lt;br /&gt;[XmlRoot("Root2", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public sealed class Root2&lt;br /&gt;{&lt;br /&gt;[XmlAttribute("r2val1", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public string r2val1 = string.Empty;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[XmlAttribute("r2val2", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public string r2val2 = string.Empty;&lt;br /&gt;&lt;br /&gt;[XmlAttribute("r2valcompanyName", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public string r2valcompanyName = string.Empty;&lt;br /&gt;&lt;br /&gt;[XmlAttribute("r2valcontactPhone", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public string r2valcontactPhone = string.Empty;&lt;br /&gt;&lt;br /&gt;[XmlAttribute("r2val3status", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public string r2val3status = string.Empty;&lt;br /&gt;&lt;br /&gt;//Check here&lt;br /&gt;[XmlElement("Address", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public Address address = new Address();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[Serializable()]&lt;br /&gt;[XmlRoot("Address", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public sealed class Address&lt;br /&gt;{&lt;br /&gt;[XmlAttribute("streetAddress1", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public string streetAddress1 = string.Empty;&lt;br /&gt;&lt;br /&gt;[XmlAttribute("streetAddress2", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public string streetAddress2 = string.Empty;&lt;br /&gt;&lt;br /&gt;[XmlAttribute("city", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public string city = string.Empty;&lt;br /&gt;&lt;br /&gt;[XmlAttribute("state", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public string state = string.Empty;&lt;br /&gt;&lt;br /&gt;[XmlAttribute("zipCode", Namespace = "http://someWebsite.com/foldername/schemaFile")]&lt;br /&gt;public string zipCode = string.Empty;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-8041766661767961116?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/8041766661767961116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/08/how-todeserialize-xml-with-namespace.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/8041766661767961116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/8041766661767961116'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/08/how-todeserialize-xml-with-namespace.html' title='How to:Deserialize XML with Namespace and no proper Schema(XSD)'/><author><name>WinBros</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-1747922403984523201.post-8189665506839471579</id><published>2009-08-12T14:55:00.000-07:00</published><updated>2009-08-12T15:23:42.255-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programatically writing XML Values and Retrieving it'/><title type='text'>Write the Values to XML element</title><content type='html'>Creates a XML From &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Dataset&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Populate the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;DataTable&lt;/span&gt; values from &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Storeproc&lt;/span&gt; &lt;/li&gt;&lt;li&gt;Serialize&lt;/li&gt;&lt;li&gt;Write to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;XMl&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Close the writing File&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Enter Values to XML&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Create a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;XmlElement&lt;/span&gt; as Root&lt;/li&gt;&lt;li&gt;Create a XmlElement below root&lt;/li&gt;&lt;li&gt;Create XmlText which will be the value for XmlElement&lt;/li&gt;&lt;li&gt;Append Child&lt;/li&gt;&lt;li&gt;Save the File&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Get the Element Value from XML&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Read the XML&lt;/li&gt;&lt;li&gt;Deserilize the object so XML values are now populated to the DataTable&lt;/li&gt;&lt;li&gt;Close the Read&lt;/li&gt;&lt;li&gt;Instantiate xmlDoc&lt;/li&gt;&lt;li&gt;Load it with the XML file&lt;/li&gt;&lt;li&gt;Create a Node&lt;/li&gt;&lt;li&gt;Goto the Node by using GetElementsByTagName("val1")[0];&lt;/li&gt;&lt;li&gt;Get the values of that node by xNode.InnerText&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;#region Create XML&lt;br /&gt;//Uncomment following lines to create XML&lt;br /&gt;&lt;br /&gt; int val1 =1; // Initialize to an appropriate value&lt;br /&gt;expected = className.FuncReturnsStoreProc(val1);&lt;br /&gt;////Serialization&lt;br /&gt;XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(expected.GetType());&lt;br /&gt;TextWriter  tw=new StreamWriter(strFilename);&lt;br /&gt;xs.Serialize(tw, expected);&lt;br /&gt;tw.Close();&lt;br /&gt;&lt;br /&gt;////Create Input values  to the XML Element&lt;br /&gt;&lt;br /&gt;XmlDocument xmlDoc = new XmlDocument();&lt;br /&gt;xmlDoc.Load(strFilename);&lt;br /&gt;if (File.Exists(strFilename))&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    XmlElement elmRoot = xmlDoc.DocumentElement;&lt;br /&gt;    elmRoot = xmlDoc.DocumentElement;&lt;br /&gt;&lt;br /&gt;    XmlElement elmVal = xmlDoc.CreateElement("val1");&lt;br /&gt;    XmlText valToXML = xmlDoc.CreateTextNode(val1.ToString());&lt;br /&gt;    elmRoot.AppendChild(elmVal);&lt;br /&gt;    elmRoot.LastChild.AppendChild(valToXML);&lt;br /&gt;&lt;br /&gt;    xmlDoc.Save(strFilename);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//Uncomment ends&lt;br /&gt;#endregion&lt;br /&gt;&lt;br /&gt;#region Get XML data&lt;br /&gt;&lt;br /&gt;//Deserialization&lt;br /&gt;XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(expected.GetType());&lt;br /&gt;TextReader tr = new StreamReader(strFilename);&lt;br /&gt;expected = (ObjectName)xs.Deserialize(tr); //Convert to the ObjectName&lt;br /&gt;tr.Close();&lt;br /&gt;&lt;br /&gt;//////Reads Input parameter and pass it to the actual&lt;br /&gt;int val1; //  Gets the Input parameter value from XML&lt;br /&gt;XmlDocument xmlDoc = new XmlDocument();&lt;br /&gt;xmlDoc.Load(strFilename);&lt;br /&gt;XmlNode xNode;&lt;br /&gt;xNode = xmlDoc.GetElementsByTagName("val1")[0];&lt;br /&gt;val1 = Convert.ToInt32(xNode.InnerText);&lt;br /&gt;&lt;br /&gt;#endregion&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Thanks :http://www.functionx.com/csharp/xml/Lesson03.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-8189665506839471579?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/8189665506839471579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/08/write-values-to-xml-element.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/8189665506839471579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/8189665506839471579'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/08/write-values-to-xml-element.html' title='Write the Values to XML element'/><author><name>WinBros</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-1747922403984523201.post-4733684899596467705</id><published>2009-08-12T12:46:00.000-07:00</published><updated>2009-08-12T14:22:52.910-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DataTable to XML and XML to DataTable'/><title type='text'>XML to DataTable and viceversa</title><content type='html'>If you want to get an XML data to Dataset you need following things&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;.xsd Xml schema file&lt;/li&gt;&lt;li&gt;.xml XML file&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;using System.Xml;&lt;br /&gt;string tableName = "tableName";&lt;br /&gt;string fileName = "fileName ";&lt;br /&gt;expected.TableName = tableName;&lt;br /&gt;expected.ReadXmlSchema("\\" + fileName + ".xsd");&lt;br /&gt;expected.ReadXml("\\" + fileName + ".xml");&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This wil create a XML and XSD file for DataTable values which is fetched from Database using storeproc.&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;&lt;br /&gt;  string tableName = "GetUsersBySalesOrg";&lt;br /&gt;  DataTable expected = new DataTable(); //Initialize to an appropriate value&lt;br /&gt;  expected = className.StoreProcReturnsDatatable(val1, val2);&lt;br /&gt;  expected.TableName = tableName;&lt;br /&gt;  expected.WriteXml("\\"+tableName+".xml");&lt;br /&gt;  expected.WriteXmlSchema("\\" + tableName + ".xsd");&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-4733684899596467705?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/4733684899596467705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/08/xml-to-datatable-and-viceversa.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/4733684899596467705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/4733684899596467705'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/08/xml-to-datatable-and-viceversa.html' title='XML to DataTable and viceversa'/><author><name>WinBros</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-1747922403984523201.post-5557656430897413370</id><published>2009-08-12T12:37:00.000-07:00</published><updated>2009-08-12T14:29:48.163-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual studio Test to NUnit'/><title type='text'>Convert Visual studio Test to NUnit</title><content type='html'>As per my previous post You can create a unit test using Visual studio 2008 now you want this test solution to run in Nunit GUI.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Uncomment using Microsoft.VisualStudio.TestTools.UnitTesting;&lt;/li&gt;&lt;li&gt;Add Reference nunit framework (install latest nunit ) dll will be here "C:\Program Files\NUnit 2.5.1\bin\net-2.0\nunit.framework.dll" framework to your test project&lt;/li&gt;&lt;li&gt;Add nunit reference using NUnit.Framework;&lt;/li&gt;&lt;li&gt;Change [TestMethod()] to [Test] &lt;/li&gt;&lt;li&gt;Change [TestClass()] to [TestFixture]&lt;/li&gt;&lt;li&gt;Comment function TestContext&lt;/li&gt;&lt;li&gt;Comment //private TestContext testContextInstance;&lt;/li&gt;&lt;li&gt;Build the solution open Nunit GUI -&gt;Open the testing project dll which is created&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Voila!! MS Test in Nunit&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-5557656430897413370?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/5557656430897413370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/08/convert-visual-studio-test-to-nunit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/5557656430897413370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/5557656430897413370'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/08/convert-visual-studio-test-to-nunit.html' title='Convert Visual studio Test to NUnit'/><author><name>WinBros</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-1747922403984523201.post-7337529145172848558</id><published>2009-08-12T12:11:00.000-07:00</published><updated>2009-08-12T12:36:55.856-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio Test Debugger'/><title type='text'>Visual Studio Unit test in fly</title><content type='html'>&lt;div&gt;&lt;strong&gt;Unit testing:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt;Visual Studio 2008 automatically generates test script for your project.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt;If you have any project which is free of errors and build successfully and you want to write a unit test for that,you can do that easily in Visual studio 2008. &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;ol&gt;&lt;li&gt;Add a New test project from the Solution (Right click on Solution-&gt;New Project)&lt;/li&gt;&lt;li&gt;Select Test project from Templates &lt;/li&gt;&lt;li&gt;or Right Click on the function which you want to write a test script-&gt;Select Create Unit tests.. It will display the Classes and below that all the functions associated to it.. Just select the functions you want to test and click Ok.&lt;/li&gt;&lt;li&gt;It will create a new File in the Test project with code for that functions.&lt;/li&gt;&lt;li&gt; Now Initialize an appropriate value for the expected and actual results. &lt;/li&gt;&lt;li&gt;Build the project and you can Debug only this particular function in the solution by placing the cursor on the function and click on Debug Tests in Current Contest button .&lt;/li&gt;&lt;/ol&gt;&lt;a href="http://3.bp.blogspot.com/_Ryu_S6dDAts/SoMZW7wWRaI/AAAAAAAALgI/d9a1Conov1M/s1600-h/testtools.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5369163062544057762" style="FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 104px" alt="" src="http://3.bp.blogspot.com/_Ryu_S6dDAts/SoMZW7wWRaI/AAAAAAAALgI/d9a1Conov1M/s320/testtools.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_Ryu_S6dDAts/SoMX5EL1GyI/AAAAAAAALf4/_coMKaF3IFE/s1600-h/testtools.jpg"&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_Ryu_S6dDAts/SoMYNqITAVI/AAAAAAAALgA/nvekJwj0e_Y/s1600-h/testtools.jpg"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-7337529145172848558?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/7337529145172848558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/08/visual-studio-unit-test-in-fly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/7337529145172848558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/7337529145172848558'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/08/visual-studio-unit-test-in-fly.html' title='Visual Studio Unit test in fly'/><author><name>WinBros</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://3.bp.blogspot.com/_Ryu_S6dDAts/SoMZW7wWRaI/AAAAAAAALgI/d9a1Conov1M/s72-c/testtools.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1747922403984523201.post-7160748427940459254</id><published>2009-08-12T11:46:00.001-07:00</published><updated>2009-08-12T12:08:13.433-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Automatic Loging in Webpage without clicking Login button'/><title type='text'>Javascript to Login a Webpage</title><content type='html'>If you have a username and password for a webpage and you want to login the website without clicking login button.&lt;br /&gt;&lt;br /&gt;Small Hack:&lt;br /&gt;&lt;pre class="postcode"&gt;&lt;br /&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;&lt;br /&gt;   document.forms[0]._some_junkvalues_txtLoginId.value = "username";&lt;br /&gt;   document.forms[0]._some_junkvalues_txtPassword.value = "password";&lt;br /&gt;   document.forms[0]._some_junkvalues_btnLogin.click();&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Goto the webpage right click -&gt;View Source -&gt;search for txt box which accepts login &amp;amp; password,usually these id's are preceded with "_" values so copy that and paste it in your script.&lt;br /&gt;Same do a search for login button and use click() function to activate login button event.&lt;br /&gt;&lt;br /&gt;Here document.form[0].submit; wont work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-7160748427940459254?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/7160748427940459254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/08/javascript-to-login-webpage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/7160748427940459254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/7160748427940459254'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/08/javascript-to-login-webpage.html' title='Javascript to Login a Webpage'/><author><name>WinBros</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-1747922403984523201.post-8166487458569973372</id><published>2009-08-12T09:33:00.000-07:00</published><updated>2009-08-12T14:15:52.588-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HowTo Post Codes in blog'/><title type='text'>Post Codes in blog</title><content type='html'>&lt;strong&gt;Thanks &lt;/strong&gt;&lt;a href="http://thoughtsomething.blogspot.com/2008/11/display-html-javascript-code-in-blogger.html"&gt;http://thoughtsomething.blogspot.com/2008/11/display-html-javascript-code-in-blogger.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Edit the Blog Layout-&gt;Edit HTML-&gt;IN the Edit Template add this CSS and add the code as HTML&lt;br /&gt;&lt;br /&gt;In CSS:&lt;br /&gt;&lt;br /&gt;.postCode{ background:lightyellow none repeat scroll 0 0; border:1px inset orange; height:150px; margin:10px; overflow:auto; padding:6px; text-align:left;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now Goto your post and EditHTML add this with your code&lt;br /&gt;&lt;pre class="postcode"&gt;&lt;br /&gt;&amp;lt;pre class="postCode"&amp;gt;&lt;br /&gt;YOUR CODE&lt;br /&gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-8166487458569973372?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/8166487458569973372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/08/post-codes-in-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/8166487458569973372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/8166487458569973372'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/08/post-codes-in-blog.html' title='Post Codes in blog'/><author><name>WinBros</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-1747922403984523201.post-1936728542402760252</id><published>2009-08-12T09:15:00.000-07:00</published><updated>2009-08-12T11:42:56.166-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='using statement in .net'/><title type='text'>Using statement .NET</title><content type='html'>Whoever working in C# come across using Directive using System ;&lt;br /&gt;What about using Statement ? what it does is...&lt;br /&gt;&lt;br /&gt;The using statement ensures that Dispose is called even if an exception occurs while you are calling methods on the object&lt;br /&gt;&lt;br /&gt;You can achieve the same result by putting the object inside a try block and then calling Dispose in a finally block; in fact, this is how the using statement is translated by the compiler.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;  Font font1 = new Font("Arial", 10.0f);&lt;br /&gt;  try&lt;br /&gt;  {&lt;br /&gt;    byte charset = font1.GdiCharSet;&lt;br /&gt;  }&lt;br /&gt;  finally&lt;br /&gt;  {&lt;br /&gt;    if (font1 != null)&lt;br /&gt;      ((IDisposable)font1).Dispose();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;strong&gt;Solution:You can use like this&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;using (Font font1 = new Font("Arial", 10.0f))&lt;br /&gt;{&lt;br /&gt;    byte charset = font1.GdiCharSet;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Thanks:MSDN&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/yh598w02.aspx"&gt;http://msdn.microsoft.com/en-us/library/yh598w02.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-1936728542402760252?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/1936728542402760252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/08/using-statement-net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/1936728542402760252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/1936728542402760252'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/08/using-statement-net.html' title='Using statement .NET'/><author><name>WinBros</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-1747922403984523201.post-1157415809284936840</id><published>2009-08-12T09:05:00.000-07:00</published><updated>2009-08-12T11:42:24.765-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Deserializing XML to object'/><title type='text'>{"There is no Unicode byte order mark. Cannot switch to Unicode."}</title><content type='html'>If you have an XML with encoding="utf-16" trying to deserialize it using MemoryStream&lt;br /&gt;Encoding.ASCII it will throw this error=&gt;{"There is no Unicode byte order mark. Cannot switch to Unicode."}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;                                                           &lt;br /&gt;public static T DeserializeObject&lt;t&gt;(string xml)                                 &lt;br /&gt;{                                                                                &lt;br /&gt;   using (TextReader reader = new StringReader(xml))                             &lt;br /&gt;   {                                                                             &lt;br /&gt;       XmlSerializer xs = new XmlSerializer(typeof(T));                          &lt;br /&gt;       return (T)xs.Deserialize(reader);                                         &lt;br /&gt;   }                                                                             &lt;br /&gt;}                                                                                &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Deserialize XML to object which has encoding ="utf-8"&lt;br /&gt;&lt;br /&gt;&lt;pre class="postCode"&gt;                                                           &lt;br /&gt;public static T DeserializeObject&lt;t&gt;(string xml)                                 &lt;br /&gt;{                                                                                &lt;br /&gt;    XmlSerializer xs = new XmlSerializer(typeof(T));                             &lt;br /&gt;    MemoryStream memoryStream = new MemoryStream(StringToASCIIByteArray(xml));   &lt;br /&gt;    XmlTextWriter xmlTextWriter = new XmlTextWriter(memoryStream, Encoding.ASCII);&lt;br /&gt;    return (T)xs.Deserialize(memoryStream);                                      &lt;br /&gt;}                                                                                &lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1747922403984523201-1157415809284936840?l=dothiscode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dothiscode.blogspot.com/feeds/1157415809284936840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dothiscode.blogspot.com/2009/08/there-is-no-unicode-byte-order-mark.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/1157415809284936840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1747922403984523201/posts/default/1157415809284936840'/><link rel='alternate' type='text/html' href='http://dothiscode.blogspot.com/2009/08/there-is-no-unicode-byte-order-mark.html' title='{&quot;There is no Unicode byte order mark. Cannot switch to Unicode.&quot;}'/><author><name>WinBros</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>
