<?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-6415357984415247598</id><updated>2012-02-02T08:11:50.486+03:30</updated><category term='SharePoint'/><category term='SharePoint 2010 Error'/><category term='Misc'/><category term='Windows Forms'/><category term='Sharepoint Persian Calendar'/><category term='.NET Framework'/><category term='Security'/><category term='Distributed Application'/><category term='Software Development'/><category term='Training Videos'/><category term='ASP .NET'/><title type='text'>C# Tuning</title><subtitle type='html'>Tune your C# knowledge. Masoud Tabatabaei 's daily note about .NET</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>65</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-4395303181054545018</id><published>2011-05-07T14:42:00.000+04:30</published><updated>2011-05-07T14:42:38.396+04:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Error'/><title type='text'>Specified value is not supported for the parameter.</title><content type='html'>&lt;span style="font-size: small;"&gt;Yesterday I was trying to create a new web application in SharePoint 2010 and I got this error:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;"Specified value is not supported for the parameter."&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;I was wondering which parameter is talking about, I tried to check my values in "Create new web application page but  every thing seems to be OK. So, I just looked in Event Log to see is there any other information that I can find and result was No, Nothing!! &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Finally I just tried to search for it in web and thanks to google and&lt;span class="Apple-style-span" style="border-collapse: separate; color: black; font-family: 'Times New Roman'; 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="font-family: Georgia,'Times New Roman',Times,serif; line-height: 18px; text-align: left;"&gt; &lt;b&gt;&lt;a href="http://www.sathishtk.com/blog/"&gt;Sathish TK&lt;/a&gt;&lt;/b&gt; blog&lt;b&gt; &lt;/b&gt;&lt;a href="http://www.sathishtk.com/blog/post/2010/08/28/Error-Specified-value-is-not-supported-for-the-parameter-error-when-creating-web-apps.aspx"&gt;post&lt;/a&gt; I got the reason: "SharePoint actually checks whether the machine (user account too) is connected to the domain before these actions are completed. This happens to machines that are part of the domain during SharePoint install and configuration."&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: black; font-family: 'Times New Roman'; 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="font-family: Georgia,'Times New Roman',Times,serif; line-height: 18px; text-align: left;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-4395303181054545018?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/4395303181054545018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=4395303181054545018&amp;isPopup=true' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4395303181054545018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4395303181054545018'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2011/05/specified-value-is-not-supported-for.html' title='Specified value is not supported for the parameter.'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-2438923757635695313</id><published>2010-08-28T21:31:00.002+04:30</published><updated>2010-09-13T09:26:46.222+04:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint Persian Calendar'/><title type='text'>SharePoint 2010 Persian Calendar</title><content type='html'>&lt;div dir="ltr"&gt;&lt;div style="direction: ltr;"&gt;Every one who is interested in Microsoft SharePoint 2010 Persian Calendar can have now!&lt;/div&gt;&lt;div style="direction: ltr;"&gt;Finally Honopardaz development team&amp;nbsp;successfully&amp;nbsp;developed Persian Calendar for SharePoint 2010. The final tests are done and its ready to be published for people who need Jalali Calendar on SharePoint.&lt;/div&gt;&lt;div style="direction: ltr;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="direction: ltr;"&gt;You can find some screen shot at &lt;a href="http://www.honopardaz.com/Products/SharePoint2010PersianCalendar.aspx"&gt;Honopardaz &lt;/a&gt;official &lt;a href="http://www.honopardaz.com/"&gt;website&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a href="http://www.sharepoint2007.ir/"&gt;http://www.sharepoint2007.ir&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-2438923757635695313?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/2438923757635695313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=2438923757635695313&amp;isPopup=true' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/2438923757635695313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/2438923757635695313'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2010/08/sharepoint-2010-persian-calendar.html' title='SharePoint 2010 Persian Calendar'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-7494477595631696785</id><published>2010-06-20T09:12:00.001+04:30</published><updated>2010-06-20T09:12:23.458+04:30</updated><title type='text'>Installing SharePoint 2010 on Windows 7</title><content type='html'>&lt;div dir="ltr"&gt;&lt;div&gt;A great post from &lt;strong&gt;&lt;a href="http://blogs.technet.com/b/dahnesh/archive/2010/06/19/setting-up-sharepoint-2010-on-windows-7.aspx"&gt;Dahnesh&amp;#39;s Blog&lt;/a&gt;.&lt;/strong&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;Some of you may want to install SharePoint 2010 or SharePoint 2010 Foundation on Windows 7 for development and testing purposes. I have also managed to do so and thought I would quickly share some of the key steps for this setup.&lt;/div&gt;  &lt;p&gt;Firstly, the article I referred to for this setup is &lt;a href="http://msdn.microsoft.com/en-us/library/ee554869.aspx" target="_blank"&gt;&lt;font color="#ff8000"&gt;here&lt;/font&gt;&lt;/a&gt; and here are the steps I followed:&lt;/p&gt; &lt;p&gt;1. Ensure that you have Windows 7 x64 edition and SQL Server 2008 R2 x64 installed on your . The SQL Server 2008 R2 installation can be the Developer Edition or the Express Edition, whichever is relevant in your case.&lt;/p&gt;  &lt;p&gt;2. Copy all the SharePoint setup files to c:\sharepointfiles folder and then open the config.xml file from c:\sharepointfiles\files\setup using notepad. In this file, add the following line&lt;/p&gt; &lt;p&gt;&lt;font color="#0000ff"&gt;&amp;lt;Setting Id=&amp;quot;AllowWindowsClientInstall&amp;quot; Value=&amp;quot;True&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;Ensure that you add this line anywhere between &amp;lt;Configuration&amp;gt; and &amp;lt;/Configuration&amp;gt; tags. Save the file after you add this line.&lt;/p&gt; &lt;p&gt;3. Install the following components&lt;/p&gt; &lt;p&gt;    a. Windows Identity Foundation (&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=eb9c345f-e830-40b8-a5fe-ae7a864c4d76&amp;amp;displaylang=en" target="_blank"&gt;&lt;font color="#ff8000"&gt;Click Here&lt;/font&gt;&lt;/a&gt;) – Install the "Windows6.1-KB974405-x64.msu" file&lt;/p&gt;  &lt;p&gt;    b. Chart Controls (&lt;a href="http://go.microsoft.com/fwlink/?LinkID=122517" target="_blank"&gt;&lt;font color="#ff8000"&gt;Click Here&lt;/font&gt;&lt;/a&gt;) – not required if you're planning to install SharePoint 2010 Foundation&lt;/p&gt; &lt;p&gt;4. Install the required "Windows Features" by pasting the following text in the command prompt and then press &amp;quot;Enter" (ensure that this is a single line, no breaks) – better way is to paste this in notepad and ensure that "word wrap" is off and then paste this into the command prompt.&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ManagementScriptingTools;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;WCF-NonHTTP-Activation&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;5. You can now run the Setup.exe from the SharePoint installation files and proceed as a normal installation&lt;/p&gt; &lt;p&gt;You can also refer to the article I mentioned earlier (&lt;a href="http://msdn.microsoft.com/en-us/library/ee554869.aspx" target="_blank"&gt;&lt;font color="#ff8000"&gt;here&lt;/font&gt;&lt;/a&gt;) from which I have successfully installed SharePoint 2010 and SharePoint 2010 Foundation on Windows 7 x64 (Enterprise Edition).&lt;/p&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-7494477595631696785?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/7494477595631696785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=7494477595631696785&amp;isPopup=true' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/7494477595631696785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/7494477595631696785'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2010/06/installing-sharepoint-2010-on-windows-7.html' title='Installing SharePoint 2010 on Windows 7'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-7213778299593090402</id><published>2010-06-18T11:16:00.001+04:30</published><updated>2010-06-18T11:16:54.219+04:30</updated><title type='text'>Visual Studio 2010 SharePoint Power Tools</title><content type='html'>&lt;div dir="ltr"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; color: rgb(42, 42, 42); "&gt;&lt;p style="line-height: 1.5em; margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt; &lt;span&gt;&lt;span&gt;The Visual Studio team that brought you the SharePoint developer tools in Visual Studio 2010 is happy to announce we have created a set of power tools that make developing SharePoint 2010 sandboxed solutions even easier.  Below is the list of features included in the current release of the power tools.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="line-height: 1.5em; margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;b&gt;Sandboxed-compatible Visual Web Part &lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 1.5em; margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span&gt;&lt;span&gt;This item template enables you to use a visual designer to create SharePoint web parts that can be deployed in a SharePoint 2010 sandboxed solution.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="line-height: 1.5em; margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;b&gt;Sandboxed Compilation &lt;/b&gt;&lt;/p&gt;&lt;p style="line-height: 1.5em; margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt; &lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;This extension displays build errors when you use types or members in a SharePoint 2010 sandboxed project which are not allowed in the SharePoint sandbox environment.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 1.5em; margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;&lt;span&gt;&lt;span&gt;The &lt;span&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/en-us/8e602a8c-6714-4549-9e95-f3700344b0d9" style="font-weight: bold; text-decoration: none; color: rgb(201, 116, 10); "&gt;Visual Studio 2010 SharePoint Power Tools&lt;/a&gt;&lt;/span&gt; are available immediately on the Visual Studio Gallery.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;/span&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-7213778299593090402?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/7213778299593090402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=7213778299593090402&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/7213778299593090402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/7213778299593090402'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2010/06/visual-studio-2010-sharepoint-power.html' title='Visual Studio 2010 SharePoint Power Tools'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-6243775985011610433</id><published>2010-06-18T11:13:00.001+04:30</published><updated>2010-06-18T11:13:47.324+04:30</updated><title type='text'>VSeWSS Import Tool for Visual Studio 2010</title><content type='html'>&lt;div dir="ltr"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, Arial, Tahoma, sans-serif; font-size: 12px; color: rgb(34, 34, 34); line-height: 15px; "&gt;&lt;p style="line-height: 20px !important; margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 12px; "&gt; SharePoint VSeWSS Import tool is an add-in to Visual Studio 2010 and it adds a new SharePoint project template for importing a VSeWSS project. &amp;quot;VSeWSS or Visual Studio 2008 extensions for Windows SharePoint Services are Microsoft tools for creating SharePoint 2007 projects on VS2008. In VS2010 we&amp;#39;ve built in tools for creating SharePoint 2010 projects. This import tool takes a VSeWSS project that&amp;#39;s targetted at SharePoint 2007 and migrates it to VS2010 where it&amp;#39;s targetted at SharePoint 2010.&lt;/p&gt; &lt;p style="line-height: 20px !important; margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 12px; "&gt; The import tool is distributed as source code so you&amp;#39;ll need to compile it before using it. There&amp;#39;s a batch file provided for this and you just need VS2010 installed and to run batch file. The import tool works at the project level, not the solution level. So if you&amp;#39;ve a solution with multiple projects you&amp;#39;ll need to import them one by one and get them all going,&amp;quot; revealed Microsoft.&lt;/p&gt; &lt;p style="line-height: 20px !important; margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 12px; "&gt; &lt;b&gt;More info and download Url: &lt;span class="Apple-style-span" style="font-weight: normal; line-height: 15px; "&gt;&lt;a href="http://code.msdn.microsoft.com/VSeWSSImport"&gt;http://code.msdn.microsoft.com/VSeWSSImport&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;/span&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-6243775985011610433?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/6243775985011610433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=6243775985011610433&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6243775985011610433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6243775985011610433'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2010/06/vsewss-import-tool-for-visual-studio.html' title='VSeWSS Import Tool for Visual Studio 2010'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-5163611071339846204</id><published>2010-06-05T11:50:00.001+04:30</published><updated>2010-06-05T11:50:54.149+04:30</updated><title type='text'>Microsoft Sharepoint – Benefits For A Sharepoint Developer</title><content type='html'>&lt;div dir="ltr"&gt;&lt;span class="Apple-style-span" style="font-family: &amp;#39;Lucida Grande&amp;#39;, Verdana, Arial, sans-serif; font-size: 12px; color: rgb(51, 51, 51); line-height: 16px; "&gt;&lt;p style="font-size: 1.05em; "&gt;Sharepoint developers today have a vast choice of applications to choose from. One of the best options though is Microsoft Sharepoint. This application has helped Sharepoint developers perform tasks easily and at a much more reasonable cost as the time involvement is also reduced. Microsoft SharePoint helps SharePoint developers to perform tasks related to business applications, corporate search engines, content management systems and business intelligence tools. This application not only helps a Sharepoint developer; but also creates websites and manages web contents. Sharepoint developers can now develop programs for organization to perform across several locations at one place. This can provide a systematic workflow and help organizations perform better. Sharepoint developers can also help employees in an organization share and work together on documents with the help of Microsoft Sharepoint. This application also provides Sharepoint developer's useful business intelligence tools which they can put to use at various levels. The application is very compactable and Sharepoint developers have no problem in interagrating them with Microsoft products such as office, excel, exchange and internet explorer. This helps Sharepoint developers take the concept of the web to a total new level.&lt;/p&gt; &lt;p style="font-size: 1.05em; "&gt;Microsoft Sharepoint has taken Sharepoint development to a whole new level and increased the potential of Sharepoint developers. With the increase of Sharepoint taking over almost all industries in the market today; the application has been very popular among Sharepoint developers and has also generated major revenues.&lt;/p&gt; &lt;p style="font-size: 1.05em; "&gt;Sharepoint developers now prefer the Microsoft application as this is gaining huge popularity with all industries. Some famous applications Sharepoint developers have created with the application include Congos which is a business intelligence software maker.&lt;/p&gt; &lt;p style="font-size: 1.05em; "&gt;This application also has a major scope for improvement and can add some enhancements to it. Sharepoint developers are growing as the Sharepoint market is growing tremendously across the World Wide Web. Sharepoint looks very promising and with applications like Microsoft Sharepoint; Sharepoint developers are beginning to get more and more in demand. SharePoint developers can change the traditional methods into more contemporary and friendly methods due to the help given by Microsoft to SharePoint.&lt;/p&gt; &lt;/span&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-5163611071339846204?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/5163611071339846204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=5163611071339846204&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/5163611071339846204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/5163611071339846204'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2010/06/microsoft-sharepoint-benefits-for.html' title='Microsoft Sharepoint – Benefits For A Sharepoint Developer'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-6897681224676832560</id><published>2010-06-04T14:02:00.001+04:30</published><updated>2010-06-04T14:02:03.690+04:30</updated><title type='text'>SharePoint Q&amp;A: Microsoft's Arpan Shah</title><content type='html'>&lt;div dir="ltr"&gt;Microsoft on May 12 released Office 2010 and SharePoint Server 2010. You can read the Visual Studio Magazine cover feature   &lt;a href="http://visualstudiomagazine.com/Articles/2010/06/01/Office-Alignment.aspx?Page=1" target="_blank"&gt;here&lt;/a&gt; . While the Office launch is certainly notable, the impact of SharePoint 2010 on .NET developers is potentially huge. The combination of Visual Studio 2010 (launched in April) and SharePoint 2010 has transformed SharePoint application development from an often-frustrating challenge into a first-class development experience. &lt;p&gt; &lt;/p&gt;   &lt;p&gt;Arpan Shah, director of SharePoint Tools and Technologies at Microsoft, talked with us about the new version and its impact on developers. You can find useful information about SharePoint 2010 training and resources in &lt;a href="http://blogs.msdn.com/b/arpans/archive/2010/05/15/sharepoint-2010-training-and-resources.aspx" target="_blank"&gt;this blog entry&lt;/a&gt; by Arpan Shah. For a bit more on the Office side of the launch, check out &lt;a href="http://blogs.msdn.com/b/johnrdurant/archive/2010/06/02/office-2010-amp-sharepoint-2010-platform-for-innovation.aspx" target="_blank"&gt;this blog entry&lt;/a&gt; from Microsoft Senior Product Manager John R. Durant.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Michael Desmond: Microsoft has admitted that it had work to do to get SharePoint-based development up to grade with other platforms. What in your mind were the most critical areas that needed to be addressed to make SharePoint developers first-class citizens in the .NET development space?&lt;/b&gt;&lt;br&gt; Arpan Shah: We've made a number of investments for SharePoint developers across the board. One I would call out is our SharePoint developer tools in Visual Studio 2010 that make it very easy for developers to code and debug SharePoint solutions quickly. In addition, we also support Windows Vista SP2 and Windows 7 as SharePoint development environments. These two investment areas plus many more really bring SharePoint development in line with the other types of .NET development, which is great for developers.&lt;/p&gt;      &lt;p&gt;&lt;b&gt;MD: I&amp;#39;ve heard lots of devs rave about two things that got fixed with Visual Studio 2010 and SharePoint 2010: The ability to develop on a Visual Studio workstation, and the addition of F5 build/debug/deploy. How difficult was it to enable these important capabilities with SharePoint 2010?&lt;/b&gt;&lt;br&gt; AS: We listened to our developer community and prioritized our engineering efforts to enable these key developer scenarios. Support for the Windows client as a developer environment was possible because of the similarity of the IIS codebase in Windows Vista SP2/Windows 7 and Windows Server. It's important to point out that there are limitations when developing on the Windows Client, so we recommend that developers use Windows Server for a full developer experience across all the SharePoint Server 2010 features. Support for Visual Studio 2010 SharePoint Developer Tools was possible because of the partnership with and hard work by the Visual Studio team.&lt;/p&gt;      &lt;p&gt;&lt;b&gt;MD: Business Connectivity Services are getting a lot of attention as a key ingredient in the SharePoint (and Office) update. Can you explain why SharePoint oriented developers might want to explore BCS more closely?&lt;/b&gt;&lt;br&gt; AS: Business Connectivity Services (BCS) really takes away the need to do a lot of the plumbing and heavy lifting a developer typically needs to do in order to integrate with another backend system. Developers can use BCS to connect SharePoint 2010 and Office 2010 to databases and/or other line of business (LOB) systems such as Microsoft CRM and SAP to surface data to end users. End users can read, edit and take the data offline. BCS connections can be set up declaratively through SharePoint Designer 2010 as well as developed in Visual Studio 2010.&lt;/p&gt;      &lt;p&gt;&lt;b&gt;MD: What are you hearing from .NET developers since SharePoint 2010 launched? Are you seeing SharePoint development shops moving immediately to Visual Studio 2010 and SharePoint 2010 in lockstep?&lt;/b&gt;&lt;br&gt; AS: We are receiving great feedback from the developer community. Visual Studio 2010 and SharePoint 2010 are helping SharePoint developers rapidly develop &amp;amp; debug SharePoint projects reducing overall time-to-market for their SharePoint solutions. With good developer training available, we're seeing SharePoint developers upgrade their SharePoint 2007 skills to SharePoint 2010. Many development shops are starting new projects with Visual Studio 2010 and SharePoint 2010 as well as working with their existing customers to upgrade them to SharePoint 2010 to take advantage of all the investments made.&lt;/p&gt;     &lt;p&gt;&lt;b&gt;MD: If you could do the whole SharePoint 2010 cycle over again, what one thing might you change and how?&lt;/b&gt;&lt;br&gt; AS: We have a really great tools story with Visual Studio 2010 and SharePoint 2010, and we know there is more we can do to build on that great experience. Looking back, I think we got the priorities right on what to do first, but it's hard not to look at the additional things we would like to have done and wonder what if. It just gives us more excitement about what will come next!&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://reddevnews.com/articles/2010/06/02/sharepoint-qa-arpan-shah.aspx"&gt;Redmond Developer News&lt;/a&gt;&lt;br&gt;&lt;/p&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-6897681224676832560?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/6897681224676832560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=6897681224676832560&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6897681224676832560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6897681224676832560'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2010/06/sharepoint-q-microsofts-arpan-shah.html' title='SharePoint Q&amp;A: Microsoft&apos;s Arpan Shah'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-6384080066539973919</id><published>2010-05-25T08:19:00.002+04:30</published><updated>2010-05-25T08:24:35.582+04:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><title type='text'>SharePoint 2010 – Top 10 Resources to get you started</title><content type='html'>&lt;div dir="ltr"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;With the official launch of SharePoint 2010 last week, we thought now would be a perfect time for us to share some resources to help you to get started evaluating and learning about the new release.&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;This post contains links to download evaluation software, guides, demo virtual machines and lots more, for both Developers and IT Professionals.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;1. Check out the Office 2010 &amp;amp; SharePoint 2010 Launch&amp;nbsp;&lt;a href="http://sharepoint.microsoft.com/2010launch/en-us/Pages/home.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;Keynote and on-demand sessions&lt;/a&gt;, and the&amp;nbsp;&lt;a href="http://sharepoint.microsoft.com/en-us/Pages/default.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;SharePoint 2010 Product Site&lt;/a&gt;&amp;nbsp;on Microsoft.com&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;2. Download the&amp;nbsp;&lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=d2376ad6-46a3-481e-8813-b7a0f779fa89" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;SharePoint 2010 Overview Evaluation Guide&lt;/a&gt;, the&amp;nbsp;&lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=cffb14e8-88a9-43bd-87aa-4792ab60d320" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;SharePoint 2010 Professional Developer Evaluation Guide&lt;/a&gt;&amp;nbsp;and the&amp;nbsp;&lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=110318ec-0238-4811-8fc7-ec4399d3c100" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;SharePoint 2010 IT Professionals Evaluation Guide&lt;/a&gt;&amp;nbsp;to quickly ramp up on platform updates and additions.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;3. Check out the learning plans for&amp;nbsp;&lt;a href="http://sharepoint.microsoft.com/en-us/resources/Pages/IT-Pro-Training-Guide.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;IT Professionals&lt;/a&gt;,&amp;nbsp;&lt;a href="http://sharepoint.microsoft.com/en-us/resources/Pages/Developer-Training-Guide.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;Developers&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://sharepoint.microsoft.com/en-us/resources/Pages/End-User-Training-Guide.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;End Users&lt;/a&gt;&amp;nbsp;and get started on your SharePoint 2010 learning plan.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;4. Download the pre-configured Hyper-V&amp;nbsp;&lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=751fa0d1-356c-4002-9c60-d539896c66ce" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;SharePoint 2010 Evaluation and Demo Virtual Machine&lt;/a&gt;&amp;nbsp;(~1.8GB) along with the&amp;nbsp;&lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=8c619bef-008b-4af2-9687-8a05848fea97" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;SharePoint 2010 Walkthrough Guide&lt;/a&gt;&amp;nbsp;for a chance to get hands on with SharePoint 2010 with zero set up and configuration.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;5. Download 180 day trial versions of;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=43162af5-5b7b-40e0-b879-a77dac8f58bc" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"&gt;SharePoint Server 2010&lt;/a&gt;,&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/evalcenter/ee424282.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"&gt;FAST Search Server 2010 for SharePoint&lt;/a&gt;,&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/evalcenter/ee390818.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"&gt;Office Professional Plus 2010&lt;/a&gt;,&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/evalcenter/dd459137.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"&gt;Windows Server 2008 R2&lt;/a&gt;,&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/evalcenter/ee315247.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"&gt;SQL Server 2008 R2&lt;/a&gt;&amp;nbsp;to install and evaluate SharePoint 2010 yourself, and while you're downloading stuff here's some links to the full versions of;&amp;nbsp;&lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=944d282d-f8f8-46fb-b951-fc650a384462" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"&gt;SharePoint Foundation 2010&lt;/a&gt;,&amp;nbsp;&lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=cea31a4f-a8b4-4864-b520-be612becdcfa" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"&gt;Search Server Express 2010&lt;/a&gt;,&amp;nbsp;&lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=d88a1505-849b-4587-b854-a7054ee28d66" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"&gt;SharePoint Designer 2010&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;6. Watch the&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/sharepoint/ee518660.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;Getting Started with SharePoint 2010 for IT Professionals&lt;/a&gt;&amp;nbsp;video series and the&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/sharepoint/ee513148.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;Getting Started with SharePoint 2010 for Professional Developers&lt;/a&gt;&amp;nbsp;video series to get bite-sized video overviews of some of new and updated features.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;7. Do the self paced&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/virtuallabs/bb512933.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;IT Professional hosted virtual hands-on-labs&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/cc707678.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;Developer hosted virtual hands-on-labs&lt;/a&gt;&amp;nbsp;to get hands-on with SharePoint 2010 through a series of scripted tutorials, and if you want more, then download and install&amp;nbsp;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=C010FC68-B47F-4DB6-B8A8-AD4BA33A35C5&amp;amp;displaylang=en" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;10 getting started Developer Hands-on-labs&lt;/a&gt;.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;8. Discover what's new for end users with&amp;nbsp;&lt;a href="http://office2010.microsoft.com/en-us/sharepoint-server-help/getting-started-with-sharepoint-server-2010-HA010371435.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;Getting started with SharePoint 2010 guides&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://office2010.microsoft.com/en-us/sharepoint-server-help/take-sharepoint-server-2010-training-at-your-desk-HA101859255.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;Take SharePoint Server 2010 training at your desk&lt;/a&gt;.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;9. Visit the&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/sharepoint/ee410529.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;TechNet&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/sharepoint/default.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;MSDN&lt;/a&gt;&amp;nbsp;SharePoint 2010 sites for a wealth of technical reference documentation and prescriptive guidance through our categorized resource centers, such as the&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/sharepoint/ee518643.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;Installation and Deployment&lt;/a&gt;&amp;nbsp;Resource Center to learn how to plan, install and configure SharePoint 2010 and the&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/sharepoint/ee517214.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;Upgrade and Migration&lt;/a&gt;&amp;nbsp;Resource Center for the latest guidance and best practices for upgrading to SharePoint 2010.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;10. Got questions?&amp;nbsp; Search for an answer, or ask the community in the official Microsoft&amp;nbsp;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/category/sharepoint2010" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;SharePoint 2010 Forums&lt;/a&gt;.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;&amp;nbsp;&lt;strong&gt;Already a SharePoint 2007 expert?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;Check out the free advanced training content for IT Professionals and Developers looking to upgrade their skills from SharePoint Server 2007 to SharePoint 2010.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;We've got 36 modules of self paced&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/sharepoint/ff420396.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;IT Professional Advanced Training&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/sharepoint/ff420377.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;Developer Advanced Training&lt;/a&gt;&amp;nbsp;that includes audio and video recordings.&amp;nbsp; We'll also be adding 24 hosted virtual hands-on-labs in the very near future to accompany the training content –&amp;nbsp;&lt;strong&gt;All for FREE and on demand.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;&lt;strong&gt;Want to get certified on SharePoint 2010?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;Take a look at the&amp;nbsp;&lt;a href="http://www.microsoft.com/learning/en/us/training/sharepoint.aspx" style="color: #006bad; font-weight: bold; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;" target="_blank"&gt;Microsoft Learning SharePoint 2010 Training Portal&lt;/a&gt;&amp;nbsp;for information and expected availability dates for SharePoint 2010 Certification, Classroom training, E-Learning, MS Press books and Learning Snacks.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 12px; padding-bottom: 0px;"&gt;Original Post in SharePoint Team Blog:&amp;nbsp;&lt;a href="http://blogs.msdn.com/b/sharepoint/archive/2010/05/21/sharepoint-2010-top-10-resources-to-get-you-started.aspx"&gt;http://blogs.msdn.com/b/sharepoint/archive/2010/05/21/sharepoint-2010-top-10-resources-to-get-you-started.aspx&lt;/a&gt;&lt;/div&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-6384080066539973919?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/6384080066539973919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=6384080066539973919&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6384080066539973919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6384080066539973919'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2010/05/sharepoint-2010-top-10-resources-to-get.html' title='SharePoint 2010 – Top 10 Resources to get you started'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-1577931795469138208</id><published>2010-05-20T13:16:00.002+04:30</published><updated>2010-05-25T08:23:42.806+04:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><title type='text'>SharePoint 2010 Products Documentation</title><content type='html'>&lt;div dir="ltr"&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 13px;"&gt;The SharePoint IT Pro content team announced the release of our&amp;nbsp;Launch documentation for SharePoint Server 2010 and SharePoint Foundation 2010! They have created several different types of content to help you plan, deploy, and administer both SharePoint Server and SharePoint Foundation.&lt;br /&gt;The&amp;nbsp;Launch content for both products can be found here:&lt;br /&gt;&lt;strong&gt;SharePoint Server 2010:&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/sharepoint/ee263917.aspx#tab=1" style="color: #0054a6;" target="_blank"&gt;SharePoint Server 2010 Tech Center&lt;/a&gt;&amp;nbsp;is a gateway into the IT Pro documentation for SharePoint Server 2010 and a location for RSS feeds of new content.&amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/sharepoint/ff465365.aspx" style="color: #0054a6;" target="_blank"&gt;Resource Centers&lt;/a&gt;&amp;nbsp;provide information across the product lifecycle for activities and solutions.&lt;/li&gt;&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc303422(office.14).aspx" style="color: #0054a6;" target="_blank"&gt;TechNet articles&lt;/a&gt;&amp;nbsp;are organized by the product lifecycle – evaluate, plan, deploy, operate, etc. Content includes a&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/library/cc262043(office.14).aspx" style="color: #0054a6;" target="_blank"&gt;newly published page&lt;/a&gt;&amp;nbsp;with an RSS feed, so you can keep up with what we've published, and a&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/library/ff627858(office.14).aspx" style="color: #0054a6;" target="_blank"&gt;roadmap to the content&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc262451(office.14).aspx" style="color: #0054a6;" target="_blank"&gt;Worksheets&lt;/a&gt;&amp;nbsp;are Microsoft Excel files that you can use to record information that you gather and decisions that you make as you plan your deployment of Microsoft SharePoint Server 2010.&lt;/li&gt;&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc263199(office.14).aspx" style="color: #0054a6;" target="_blank"&gt;Models&lt;/a&gt;&amp;nbsp;are poster-sized illustrations of Microsoft SharePoint Server 2010 architecture and concepts.&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;SharePoint Foundation 2010:&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/sharepoint/ee263910.aspx#tab=1" style="color: #0054a6;" target="_blank"&gt;SharePoint Foundation 2010 Tech Center&lt;/a&gt;&amp;nbsp;is a gateway into the IT Pro documentation for SharePoint Foundation 2010 and a location for RSS feeds of new content.&lt;/li&gt;&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/sharepoint/ff467946.aspx" style="color: #0054a6;" target="_blank"&gt;Resource Centers&lt;/a&gt;&amp;nbsp;provide information across the product lifecycle for activities and solutions.&lt;/li&gt;&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc288070(office.14).aspx" style="color: #0054a6;" target="_blank"&gt;TechNet articles&lt;/a&gt;&amp;nbsp;are organized by the product lifecycle – evaluate, plan, deploy, operate, etc. Content includes a&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/library/cc288223(office.14).aspx" style="color: #0054a6;" target="_blank"&gt;newly published page&lt;/a&gt;&amp;nbsp;with an RSS feed, so you can keep up with what we've published, and a&amp;nbsp;&lt;a href="http://technet.microsoft.com/en-us/library/ff627857(office.14).aspx" style="color: #0054a6;" target="_blank"&gt;roadmap to the content&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc288346(office.14).aspx" style="color: #0054a6;" target="_blank"&gt;Worksheets&lt;/a&gt;&amp;nbsp;are Microsoft Excel files that you can use to record information that you gather and decisions that you make as you plan your deployment of Microsoft SharePoint Foundation 2010.&lt;/li&gt;&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/ee806874(office.14).aspx" style="color: #0054a6;" target="_blank"&gt;Models&lt;/a&gt;&amp;nbsp;are poster-sized illustrations of Microsoft SharePoint Foundation 2010 architecture and concepts.&lt;/li&gt;&lt;/ul&gt;Be sure to check this space often as we highlight specific content that may be of interest to you and notify you of new content as it's published.&lt;br /&gt;P.S. – Be sure to also check out the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; &lt;a href="http://sharepoint.microsoft.com/2010launch/en-us/Pages/home.aspx?WT.mc_id=Technet" style="color: #0054a6;" target="_blank"&gt;SharePoint 2010 Virtual Launch Event&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://technet.microsoft.com/evalcenter/ee388573.aspx" style="color: #0054a6;" target="_blank"&gt;SharePoint Server 2010 Trial Download&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://technet.microsoft.com/evalcenter/ff381704.aspx" style="color: #0054a6;" target="_blank"&gt;SharePoint Foundation 2010 Trial Download&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://social.technet.microsoft.com/Forums/en-US/category/sharepoint2010" style="color: #0054a6;" target="_blank"&gt;SharePoint 2010 Forums&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-1577931795469138208?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/1577931795469138208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=1577931795469138208&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/1577931795469138208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/1577931795469138208'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2010/05/sharepoint-2010-products-documentation.html' title='SharePoint 2010 Products Documentation'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-1238321494001076947</id><published>2010-05-14T09:17:00.002+04:30</published><updated>2010-05-25T08:23:01.881+04:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><title type='text'>Microsoft Office 2010 and SharePoint 2010 Officially Launched</title><content type='html'>&lt;div dir="ltr"&gt;&lt;span class="Apple-style-span" style="color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 12px; line-height: 20px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 12px; line-height: 20px;"&gt;&lt;div style="margin-bottom: 1.667em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Microsoft [MSFT] has officially launched Microsoft Office 2010 along with SharePoint 2010, Visio 2010 and Project 2010 and made it available to business customers.&lt;/div&gt;&lt;div style="margin-bottom: 1.667em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;If you remember back a few weeks,&amp;nbsp;Office 2010&amp;nbsp;was first made available to MSDN and TechNet subscribers. This next phase moves one step closer to the full launch that will be see the 2010 product range launching June 15.&lt;/div&gt;&lt;div style="margin-bottom: 1.667em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Prices of Office 2010 and other software in the suite will range from $99 all the way up to $499 depending on which version of Office you choose.&lt;br /&gt;Updates included in Office 2010 include performance increases making features such as search a lot faster than previous versions. Also improvements to navigation functions have been included along with superior editing tools for video.&lt;/div&gt;&lt;div style="margin-bottom: 1.667em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b&gt;&lt;a href="http://blogs.msdn.com/sharepoint/"&gt;SharePoint Team Blog&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-1238321494001076947?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/1238321494001076947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=1238321494001076947&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/1238321494001076947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/1238321494001076947'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2010/05/microsoft-office-2010-and-sharepoint.html' title='Microsoft Office 2010 and SharePoint 2010 Officially Launched'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-998357797322922143</id><published>2009-06-03T10:19:00.000+04:30</published><updated>2009-06-03T10:19:20.693+04:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><title type='text'>Don't do that with SharePoint by Paul Galvin</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: arial; font-size: 12px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;We've all had flashbacks to our childhood when our mothers told us, "Don't do that, or you'll regret it." But then we went ahead and did it anyway, right? As children, we just didn't have the wisdom or foresight to trust that advice. Now that we're older and wiser, we can take those words to heart.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;Here are five "don't do that" tips for SharePoint that can save you hours of unnecessary re-work down the road. Not interested in following this advice? That's your decision, but don't say I didn't warn you.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;&lt;span class="textHighlite" style="color: #2b6495;"&gt;&lt;b&gt;NUMBER 1:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;Don't change the title on the core item content type.&lt;/b&gt;&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;SharePoint has a Title column on every custom list (FIGURE 1), and it's used throughout the environment. If you rename the Title to something like "organization," you will have the undesired consequence of changing it in more places than you had planned.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;&lt;b&gt;FIGURE 1 (click to enlarge)&lt;/b&gt;&lt;br /&gt;&lt;a href="http://media.techtarget.com/digitalguide/images/Misc/spe_Figure1.JPG" style="font-family: arial, verdana, helvetica; font-size: 12px; font-weight: normal;" target="_blank"&gt;&lt;img src="http://media.techtarget.com/digitalguide/images/Misc/spe_Figure1-sm.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;The problem will show itself very quickly—you'll probably receive phone calls from confused end users within the hour. It is difficult to fix and cannot be done out of the box. Share- Point recognizes the word&amp;nbsp;&lt;i&gt;Title&lt;/i&gt;, along with a number of other names, as being special. It will not let you create a column with that name, but it&lt;i&gt;will&lt;/i&gt;&amp;nbsp;let you change the existing core column.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;So you can rename the core Title column onMonday. But, when you realize your mistake on Tuesday, SharePoint won't let you fix the problem by setting the core column's name back to "Title" because "Title" is a reserved word. In other words, SharePoint allows you to enter a catch-22 situation and won't easily let you out.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;The solution is to use a third-party tool, such as one you'd find on Code- Plex, or to write some C# orVB.NET code and make the correction programmatically. The easiest thing, though, is to save yourself the trouble by never changing the Title column's name.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;&lt;span class="textHighlite" style="color: #2b6495;"&gt;&lt;b&gt;NUMBER 2:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;Beware of "publishing site" templates.&lt;/b&gt;&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;If you create a site based on a publishing site template, you cannot save that site as a template (FIGURE 2).&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;&lt;b&gt;FIGURE 2&lt;/b&gt;&lt;br /&gt;&lt;img src="http://media.techtarget.com/digitalguide/images/Misc/spe_Figure2.JPG" /&gt;&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;More than one SharePoint pro has set out to create the perfect custom template. They do everything the right way: They interview the users and work with them over a period of a week or two to design the ideal custom template. But when they create the site to use as a template, they hit a snag.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;Here's the problem: Everything looks perfect, but then you go to save your site as a template so you can reuse it, and can't do it.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;FIGURE 3A shows the look-and-feel options for a site based on a publishing template, and FIGURE 3B shows a site based on a collaboration template.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;&lt;b&gt;FIGURE 3A&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;img src="http://media.techtarget.com/digitalguide/images/Misc/spe_Figure3A.JPG" /&gt;&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;&lt;b&gt;FIGURE 3B (click to enlarge)&lt;/b&gt;&lt;br /&gt;&lt;img src="http://media.techtarget.com/digitalguide/images/Misc/spe_Figure3B.JPG" /&gt;&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;If you've done this to yourself, your best bet is to start over with a collaboration template. Consider using a blank template or possibly a team site template as your starting point. If you want or need publishing features in your custom template, enable them on your site, as shown in FIGURE 4.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;&lt;b&gt;FIGURE 4 (click to enlarge)&lt;/b&gt;&lt;br /&gt;&lt;a href="http://media.techtarget.com/digitalguide/images/Misc/spe_Figure4.JPG" style="font-family: arial, verdana, helvetica; font-size: 12px; font-weight: normal;" target="_blank"&gt;&lt;img src="http://media.techtarget.com/digitalguide/images/Misc/spe_Figure4-sm.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;&lt;span class="textHighlite" style="color: #2b6495;"&gt;&lt;b&gt;NUMBER 3:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;Don't define content types in the wrong place.&lt;/b&gt;&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;Content types fit within the site hierarchy of your sites. Consider the following hierarchy:&lt;/div&gt;&lt;blockquote&gt;Portal&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SubSite A&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SubSite AA&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SubSite AAA&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SubSite B&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SubSite BB&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SubSite C&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SubSite CC&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SubSite CCC&lt;/blockquote&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;If you define a site content type at "SubSite C," it will be available to Sub- Site CC and SubSite CCC. But it will not be available to SubSite A, SubSite B or their children. There is no easy way to move a Site Content Type around in the hierarchy. If you make this mistake, your only alternative is to delete the Content Type and recreate it at the right position in the hierarchy.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;Deleting a content type can be drastic and—very possibly—impossible as a practical matter. Once content such as documents orWeb pages use a Content Type, you cannot delete it. The most important lesson to draw here is that a well-thoughtout information architecture is vital for a healthy SharePoint environment.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;&lt;span class="textHighlite" style="color: #2b6495;"&gt;&lt;b&gt;NUMBER 4:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;Don't expect to rescue SharePoint Designer workflows.&lt;/b&gt;&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;SharePoint Designer is a friendly wizard that allows properly trained business analysts to create workflows. Companies leverage these workflows to solve a wide variety of business problems. But, a SharePoint Designer workflow has a major technical limitation that escapes the notice of many first-time SharePoint users: It is always tied to a specific list.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;Many times, organizations define multi-step workflows that solve business problems common to multiple teams and divisions within a company. Wouldn't it be great if you could design and implement a workflow in one list and then just drag and drop the workflow to another list in the environment? It might be, but you're out of luck.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;There are some highly technical methods to get around the reuse problem. But, the time required to create a technical solution is just not worth it.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;&lt;span class="textHighlite" style="color: #2b6495;"&gt;&lt;b&gt;NUMBER 5:&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&amp;nbsp;Workflow history is not an audit trail.&lt;/b&gt;&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;This is an insidious issue because you would never notice the problem until it's far too late. For example, an auditor is tapping you on the shoulder, asking you to demonstrate when a particular financial document was approved and by whom. You go to the workflow history and it's empty. Why? By default, SharePoint purges workflow history after 60 days.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;There are several ways to address this problem: You can disable the job that does the purging (FIGURE 5). You can change the purge interval using the stsadm command line program. Or you can write your own audit mechanism. SharePoint Designer can write critical auditable events to a custom list.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;&lt;b&gt;FIGURE 5 (click to enlarge)&lt;/b&gt;&lt;br /&gt;&lt;a href="http://media.techtarget.com/digitalguide/images/Misc/spe_Figure5.JPG" style="font-family: arial, verdana, helvetica; font-size: 12px; font-weight: normal;" target="_blank"&gt;&lt;img src="http://media.techtarget.com/digitalguide/images/Misc/spe_Figure5-sm.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;The best choice is to leverage builtin auditing, possibly with a third-party tool that specializes in audit reporting in a SharePoint environment.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;So there you have it. Now you know what not to do.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;Some of these SharePoint pitfalls are relatively easy to overcome, such as picking a publishing template as a base for your own custom templates. Others are not.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;And for those, you may have to start over. Use these tips to avoid these traps, and you'll have a more stable and productive experience with SharePoint.&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;&lt;/div&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;&lt;/div&gt;&lt;div style="border: dashed 1px black;padding:5px;color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;b&gt;&lt;span style="color: red;"&gt;Paul Galvin&lt;/span&gt;&lt;/b&gt;&amp;nbsp;is a Microsoft SharePoint MVP and a SharePoint solutions architect at EMC Corp. Galvin has worked in the IT industry for more than 15 years in such areas as software development, consulting and SharePoint solutions design, where he works with clients to create business solutions using the SharePoint platform. He contributes to the SharePoint community through MSDN forums and his blog at&amp;nbsp;&lt;a href="http://paulgalvin.spaces.live.com/" style="font-family: arial, verdana, helvetica; font-size: 12px; font-weight: normal;" target="_blank"&gt;http://paulgalvin.spaces.live.com&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px;"&gt;&lt;a href="http://searchwinit.techtarget.com/tip/0,289483,sid1_gci1353085_mem1,00.html"&gt;Original Post Link&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-998357797322922143?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/998357797322922143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=998357797322922143&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/998357797322922143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/998357797322922143'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2009/06/dont-do-that-with-sharepoint-by-paul.html' title='Don&apos;t do that with SharePoint by Paul Galvin'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-4778285903795602335</id><published>2009-06-01T11:06:00.002+04:30</published><updated>2009-06-01T11:16:31.307+04:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><title type='text'>Study recommendations for Sharepoint Exam (70-542)</title><content type='html'>&lt;div dir="ltr"&gt;&lt;span style="color: #333333; font-family: Georgia;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: Georgia;"&gt;&lt;h3 style="color: #cc6600; font-size: 140%; font-weight: normal; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="color: #333333; font-size: 13px; line-height: 20px;"&gt;&lt;a href="http://paulgalvin.spaces.live.com/default.aspx" style="color: #5588aa; text-decoration: none;" target="_blank"&gt;Paul Galvin&lt;/a&gt;&amp;nbsp;has prepared a nice &lt;a href="http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!192.entry" target="_blank"&gt;list of links&lt;/a&gt; which is quite useful in preparing for Sharepoint certification exam (70-542 Microsoft Office SharePoint Server 2007 - Application Development).&lt;/span&gt;&lt;/h3&gt;&lt;h3 style="font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 13px; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style="font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.25em; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 13px; line-height: 20px;"&gt;&lt;a href="http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!192.entry" target="_blank"&gt;http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!192.entry&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/h3&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-4778285903795602335?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/4778285903795602335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=4778285903795602335&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4778285903795602335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4778285903795602335'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2009/06/study-recommendations-for-sharepoint.html' title='Study recommendations for Sharepoint Exam (70-542)'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-6116461316842120757</id><published>2009-05-26T09:36:00.002+04:30</published><updated>2009-05-26T09:48:05.633+04:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><title type='text'>Working With the ANTS Profiler to Optimize SharePoint by Shereen  Qumsieh</title><content type='html'>&lt;div dir="ltr"&gt;&lt;span style="color: #333333; line-height: 17px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333; line-height: 17px;"&gt;&lt;h1 style="font-family: 'Times New Roman', Times, serif; font-size: 145%; margin-left: 0px;"&gt;Background&lt;/h1&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;Before I get into any detail about this particular problem and its eventual resolution, it might be helpful to provide a little background information about why we're doing this and how we got here.&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;&lt;b&gt;Windows SharePoint Services 3.0&lt;/b&gt;&amp;nbsp;(WSS 3.0) provides a very extensible solution platform for the professional Microsoft .NET developer and is becoming increasingly more popular among companies looking to build collaboration and workflow into their environment.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;I have been working on a project for the past couple of weeks that consists of a Windows SharePoint Services 3.0 small server infrastructure and several custom application pages written in &lt;a href="http://asp.net/"&gt;ASP.NET&lt;/a&gt; C# via the SharePoint Object Model.&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;The focus of this post will be a small subset of what has been built to date. We'll call this piece the&amp;nbsp;&lt;b&gt;Master Data List&lt;/b&gt;. This&amp;nbsp;&lt;b&gt;Master Data List&lt;/b&gt;&amp;nbsp;was created as a standard&amp;nbsp;&lt;b&gt;Custom List&lt;/b&gt;&amp;nbsp;in SharePoint with several new columns created for the purposes of collecting data relevant to active projects for this department. It was decided early on that the standard&amp;nbsp;&lt;b&gt;newform.aspx&lt;/b&gt;,&amp;nbsp;&lt;b&gt;editform.aspx&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;dispform.aspx&lt;/b&gt;&amp;nbsp;pages that come by default with the instantiation of a new list were not going to be sufficient for the purposes of this list. There were several reasons for this:&lt;/div&gt;&lt;ul&gt;&lt;li style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;"&gt;&lt;br /&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;We wanted to dramatically change the layout of the page, including background colors on specific sections, fonts, hyperlinks etc.&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;"&gt; &lt;br /&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;We wanted complete controls over the types of validation we were doing&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;"&gt; &lt;br /&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;The page itself was to consist of some aggregated data, in the form of drop downs and data grids, that was being pulled from several different lists within the same site and presented on the&amp;nbsp;&lt;b&gt;editform.aspx&lt;/b&gt;and&amp;nbsp;&lt;b&gt;dispform.aspx&lt;/b&gt;&amp;nbsp;pages&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h1 style="font-family: 'Times New Roman', Times, serif; font-size: 145%; margin-left: 0px;"&gt;Problem&lt;/h1&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;Because of the complexity of these pages and the amount of aggregation we were doing, the average loading time for the edit and display forms was about 30 seconds (give or take a few seconds). The objective of this performance evaluation was to bring down the total time for page load to less than 10 seconds which would be a more reasonable end user experience.&lt;/div&gt;&lt;h1 style="font-family: 'Times New Roman', Times, serif; font-size: 145%; margin-left: 0px;"&gt;Solution&lt;/h1&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;I did manage to eventually bring down the loading times to under 10 seconds, so a 70% increase in performance, with several different techniques which I will now discuss in some detail.&lt;/div&gt;&lt;ol&gt;&lt;li style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;"&gt; The first thing I did for both the&amp;nbsp;&lt;b&gt;editform.aspx&lt;/b&gt;&amp;nbsp;page and the&amp;nbsp;&lt;b&gt;dispform.aspx&lt;/b&gt;&amp;nbsp;page was to remove all &amp;lt;asp:Label&amp;gt; objects and replace them with plain text. If I wasn't planning to manipulate the label object in any way in the code behind, there was no need to create a control of this type. Text was sufficient for these purposes.&lt;/li&gt;&lt;li style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;"&gt;The second thing I did was to remove all Telerik textbox and combobox controls except where required and converted them to asp:dropdownlists and asp:textboxes.&lt;/li&gt;&lt;li style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 3px; margin-left: 20px; margin-top: 0px; text-align: justify;"&gt;The third thing I did and the focus of this article was to leverage&amp;nbsp;&lt;b&gt;ANTS Profiler&lt;/b&gt;&amp;nbsp;to find areas in my code that required optimizing. I am going to talk about this in some detail to outline my approach to doing this and how this helped with the performance tuning.&lt;/li&gt;&lt;/ol&gt;&lt;h1 style="font-family: 'Times New Roman', Times, serif; font-size: 145%; margin-left: 0px;"&gt;Configuring ANTS Profiler to work with SharePoint&lt;/h1&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;To get started, you'll need to have some sort of development box already in place where your code has been deployed to. In my specific example, I had WSS 3.0 installed in a single server scenario, with all of my custom application pages stored in the&amp;nbsp;&lt;b&gt;_layouts&amp;nbsp;&lt;/b&gt;directory.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;Download and install the ANTS Profiler from&amp;nbsp;&lt;a href="https://www.red-gate.com/dynamic/downloads/downloadform.aspx?download=antsprofiler" style="color: #cc6633; text-decoration: none;" title="here"&gt;&lt;span style="color: blue;"&gt;here&lt;/span&gt;&lt;/a&gt;. They offer a free 14-day trial that will be enough to get you going. I really do recommend that any serious SharePoint developer or .NET developer have this tool in their tool belt.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;Once the profiler is installed, RedGate has provided us with a really handy guide for setting up SharePoint to work with the profiler:&amp;nbsp;&lt;a href="http://www.red-gate.com/support/Knowledgebase/ANTS_Profiler/AP4SharePoint.pdf" style="color: #cc6633; text-decoration: none;" title="http://www.red-gate.com/support/Knowledgebase/ANTS_Profiler/AP4SharePoint.pdf"&gt;&lt;span style="color: blue;"&gt;http://www.red-gate.com/support/Knowledgebase/ANTS_Profiler/AP4SharePoint.pdf&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;I won't say much more on the installation steps for ANTS Profiler as they're pretty straight forward.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;Once everything has been installed and configured, you can launch the ANTS Profiler. The following is a screenshot of what my profiler page looks like initially:&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;&lt;img border="0" height="323" src="http://www.simple-talk.com/iwritefor/articlefiles/693-image002.jpg" width="420" /&gt;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;The above configuration was copied directly from the pdf I'd mentioned above.&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;If you're comfortable with the settings, click on&amp;nbsp;&lt;b&gt;Start Profiling&lt;/b&gt;&amp;nbsp;to get this going. If you encounter an error similar to the screen shot below, make sure the web site on the port you're trying to profile is stopped. ANTS Profiler needs to be able to launch the site on its own, so you can't have it running while attempting to do this. I run into this now and again when I forget to do that.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;&lt;img border="0" height="341" src="http://www.simple-talk.com/iwritefor/articlefiles/693-image004.jpg" width="420" /&gt;&lt;/div&gt;&lt;h1 style="font-family: 'Times New Roman', Times, serif; font-size: 145%; margin-left: 0px;"&gt;Working with ANTS Profiler to track down problem areas&lt;/h1&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;Once the profiler has finished loading, you should now have a default window open to the root of your SharePoint web site.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;&lt;img border="0" height="302" src="http://www.simple-talk.com/iwritefor/articlefiles/693-image006.jpg" width="420" /&gt;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;After this page successfully loads, you'll notice that the profiler has already started gathering data on the initial page load of the SharePoint site. What you'll want to do next is navigate to page you're attempting to optimize. In my example, I type the following:&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;&lt;b&gt;&lt;a href="http://vsimage/_layouts/motorola/non_optimized.aspx?id=11"&gt;http://vsimage/_layouts/motorola/non_optimized.aspx?id=11&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;Hit enter, and the profiler will begin to do its job. Typically I wait for my page to load successfully and then I stop the profiler and begin to do the work of analyzing the results.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;&lt;img border="0" height="354" src="http://www.simple-talk.com/iwritefor/articlefiles/693-image008.jpg" width="420" /&gt;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;As you can see in my screenshot above, I have highlighted the region in the profiler that I want to analyze. If you pay attention when your page loads, you'll get a general idea of where you want to highlight in the time window. Looking at my page above, I can see immediately where the&amp;nbsp;&lt;b&gt;&lt;span style="color: red;"&gt;HOT&amp;nbsp;&lt;/span&gt;&lt;/b&gt;regions are. These are the places I need to pay particular attention to immediately.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;To show the source code, I click on the method I'm interested in. In my example, since the slowdown was primarily on&amp;nbsp;&lt;b&gt;Page_Load&lt;/b&gt;, that's what I want to drill down into. If I click on the&lt;b&gt;ASP._layouts_motorola_not_optimized_aspx.Page_Load&lt;/b&gt;&amp;nbsp;method, my screen will refresh with a code view of my page:&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;&lt;img border="0" height="354" src="http://www.simple-talk.com/iwritefor/articlefiles/693-image010.jpg" width="420" /&gt;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;The really neat thing about the ANTS Profiler is the way that the scroll bar on the right highlights in&amp;nbsp;&lt;b&gt;&lt;span style="color: red;"&gt;RED&amp;nbsp;&lt;/span&gt;&lt;/b&gt;my problem areas so that I can jump to that part of the code quickly. One of the pieces I was able to optimize was my&lt;b&gt;PopulateDropDownLists&amp;nbsp;&lt;/b&gt;method that I had written. Using the profiler I noticed the following bit of code was taking over a second to load:&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;&lt;img border="0" height="149" src="http://www.simple-talk.com/iwritefor/articlefiles/693-image012.jpg" width="420" /&gt;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;It would appear that the&amp;nbsp;&lt;b&gt;getDDLNames&amp;nbsp;&lt;/b&gt;method, another method I had written, was taking a bit longer than it should to run. Further investigation showed that the reason for this came down to calls to the&lt;b&gt;SPSecurity.RunWithElevatedPrivileges&lt;/b&gt;&amp;nbsp;method taking on Page_Load 1.5 seconds to run. Since the&amp;nbsp;&lt;b&gt;SPSecurity.RunWithElevatedPrivileges&amp;nbsp;&lt;/b&gt;method is a part of the SharePoint Object Model and not something I had written, I really couldn't optimize that method, I had to come up with a better way to limit the affect it had on my performance.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;Within the&amp;nbsp;&lt;b&gt;PopulateDropDownLists&amp;nbsp;&lt;/b&gt;method, I was populating a total of 8 drop down controls, each making a call do the&amp;nbsp;&lt;b&gt;getDDLNames&amp;nbsp;&lt;/b&gt;method. This was resulting in a huge performance hit simply due to the number of times I was calling&amp;nbsp;&lt;b&gt;SPSecurity.RunWithElevatedPrivileges&lt;/b&gt;. I was able to improve the performance of this page by eliminating the&amp;nbsp;&lt;b&gt;getDDLNames&amp;nbsp;&lt;/b&gt;method entirely and moving the elevation code up to the&lt;b&gt;PopulateDropDownLists&lt;/b&gt;&amp;nbsp;method&lt;b&gt;&amp;nbsp;&lt;/b&gt;and making a single call for all 8 drop down lists.&amp;nbsp;As you can see, working with a tool like this makes it really easy to see into areas of your code that you might not have otherwise suspected for the slow down.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;&lt;img border="0" height="150" src="http://www.simple-talk.com/iwritefor/articlefiles/693-image014.jpg" width="420" /&gt;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;I also spent a bit of time going through other areas of my code where this elevation call was being made too many times. I consolidated all areas that required elevation into a single elevation block.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;I used the profiler in other areas to optimize code that was not dry enough, and to remove methods that could be architected in better ways. I found that by going through the profiler results and comparing to the code optimization practices found in this document:&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/library/bb687949.aspx" style="color: #cc6633; text-decoration: none;" title="http://msdn.microsoft.com/en-us/library/bb687949.aspx"&gt;&lt;span style="color: blue;"&gt;http://msdn.microsoft.com/en-us/library/bb687949.aspx&lt;/span&gt;&lt;/a&gt;. I was able to find several areas that needed optimizing.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;Take a look at the example below:&lt;/div&gt;&lt;div class="listing" style="background-color: #f9f9f9; border-bottom-color: rgb(202, 202, 202); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(202, 202, 202); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(202, 202, 202); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(202, 202, 202); border-top-style: solid; border-top-width: 1px; font-family: 'Courier New', Courier, monospace; font-size: 11px; font-weight: normal; margin-left: 20px; padding-bottom: 10px; padding-left: 3px; padding-right: 3px; padding-top: 10px; text-align: left;"&gt;&lt;div style="font-family: 'Courier New', Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;span style="color: green; font-family: 'Courier New';"&gt;SPFieldUserValue&lt;/span&gt;&lt;span style="font-family: 'Courier New';"&gt;&amp;nbsp;user =&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;SPFieldUserValue&lt;/span&gt;(web,&lt;span style="color: #2b91af;"&gt;Convert&lt;/span&gt;.ToString(listItem[&lt;span style="color: #a31515;"&gt;"Employee"&lt;/span&gt;]));&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Courier New', Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; peEmployee.&lt;span style="color: blue;"&gt;CommaSeparatedAccounts&lt;/span&gt;&amp;nbsp;= pmaUser.LookupValue;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;If we have a&amp;nbsp;&lt;b&gt;SPFieldUserValue&lt;/b&gt;&amp;nbsp;object, calling upon the&amp;nbsp;&lt;b&gt;LookupValue&lt;/b&gt;&amp;nbsp;property will return the Name of that user. This is not to be confused with the&amp;nbsp;&lt;b&gt;LoginName&lt;/b&gt;&amp;nbsp;property. Assigning that to the&amp;nbsp;&lt;b&gt;CommaSeparatedAccounts&lt;/b&gt;&amp;nbsp;property may do the trick and will load that user account into the control but not without a performance hit.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;&lt;span style="line-height: 115%;"&gt;A better approach would be:&lt;/span&gt;&lt;/div&gt;&lt;div class="listing" style="background-color: #f9f9f9; border-bottom-color: rgb(202, 202, 202); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(202, 202, 202); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(202, 202, 202); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(202, 202, 202); border-top-style: solid; border-top-width: 1px; font-family: 'Courier New', Courier, monospace; font-size: 11px; font-weight: normal; margin-left: 20px; padding-bottom: 10px; padding-left: 3px; padding-right: 3px; padding-top: 10px; text-align: left;"&gt;&lt;div style="font-family: 'Courier New', Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;span style="color: green; font-family: 'Courier New';"&gt;SPFieldUserValue&lt;/span&gt;&lt;span style="font-family: 'Courier New';"&gt;&amp;nbsp;user =&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;SPFieldUserValue&lt;/span&gt;(web,&lt;span style="color: #2b91af;"&gt;Convert&lt;/span&gt;.ToString(listItem[&lt;span style="color: #a31515;"&gt;"Employee"&lt;/span&gt;]));&lt;br /&gt;peEmployee.&lt;span style="color: blue;"&gt;CommaSeparatedAccounts&lt;/span&gt;&amp;nbsp;= pmaUser.User.LoginName;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;The difference is minor. Instead of using the&amp;nbsp;&lt;b&gt;LookupValue&lt;/b&gt;&amp;nbsp;property, we leverage the&amp;nbsp;&lt;b&gt;SPUser&lt;/b&gt;&amp;nbsp;object and call upon the&amp;nbsp;&lt;b&gt;LoginName&lt;/b&gt;&amp;nbsp;property. In all of my testing, I noticed an improvement in speed when using the&amp;nbsp;&lt;b&gt;LoginName&lt;/b&gt;property.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;Depending on your environment, the output from either of those properties will differ and that's the heart of the performance issues. In my environment, LoginName and Name outputted the following:&lt;/div&gt;&lt;div class="listing" style="background-color: #f9f9f9; border-bottom-color: rgb(202, 202, 202); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(202, 202, 202); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(202, 202, 202); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(202, 202, 202); border-top-style: solid; border-top-width: 1px; font-family: 'Courier New', Courier, monospace; font-size: 11px; font-weight: normal; margin-left: 20px; padding-bottom: 10px; padding-left: 3px; padding-right: 3px; padding-top: 10px; text-align: left;"&gt;&lt;div style="font-family: 'Courier New', Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Name - "Joe User"&lt;/div&gt;&lt;div style="font-family: 'Courier New', Courier, monospace; font-size: 11px; margin-bottom: 0px; margin-left: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;LoginName - "domain\juser"&lt;/div&gt;&lt;/div&gt;&lt;h1 style="font-family: 'Times New Roman', Times, serif; font-size: 145%; margin-left: 0px;"&gt;Results/Conclusion&lt;/h1&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;Using a combination of all the techniques I've described above, I was able to dramatically reduce the load time of this page and increase performance to the point where users are happy. Going forward, I was able to gain valuable insights into what aspects of the object model take time to load and therefore require careful planning before implementation.&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 20px; text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;Original Post on &lt;/span&gt;&lt;a href="http://www.simple-talk.com/dotnet/.net-tools/working-with-the-ants-profiler-to-optimize-sharepoint/?utm_source=simpletalk&amp;amp;utm_medium=email&amp;amp;utm_content=ANTSSharepoint20090525&amp;amp;utm_campaign=NET"&gt;&lt;span style="font-weight: bold;"&gt;Simple-Talk.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-6116461316842120757?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/6116461316842120757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=6116461316842120757&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6116461316842120757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6116461316842120757'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2009/05/working-with-ants-profiler-to-optimize.html' title='Working With the ANTS Profiler to Optimize SharePoint by Shereen  Qumsieh'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-1220053693359042805</id><published>2009-05-19T14:01:00.004+04:30</published><updated>2009-06-12T11:20:43.691+04:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>Add Google Analytics to a SharePoint Publishing Site</title><content type='html'>&lt;span style="font-family: arial; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; font-size: 13px;"&gt;&lt;div&gt;&lt;span style="font-family: Verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 4pt;"&gt;From weblog of&amp;nbsp;&lt;span style="font-family: tahoma; font-weight: bold; letter-spacing: 1px; text-transform: uppercase;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="color: #3333ff;"&gt;&lt;a href="http://mikeknowles.com/blog/" style="color: #0000cc; font-style: normal; font-weight: bold; outline-style: none !important; outline-width: medium !important;" target="_blank"&gt;MIKE KNOWLES&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 4pt;"&gt;&lt;a href="http://mikeknowles.com/blog/ct.ashx?id=1ceb6b6f-4cd9-4d1a-85bd-a5b3b77fc6c7&amp;amp;url=http%3a%2f%2fwww.google.com%2fanalytics%2f" style="color: #0000cc; font-weight: bold; outline-style: none !important; outline-width: medium !important;" target="_blank"&gt;Google Analytics&lt;/a&gt;&amp;nbsp;is a web traffic and demographics reporting service provided free of charge by Google. Google Analytics functionality can be added to any web site by setting up an account and adding a snippet of JavaScript to every page within the web site. Once configured you can see all types of statistics such as how users were referred to your site, number of hits per page, where your users are located geographically, what types of browsers and OS they are using, and much more.&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 4pt;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 4pt;"&gt;This post outlines how to add Google Analytics to a SharePoint Publishing site. You must have edit rights for all site Master Pages. Google Analytics can complement the Usage Reports available to Site Collection Administrators and Search Term Reports available to Shared Service Provider Administrators. Analytics can also be used to provide read-only access to users who do not have administrative rights on the SharePoint site but whose job function might benefit from access to detailed site usage data.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;Click here to read the rest of the article:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://mikeknowles.com/blog/2009/05/17/AddGoogleAnalyticsToASharePointPublishingSite.aspx"&gt;http://mikeknowles.com/blog/2009/05/17/AddGoogleAnalyticsToASharePointPublishingSite.aspx&lt;/a&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-1220053693359042805?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/1220053693359042805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=1220053693359042805&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/1220053693359042805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/1220053693359042805'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2009/05/add-google-analytics-to-sharepoint.html' title='Add Google Analytics to a SharePoint Publishing Site'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-4467910000066987727</id><published>2009-05-17T08:44:00.002+04:30</published><updated>2009-05-17T08:49:33.308+04:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><title type='text'>All about Sharepoint 2010</title><content type='html'>&lt;div dir="ltr"&gt;&lt;span style="color: #4c4c4c; font-family: verdana; font-size: 11px; line-height: 18px;"&gt;&lt;span style="border-collapse: separate; color: #4c4c4c; font-family: verdana; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"&gt;&lt;span style="border-collapse: separate; color: #333333; font-family: verdana; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #4c4c4c; font-family: verdana; font-size: 11px; line-height: 18px;"&gt;&lt;span style="border-collapse: separate; color: #4c4c4c; font-family: verdana; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"&gt;&lt;span style="border-collapse: separate; color: #333333; font-family: verdana; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"&gt;&lt;div&gt;&lt;span style="color: #4c4c4c; font-family: 'Trebuchet MS'; font-size: 16px; font-weight: bold; line-height: 18px;"&gt;&lt;span style="color: #444444; font-family: Tahoma; font-size: 13px; font-weight: normal; line-height: 17px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #4c4c4c; font-family: 'Trebuchet MS'; font-size: 16px; font-weight: bold; line-height: 18px;"&gt;&lt;span style="color: #444444; font-family: Tahoma; font-size: 13px; font-weight: normal; line-height: 17px;"&gt;&lt;h4 class="beTitle" id="subjcns!C6CC8A1D5ADD756F!143" style="color: #444444; font-size: 125%; font-weight: normal; line-height: 110%; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;All about Sharepoint 2010 from weblog of &lt;a href="http://vamsikrishnab.spaces.live.com/default.aspx"&gt;Vasmi Krishna:&lt;/a&gt;&lt;br /&gt;&lt;/h4&gt;&lt;div class="bvMsg" id="msgcns!C6CC8A1D5ADD756F!143" style="line-height: 131%; overflow-x: hidden; overflow-y: hidden; text-overflow: ellipsis; width: 100%;"&gt;&lt;span style="border-collapse: separate; color: #4c4c4c; font: normal normal normal 11px/18px verdana; letter-spacing: normal; line-height: 131%; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="border-collapse: separate; color: #4c4c4c; font: normal normal normal 11px/18px verdana; letter-spacing: normal; line-height: 131%; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"&gt;&lt;ol style="line-height: 131%;"&gt;&lt;li style="line-height: 131%; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: small; line-height: normal;"&gt;SharePoint 2010 will be 64-bit only.&lt;/span&gt;&lt;/li&gt;&lt;li style="line-height: 131%; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt; &lt;span style="font-family: 'Trebuchet MS'; font-size: small; line-height: normal;"&gt;SharePoint 2010 will require Windows 2008 or Windows 2008 R2&lt;/span&gt;&lt;/li&gt;&lt;li style="line-height: 131%; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt; &lt;span style="font-family: 'Trebuchet MS'; font-size: small; line-height: normal;"&gt;SharePoint 2010 will require 64-bit SQL 2008 or 64-bit SQL 2005&lt;/span&gt;&lt;/li&gt;&lt;li style="line-height: 131%; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt; &lt;span style="border-collapse: separate; color: #4c4c4c; font: normal normal normal 11px/18px verdana; letter-spacing: normal; line-height: 131%; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: small; line-height: normal;"&gt;Internet Explorer will not be supported in SharePoint 2010. The Tier 1 browsers will be IE 7, IE 8 and Firefox 3.x on Windows platform&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="line-height: 131%; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;span style="border-collapse: separate; color: #4c4c4c; font: normal normal normal 11px/18px verdana; letter-spacing: normal; line-height: 131%; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"&gt;&lt;span style="border-collapse: separate; color: #333333; font: normal normal normal 12px/15px verdana; letter-spacing: normal; line-height: 131%; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="border-collapse: separate; color: #4c4c4c; font: normal normal normal 11px/18px verdana; letter-spacing: normal; line-height: 131%; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"&gt;&lt;span style="border-collapse: separate; color: #333333; font: normal normal normal 12px/15px verdana; letter-spacing: normal; line-height: 131%; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"&gt;&lt;div style="line-height: 131%; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;strong style="font-weight: bold; line-height: 131%;"&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: small; line-height: normal;"&gt;So, what can you do today to get into the best shape for SharePoint Server 2010?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;ol style="line-height: 131%;"&gt;&lt;li style="line-height: 131%; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: small; line-height: normal;"&gt;Start by ensuring new hardware is 64-bit.&amp;nbsp; Deploying 64-bit is our current best practice recommendation for SharePoint 2007.&lt;/span&gt;&lt;/li&gt;&lt;li style="line-height: 131%; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: small; line-height: normal;"&gt;&lt;span style="font-family: 'Trebuchet MS'; line-height: normal;"&gt;Deploy&lt;span style="line-height: 131%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://blogs.msdn.com/sharepoint/archive/2009/04/28/announcing-service-pack-2-for-office-sharepoint-server-2007-and-windows-sharepoint-services-3-0.aspx" style="color: #0066a7; cursor: pointer; font-weight: inherit; line-height: 131%; text-decoration: none;"&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: small; line-height: normal;"&gt;Service Pack 2&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small; line-height: normal;"&gt;&lt;span style="font-family: 'Trebuchet MS'; line-height: normal;"&gt;&lt;span style="line-height: 131%;"&gt;&amp;nbsp;&lt;/span&gt;and take a good look at the SharePoint 2010&lt;span style="line-height: 131%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://technet.microsoft.com/en-us/library/dd793607.aspx" style="color: #0066a7; cursor: pointer; font-weight: inherit; line-height: 131%; text-decoration: none;"&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: small; line-height: normal;"&gt;Upgrade Checker&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small; line-height: normal;"&gt;&lt;span style="font-family: 'Trebuchet MS'; line-height: normal;"&gt;&lt;span style="line-height: 131%;"&gt;&amp;nbsp;&lt;/span&gt;that's shipped as part of the update.&amp;nbsp; The Upgrade Checker will scan your SharePoint Server 2007 deployment for many issues that could affect a future upgrade to SharePoint 2010.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="line-height: 131%; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: small; line-height: normal;"&gt;&lt;span style="font-family: 'Trebuchet MS'; line-height: normal;"&gt;Get to know Windows Server 2008 with SharePoint 2007,&lt;span style="line-height: 131%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://blogs.msdn.com/sharepoint/archive/2008/01/16/windows-server-2008-and-sharepoint-resources.aspx" style="color: #0066a7; cursor: pointer; font-weight: inherit; line-height: 131%; text-decoration: none;"&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: small; line-height: normal;"&gt;this post&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small; line-height: normal;"&gt;&lt;span style="font-family: 'Trebuchet MS'; line-height: normal;"&gt;&lt;span style="line-height: 131%;"&gt;&amp;nbsp;&lt;/span&gt;is a great starting point.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="line-height: 131%; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: small; line-height: normal;"&gt;Consider your desktop browser strategy if you have large population of Internet Explorer 6 users.&lt;/span&gt;&lt;/li&gt;&lt;li style="line-height: 131%; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: small; line-height: normal;"&gt;&lt;span style="font-family: 'Trebuchet MS'; line-height: normal;"&gt;Continue to follow the&lt;span style="line-height: 131%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://technet.microsoft.com/en-us/office/sharepointserver/bb736746.aspx" style="color: #0066a7; cursor: pointer; font-weight: inherit; line-height: 131%; text-decoration: none;"&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: small; line-height: normal;"&gt;Best Practices&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small; line-height: normal;"&gt;&lt;span style="font-family: 'Trebuchet MS'; line-height: normal;"&gt;&lt;span style="line-height: 131%;"&gt;&amp;nbsp;&lt;/span&gt;guidance for SharePoint Server 2007.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="line-height: 131%; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: small; line-height: normal;"&gt;Keep an eye on this&amp;nbsp;&lt;/span&gt;&lt;a href="http://blogs.msdn.com/sharepoint/default.aspx" style="color: #0066a7; cursor: pointer; font-weight: inherit; line-height: 131%; text-decoration: none;"&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: small; line-height: normal;"&gt;blog&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: small; line-height: normal;"&gt;&amp;nbsp;for updates and more details in the coming months.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: 16px; line-height: normal;"&gt;original post address:&amp;nbsp;&lt;span style="font-family: verdana; font-size: 12px; line-height: 15px;"&gt;&lt;a href="http://vamsikrishnab.spaces.live.com/default.aspx"&gt;http://vamsikrishnab.spaces.live.com/default.aspx&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-4467910000066987727?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/4467910000066987727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=4467910000066987727&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4467910000066987727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4467910000066987727'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2009/05/all-about-sharepoint-2010.html' title='All about Sharepoint 2010'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-2508758193419104041</id><published>2009-01-14T09:27:00.004+03:30</published><updated>2009-01-25T09:44:20.844+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>Web Site Design and Positioning</title><content type='html'>During my last workshop class on ASP .NET we had a review on web page design with ASP .NET. One of the most important part of the design is positioning the element inside you web site. What I recommend is to use &amp;lt;div&amp;gt; and &amp;lt;span&amp;gt; element with CSS styles to position your web pages instead of &amp;lt;tables&amp;gt;. If you look at the many professional designed web sites (like yahoo,msn, ...) and check their source code you will be noticed that most of them are using &amp;lt;div&amp;gt; or &amp;lt;span&amp;gt; for their pages. If you want to know why? "&lt;a href="http://www.decloak.com/Dev/CSSTables/CSS_Tables_01.aspx"&gt;Table vs CSS&lt;/a&gt;" is are the reasons.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_0uLJ4ISp3BU/SXG3ZcPc4NI/AAAAAAAAAXU/IYPsTDMSxug/s1600-h/microsoft.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_0uLJ4ISp3BU/SXG3ZcPc4NI/AAAAAAAAAXU/IYPsTDMSxug/s320/microsoft.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_0uLJ4ISp3BU/SXG3dO1dGuI/AAAAAAAAAXc/m-zSHFewabg/s1600-h/yahoo.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_0uLJ4ISp3BU/SXG3dO1dGuI/AAAAAAAAAXc/m-zSHFewabg/s320/yahoo.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now let start with learning &amp;lt;div&amp;gt; and CSS positioning. Just like always I recomend &lt;a href="http://www.w3schools.com/"&gt;W3Schools&lt;/a&gt;. The next one is a reall great weblog from &lt;a href="http://www.positioniseverything.net/design/index.html"&gt;Big John&lt;/a&gt;, &lt;a href="http://positioniseverything.net/"&gt;positioniseverything.net&lt;/a&gt;. It's nice blog explaining about positioning with CSS and bugs of browsers.&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-2508758193419104041?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/2508758193419104041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=2508758193419104041&amp;isPopup=true' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/2508758193419104041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/2508758193419104041'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2009/01/web-site-design-and-tpositioning.html' title='Web Site Design and Positioning'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_0uLJ4ISp3BU/SXG3ZcPc4NI/AAAAAAAAAXU/IYPsTDMSxug/s72-c/microsoft.gif' height='72' width='72'/><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-6700532282032749978</id><published>2008-12-14T11:21:00.002+03:30</published><updated>2008-12-14T11:24:27.699+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>Microsoft Security Development Lifecycle (SDL) Optimization Model</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_0uLJ4ISp3BU/SUS7Pix2-II/AAAAAAAAAXA/BmCd1Xix58s/s1600-h/SDL.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_0uLJ4ISp3BU/SUS7Pix2-II/AAAAAAAAAXA/BmCd1Xix58s/s400/SDL.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The Microsoft® Security Development Lifecycle (SDL) Optimization Model is designed to facilitate gradual, consistent, and cost-effective implementation of the SDL by development organizations outside of Microsoft. The model helps those responsible for integrating security and privacy into their organization's software development lifecycle to assess their current state and to gradually move their organizations towards the adoption of the proven Microsoft process for producing more secure software. The SDL Optimization Model enables development managers and IT policy makers to assess the state of security in development. They can then create a vision and road map for reducing customer risk by creating more secure and reliable software in a cost-effective, consistent, and gradual manner. Although achieving security assurance requires long-term commitment, this guide outlines a plan for attaining measureable process improvements, quickly, with realistic budgets and resources.&lt;br /&gt;&lt;br /&gt;If you are intereseted in Microsoft Security Development Lifecycle (SDL) here is some links to it:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/security/cc448177.aspx"&gt;The Microsoft Security Development Lifecycle (SDL)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/84aed186-1d75-4366-8e61-8d258746bopq.aspx"&gt;Microsoft Security Development Lifecycle (SDL) – Process Guidance&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-6700532282032749978?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/6700532282032749978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=6700532282032749978&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6700532282032749978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6700532282032749978'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2008/12/microsoft-security-development.html' title='Microsoft Security Development Lifecycle (SDL) Optimization Model'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_0uLJ4ISp3BU/SUS7Pix2-II/AAAAAAAAAXA/BmCd1Xix58s/s72-c/SDL.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-9205526833182795153</id><published>2008-12-08T15:06:00.005+03:30</published><updated>2008-12-08T15:49:52.195+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint Persian Calendar'/><title type='text'>What is Sharepoint?</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_0uLJ4ISp3BU/ST0PjjxwXfI/AAAAAAAAAWo/h5UaQ9v7Vds/s1600-h/sharepoint.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_0uLJ4ISp3BU/ST0PwiDvBTI/AAAAAAAAAW4/tJH04koK6zw/s1600-h/image004.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_0uLJ4ISp3BU/ST0PwiDvBTI/AAAAAAAAAW4/tJH04koK6zw/s400/image004.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;During last two month I had many phone calls about Microsoft Sharepoint and related subjects, so I have prepared a little document in Persian about what is Sharepoint, features and advantages. You can download it from my personal web site &lt;a href="http://www.tabatabaei.info/"&gt;http://www.tabatabaei.info&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you need any further information/assistance, do not hesitate to contact me.&lt;br /&gt;&lt;br /&gt;Download url: &lt;a href="http://www.tabatabaei.info/sharepoint.aspx"&gt;http://www.tabatabaei.info/sharepoint.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-9205526833182795153?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/9205526833182795153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=9205526833182795153&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/9205526833182795153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/9205526833182795153'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2008/12/what-is-sharepoint.html' title='What is Sharepoint?'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_0uLJ4ISp3BU/ST0PwiDvBTI/AAAAAAAAAW4/tJH04koK6zw/s72-c/image004.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-8083958451765050636</id><published>2008-12-03T10:38:00.001+03:30</published><updated>2008-12-03T10:38:50.314+03:30</updated><title type='text'>Value of Selected CheckboxList Item in Javascript</title><content type='html'>Sometimes, you may need to find which item of your CheckboxList is selected and get it&amp;#39;s value on client. Normally ASP .NET CheckboxList does not send its item &amp;#39;s value to client. So if you want to have it, you have to added it your self. In this post I &amp;#39;m going to show you a simple way to get selected checkbox list item &amp;#39;s value.&lt;br&gt; &lt;br&gt;First I prepared a checkbox list with some items. In this sample I have added some item manually but you can do this using DataBinding.&lt;br&gt;&lt;br&gt;&lt;span style="color: rgb(204, 0, 0); font-family: courier new,monospace;"&gt;&amp;lt;asp:CheckBoxList &lt;span style="color: rgb(255, 0, 0);"&gt;ID&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;=&amp;quot;CheckBoxList1&amp;quot;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;runat&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;RepeatLayout&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;=&amp;quot;Table&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(204, 0, 0); font-family: courier new,monospace;"&gt; &lt;span style="color: rgb(204, 0, 0); font-family: courier new,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:ListItem &lt;span style="color: rgb(255, 0, 0);"&gt;Text&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;=&amp;quot;Test&amp;quot;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Value&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;=&amp;quot;110&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(204, 0, 0); font-family: courier new,monospace;"&gt; &lt;span style="color: rgb(204, 0, 0); font-family: courier new,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:ListItem &lt;span style="color: rgb(255, 0, 0);"&gt;Text&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;=&amp;quot;Test2&amp;quot;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Value&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;=&amp;quot;220&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(204, 0, 0); font-family: courier new,monospace;"&gt; &lt;span style="color: rgb(204, 0, 0); font-family: courier new,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:ListItem &lt;span style="color: rgb(255, 0, 0);"&gt;Text&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;=&amp;quot;Test3&amp;quot;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Value&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;=&amp;quot;330&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(204, 0, 0); font-family: courier new,monospace;"&gt; &lt;span style="color: rgb(204, 0, 0); font-family: courier new,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:ListItem &lt;span style="color: rgb(255, 0, 0);"&gt;Text&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;=&amp;quot;Test4&amp;quot;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Value&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;=&amp;quot;440&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(204, 0, 0); font-family: courier new,monospace;"&gt; &lt;span style="color: rgb(204, 0, 0); font-family: courier new,monospace;"&gt;&amp;lt;/asp:CheckBoxList&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(255, 0, 0);"&gt;&lt;br&gt;Next, I have to add items value as an attribute for the items:&lt;br&gt;&lt;br&gt;protected void Page_Load(object sender, EventArgs e)&lt;br&gt; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (ListItem li in CheckBoxList1.Items)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; li.Attributes.Add(&amp;quot;mainValue&amp;quot;, li.Value);&lt;br&gt;}&lt;br&gt;&lt;br&gt;Finally, you need to assign a function as click event handler for items. The point is that you can not do it just like the other html element on your page. So I will write a few line of code to add this event handler.&lt;br&gt; &lt;br&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(51, 51, 255);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;AddHandler()&lt;/span&gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);"&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(51, 51, 255);"&gt;var &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;tbl = document.getElementById(&amp;#39;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&amp;lt;%= CheckBoxList1.UniqueID %&amp;gt;&lt;/span&gt;&amp;#39;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;br style="color: rgb(255, 0, 0);"&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(51, 51, 255);"&gt;for&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;var &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;i=0;i&amp;lt;tbl.cells.length;i++)&lt;/span&gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);"&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(51, 51, 255);"&gt;var &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;cell = tbl.cells[i];&lt;/span&gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);"&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cell.childNodes[0].onclick = &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);"&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(51, 51, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(window.event.srcElement.checked)&lt;/span&gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);"&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(window.event.srcElement.parentNode.attributes[&amp;quot;mainValue&amp;quot;].value);&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);"&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(255, 0, 0);"&gt; &lt;br&gt;Notice that I will call this function (&amp;quot;&lt;b&gt;AddHandler&lt;/b&gt;&amp;quot;) on &lt;b&gt;onload&lt;/b&gt; on &lt;b&gt;body&lt;/b&gt;.&lt;br&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&amp;lt;body&amp;nbsp; &lt;span style="color: rgb(51, 51, 255);"&gt;onload&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;=&amp;quot;AddHandler();&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;br&gt; &lt;br&gt;The only thing that you have to be carefull is that this codes will work when you are using &lt;b&gt;CheckboxList&lt;/b&gt; with &lt;b&gt;RepeatLayout&lt;/b&gt; property is &amp;quot;&lt;b&gt;Table&lt;/b&gt;&amp;quot;&lt;b&gt;.&lt;br clear="all"&gt;&lt;/b&gt;Download the sample code from here:&lt;br&gt; &lt;a href="http://www.tabatabaei.info/csharpsamples/EventArgsSample.rar"&gt;http://www.tabatabaei.info/csharpsamples/EventArgsSample.rar&lt;/a&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-8083958451765050636?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/8083958451765050636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=8083958451765050636&amp;isPopup=true' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/8083958451765050636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/8083958451765050636'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2008/12/value-of-selected-checkboxlist-item-in.html' title='Value of Selected CheckboxList Item in Javascript'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-4845882240385104565</id><published>2008-10-14T15:17:00.001+03:30</published><updated>2008-10-14T15:17:43.952+03:30</updated><title type='text'>7 Version Control Systems Reviewed</title><content type='html'>&lt;div dir="ltr"&gt;&lt;p&gt;If you've ever collaborated with other people on a project, you know the frustration of constantly swapping files. Some do it by email, some through file upload services and some by other methods. It's a pain in the neck, and every designer and developer knows it. &lt;strong&gt;Revision control&lt;/strong&gt; is an excellent way to combat the problem of sharing files between workers.&lt;/p&gt; &lt;p&gt;Most web-developers have probably worked with some sort of revision control system, but designers may find it a foreign concept. The most obvious benefit of using revision control is the &lt;em&gt;ability to have an unlimited number of people working on the same code base&lt;/em&gt;, without having to constantly send files back and forth.&lt;/p&gt; &lt;p&gt;But designers and developers can both benefit from using revision control systems to keep copies of their files and designs. You can instantly browse previous "commits" to your repository and revert to earlier versions if something happens.&lt;/p&gt; &lt;p&gt;This article &lt;strong&gt;reviews some of the top open-source version control systems&lt;/strong&gt; and tools that make setting up a version control system easy.&lt;/p&gt; &lt;h3&gt;CVS&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.nongnu.org/cvs/"&gt;&lt;img class="alignnone size-full wp-image-1125" src="http://88.198.60.17/images/cvs.gif" alt="" height="433" width="495"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.nongnu.org/cvs/"&gt;CVS&lt;/a&gt; is the grandfather of revision control systems. It was first released in 1986, and Google Code still hosts the original Usenet post announcing CVS. CVS is the &lt;strong&gt;de facto standard&lt;/strong&gt; and is installed virtually everywhere. However, the code base isn't as fully featured as SVN or other solutions....&lt;/p&gt; &lt;p&gt;&lt;b&gt;Read the rest of this article on :&lt;a href="http://www.smashingmagazine.com/2008/09/18/the-top-7-open-source-version-control-systems/"&gt;SmashingMagazine.com&lt;/a&gt;&lt;/b&gt;&lt;/p&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-4845882240385104565?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/4845882240385104565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=4845882240385104565&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4845882240385104565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4845882240385104565'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2008/10/7-version-control-systems-reviewed.html' title='7 Version Control Systems Reviewed'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-194497420383940216</id><published>2008-09-20T23:48:00.001+04:30</published><updated>2008-09-20T23:59:51.852+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint Persian Calendar'/><title type='text'>Persian Calendar for SharePoint 2007</title><content type='html'>&lt;div style="text-align: justify;"&gt;Within last a few months me and two of my friends have started working on implementing Persian Calendar for SharePoint 2007. Now after more than 6, 7 month work on this we have the Persian Calendar implemented in SharePoint 2007.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_0uLJ4ISp3BU/SNVchTfHzqI/AAAAAAAAAQ4/qM4BDNxnTOs/s1600-h/a8.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img ad="true" border="0" src="http://4.bp.blogspot.com/_0uLJ4ISp3BU/SNVchTfHzqI/AAAAAAAAAQ4/oovb9BTBQIQ/s320-R/a8.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;One of the most important point about this package is that youwil stil have your Hijri calendar while you can use Persian Calendar too. Also it 's possible to develop web parts which can use Sharepoint Persian Calendar.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_0uLJ4ISp3BU/SNVdF5I-UpI/AAAAAAAAARA/5G2j-2pcw2Q/s1600-h/a5.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img ad="true" border="0" src="http://1.bp.blogspot.com/_0uLJ4ISp3BU/SNVdF5I-UpI/AAAAAAAAARA/E9vccB7nwKs/s320-R/a5.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;While Microsoft is not supporting Persian calendar on Sharepoint officialy, Now we are negotiating to transfer this technology, with some of the most active companies which are working on providing SharePoint stuff in Iran and Middle East.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_0uLJ4ISp3BU/SNVcFnVyBPI/AAAAAAAAAQo/XJgUYZ1UP-4/s1600-h/logo.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img ad="true" border="0" src="http://4.bp.blogspot.com/_0uLJ4ISp3BU/SNVcFnVyBPI/AAAAAAAAAQo/CVLh9Jc3S3s/s320-R/logo.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You can find out more news about Sharepoint 2007 Persian Calendar on my web site : &lt;a href="http://www.tabatabaei.info/"&gt;http://www.tabatabaei.info/&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-194497420383940216?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/194497420383940216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=194497420383940216&amp;isPopup=true' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/194497420383940216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/194497420383940216'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2008/09/persian-calendar-for-sharepoint-2007.html' title='Persian Calendar for SharePoint 2007'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_0uLJ4ISp3BU/SNVchTfHzqI/AAAAAAAAAQ4/oovb9BTBQIQ/s72-Rc/a8.JPG' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-1078336625656074342</id><published>2008-08-24T14:46:00.007+04:30</published><updated>2008-09-28T09:12:33.908+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>Disabling Auto-Complete on ASP.NET Forms</title><content type='html'>Popular browsers, such as Internet Explorer and Firefox support something called Auto-Complete. You've seen this many times. You go to a online form and as you start to type in fields you get a drop-down showing values you've typed in that field before. This feature can be turned off, but it really is a useful feature and can save you a lot of typing when entering redundant values. &lt;br /&gt;&lt;div style="text-align: justify;"&gt;As a web developer, you have to be conscious of the fact that the user's browser will likely have auto-complete turned on and be responsible enough to act accordingly. If you have a form that where the user could possibly enter private or secure values you need to be mindful that if the user is on a public computer that these values will be cached by the browser and seen by other users of that computer. You are able to control if the browser uses AutoComplete for your form or for specific values with just a small &amp;amp; simple tweak.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;img border="0" src="http://files.farleyzone.com/images/autocomplete_image.jpg" style="height: 191px; width: 435px;" /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;To turn off auto-complete for your entire form, all you need to do is add an attribute to your form tag, like this:&lt;/div&gt;&lt;pre&gt;&amp;lt;&lt;span style="color: maroon;"&gt;form&lt;/span&gt;&lt;span style="color: red;"&gt; id=&lt;/span&gt;&lt;span style="color: blue;"&gt;"Form1"&lt;/span&gt;&lt;span style="color: red;"&gt; method=&lt;/span&gt;&lt;span style="color: blue;"&gt;"post"&lt;/span&gt;&lt;span style="color: red;"&gt; runat=&lt;/span&gt;&lt;span style="color: blue;"&gt;"server"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;autocomplete=&lt;/span&gt;&lt;span style="color: blue;"&gt;"off"&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;div style="text-align: justify;"&gt;Easy enough. Now you won't get the auto complete on any of the controls on the form, works for any browser that supports auto-complete. The HTML INPUT tags also support the use of &lt;span style="font-family: Courier New;"&gt;autocomplete=off&lt;/span&gt; and since the &lt;span style="font-family: Courier New;"&gt;&lt;asp:textbox&gt;&lt;/asp:textbox&gt;&lt;/span&gt;control renders as INPUT tags then you can use it to set it on a control by control basis. Just add it to the TextBox at design-time (but note that VS.NET will underline it with a squiggly saying that textbox does not have an attribute for autocomplete - but it will still work):&lt;/div&gt;&lt;pre&gt;&amp;lt;&lt;span style="color: maroon;"&gt;asp:TextBox&lt;/span&gt;&lt;span style="color: red;"&gt; Runat=&lt;/span&gt;&lt;span style="color: blue;"&gt;"server"&lt;/span&gt;&lt;span style="color: red;"&gt; ID=&lt;/span&gt;&lt;span style="color: blue;"&gt;"Textbox1"&lt;/span&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;autocomplete=&lt;/span&gt;&lt;span style="color: blue;"&gt;"off"&lt;/span&gt;&amp;gt;&amp;lt;!--&lt;span style="color: maroon;"&gt;asp:TextBox&amp;gt;&lt;/span&gt;&lt;/pre&gt;or at runtime:&lt;br /&gt;&lt;pre&gt;Textbox1.Attributes.Add(&lt;span style="color: teal; font-family: Courier New;"&gt;"autocomplete"&lt;/span&gt;, &lt;span style="color: teal; font-family: Courier New;"&gt;"off"&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;From &lt;a href="http://ryanfarley.com/default.aspx"&gt;Ryan Farley&lt;/a&gt; 's weblog. See the original post on his blog : &lt;a href="http://ryanfarley.com/blog/archive/2005/02/23/1739.aspx"&gt;http://ryanfarley.com/blog/archive/2005/02/23/1739.aspx&lt;/a&gt;.&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-1078336625656074342?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/1078336625656074342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=1078336625656074342&amp;isPopup=true' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/1078336625656074342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/1078336625656074342'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2008/08/disabling-auto-complete-on-aspnet-forms.html' title='Disabling Auto-Complete on ASP.NET Forms'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-7203825163795594670</id><published>2008-06-30T16:13:00.001+04:30</published><updated>2008-06-30T16:13:39.924+04:30</updated><title type='text'>IE Developer Toolbar &amp; Fire Bug</title><content type='html'>There is lot of tools &amp;amp; utilities that you may use to develop your web application or web site with ASP .NET.&lt;br&gt;In many cases you may want to debug &amp;amp; watch what is happening on your browser. &lt;br&gt;If you want to debug your web site behavior in your browsers and check style sheet effect and javascripts and .... I suggest you to use this two utilities:&lt;br&gt; &lt;ol&gt;&lt;li&gt;&lt;a href="http://blogs.msdn.com/ie/archive/2007/01/09/ie-developer-toolbar-beta-3-now-available.aspx"&gt;IE Developer Toolbar&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://getfirebug.com/"&gt;FireBug&lt;/a&gt;&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;Both of them are used to check browser behavior against your html, javascript and style sheets within your web applications, one of them for Internet Explorer and the other one for Mozilla FireFox. I really love FireBug but usually you have to check something for IE users,too.&lt;br&gt; &lt;br&gt;Click on links below to download these free tools:&lt;br&gt;&lt;br&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&amp;amp;displaylang=en"&gt;Download IE Developer Toolbar&lt;/a&gt;&lt;br&gt; &lt;a href="http://getfirebug.com/releases/firebug1.0-current.xpi"&gt;Download FireBug&lt;/a&gt;&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-7203825163795594670?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/7203825163795594670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=7203825163795594670&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/7203825163795594670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/7203825163795594670'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2008/06/ie-developer-toolbar-fire-bug.html' title='IE Developer Toolbar &amp; Fire Bug'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-5795448198843745470</id><published>2008-06-13T16:33:00.003+04:30</published><updated>2008-06-13T16:41:56.515+04:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Forms'/><category scheme='http://www.blogger.com/atom/ns#' term='Training Videos'/><title type='text'>C# Tuning Training Videos - Async Method Calling - Part One</title><content type='html'>Finally, I've started to publish some training videos about C# and ASP .NET.&lt;br /&gt;In first video I will explain how to call a method with asynchronous delegates.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/videos/Async1-en.html"&gt;C# Tuning Training Videos - Asynchronous Method Calling - Part 1&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-5795448198843745470?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/5795448198843745470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=5795448198843745470&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/5795448198843745470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/5795448198843745470'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2008/06/c-tuning-training-videos-async-method.html' title='C# Tuning Training Videos - Async Method Calling - Part One'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-8602678870268441541</id><published>2008-05-05T09:06:00.004+04:30</published><updated>2008-05-05T09:29:23.577+04:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software Development'/><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>How to become a great developer?</title><content type='html'>&lt;a href="http://weblogs.asp.net/fredriknormen/default.aspx"&gt;Fredrik Normén&lt;/a&gt; is one of &lt;a href="http://mvp.support.microsoft.com/"&gt;Most Valuable Professionals&lt;/a&gt;. He has a post on his &lt;a href="http://weblogs.asp.net/fredriknormen/default.aspx"&gt;blog &lt;/a&gt;explaining how to become a great developer. I liked that and I think it can useful for you, if you are planning to be a great developer.&lt;br /&gt;&lt;br /&gt;Here is the link to original post on his blog:&lt;br /&gt;&lt;a href="http://weblogs.asp.net/fredriknormen/archive/2008/04/18/do-you-want-to-become-a-great-developer.aspx"&gt;&lt;span style="font-weight: bold;"&gt;Do you want to become a great developer?&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-8602678870268441541?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/8602678870268441541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=8602678870268441541&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/8602678870268441541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/8602678870268441541'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2008/05/how-to-become-great-developer.html' title='How to become a great developer?'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-3267076128782723038</id><published>2008-04-24T15:18:00.002+04:30</published><updated>2008-04-24T15:43:07.378+04:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Forms'/><title type='text'>Simple Windows Explorer by C#</title><content type='html'>&lt;div align="justify"&gt;This is simple software like Windows Explorer. Of course it’s very simple but in this sample I have covered usage of some of the classes in &lt;em&gt;System.IO&lt;/em&gt; namespace such as &lt;em&gt;Path, FileInfo, DriveInfo, FileSystemWatcher, DirectoryInfo. &lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/WindowsExplorer.GIF"&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://www.tabatabaei.info/csharpsamples/WindowsExplorer.GIF" border="0" /&gt;&lt;/a&gt;TreeView is loading it’s nodes &lt;strong&gt;On Demand &lt;/strong&gt;which is an applicable way used in real applications। If you double click on a text file it will be opened in a new window which. I have used &lt;em&gt;StreamReader&lt;/em&gt; and &lt;em&gt;StreamWriter&lt;/em&gt; classes to implement reading/writing text files. Other file type will be opened by a BinaryReader for you to show the Binary data inside them.&lt;br /&gt;&lt;br /&gt;Please let me know if there any error or question within this sample.&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/WindowsExplorer.rar"&gt;Download&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-3267076128782723038?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/3267076128782723038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=3267076128782723038&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/3267076128782723038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/3267076128782723038'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2008/04/simple-windows-explorer-by-c.html' title='Simple Windows Explorer by C#'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-6628639668613377704</id><published>2008-01-19T02:10:00.001+03:30</published><updated>2008-02-19T10:24:46.950+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software Development'/><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>C# Tuning in Farsi</title><content type='html'>  &lt;p class="MsoNormal"&gt;Since almost two month ago, I have started to write some continues articles about Object Oriented Programming and C Sharp in my Farsi web log. I hope this can help Iran, Tajik, Afghanistan and other Farsi speaking people in all around the world to learn C# a bit deeper that in it&amp;#39;s useful way.&lt;br&gt; &lt;br&gt; Please help me on this way by your comments. I will also continue here in C# Tuning.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-6628639668613377704?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/6628639668613377704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=6628639668613377704&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6628639668613377704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6628639668613377704'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2008/01/c-tuning-in-farsi.html' title='C# Tuning in Farsi'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-8700959566655830296</id><published>2008-01-16T10:05:00.001+03:30</published><updated>2008-02-19T10:24:46.951+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software Development'/><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>"Single Sign-On" my first article on aspalliance.com</title><content type='html'>I have written an article about Single Sign-On which today is published on &lt;a href="http://aspalliance.com"&gt;http://aspalliance.com&lt;/a&gt; web site.&lt;br&gt;If you are interested in you find in here:&lt;br&gt;&lt;br&gt;&lt;a href="http://aspalliance.com/1545_Understanding_Single_SignOn_in_ASPNET_20"&gt; http://aspalliance.com/1545_Understanding_Single_SignOn_in_ASPNET_20&lt;/a&gt;&lt;br&gt;&lt;br&gt;Let me know your feedback.&lt;br&gt; &lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-8700959566655830296?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/8700959566655830296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=8700959566655830296&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/8700959566655830296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/8700959566655830296'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2008/01/single-sign-on-my-first-article-on.html' title='&quot;Single Sign-On&quot; my first article on aspalliance.com'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-4841156983757806060</id><published>2007-12-03T09:11:00.001+03:30</published><updated>2008-02-19T10:24:46.951+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software Development'/><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Visual Studio .NET Keyboard shortcuts</title><content type='html'>While I &amp;#39;m working and training C# or ASP .NET some of student asking me about what are the common shortcuts that I &amp;#39;m using in Visual Studio.&lt;br&gt;Here is a list of Visual Studio 2005 and also Visual Studio 2008 keyboard shortcuts. &lt;br&gt;&lt;br&gt;&lt;a href="http://rapidshare.com/files/72147902/VCSharp_2005_keybinding.pdf"&gt;Visual Studio .NET 2005 C# Keybinding&lt;/a&gt;&lt;br&gt;&lt;a href="http://rapidshare.com/files/72330593/Visual_C_Sharp_2008.zip"&gt;Visual Studio .NET 2008 C# Keybinding &lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Enjoy it.&lt;br&gt; &lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-4841156983757806060?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/4841156983757806060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=4841156983757806060&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4841156983757806060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4841156983757806060'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/12/visual-studio-net-keyboard-shortcuts.html' title='Visual Studio .NET Keyboard shortcuts'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-6704575305147260695</id><published>2007-11-21T09:07:00.001+03:30</published><updated>2007-11-21T09:51:34.956+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software Development'/><title type='text'>7 of the Hardest Things Learned About Writing Software</title><content type='html'>&lt;a href="http://simpable.com/about/"&gt;Scott Watermasysk&lt;/a&gt; wrote an article on his &lt;a href="http://www.simpable.com/"&gt;weblog&lt;/a&gt; yesterday about software development.&lt;br&gt;&lt;br&gt;Learning to write code is not that hard. With a book, Google, and a little free time just about anyone can hack something together. However, to become a good software developer you need a passion to constantly and continually learn. &lt;div class="entry"&gt;  &lt;p&gt;Listed below is a list of 7 of the harder things I have learned over the last couple of years:&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;strong&gt;Make choices&lt;/strong&gt; - Not everything needs to be adjustable or needs an option. Many times, it just needs to work.   &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Delete code&lt;/strong&gt; - Sometimes even the best ideas will not work (or are not worth keeping). Admit that at this time, based on what you know, the tools at your disposal, and the requirements for success you just need to move on.&amp;nbsp; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;NIH&lt;/strong&gt; (&lt;a href="http://en.wikipedia.org/wiki/Not_Invented_Here"&gt;not invented here&lt;/a&gt;) - Realize that even though you would have written something better, more scalable, and usable...if it meets your goals as is, you should focus your attention elsewhere. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;UI is more important than code&lt;/strong&gt; - You can write the absolute best code the world has ever seen and if you present it like a turd, your code, to the world is a turd. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Solve Problems&lt;/strong&gt; - Realize that to more than 99.9% of the worlds population, code/technology are simply a means to an end. Software solves problems. The world really doesn&amp;#39;t care how or why it works. &lt;strong&gt;&lt;/strong&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;You Are Different&lt;/strong&gt; - When you write software, in most cases, you are not the typical end user. Your users are not looking for a challenge. For most, there are a million other things they would rather be doing than using your application. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Documentation&lt;/strong&gt; - Yes, documentation is necessary, but users do NOT want to read it. If your users are asking you for more documentation, the lack of documentation is not really the problem. Your application is too complicated.&amp;nbsp; See &lt;a href="http://www.useit.com/alertbox/activeuserparadox.html"&gt;The Paradox of the Active User&lt;/a&gt;. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Is there anything you would add to the list? You can add your item in his original post here: &lt;/p&gt;&lt;p&gt;&lt;a href="http://simpable.com/software/7-hard-things/"&gt;http://simpable.com/software/7-hard-things/&lt;/a&gt;&lt;br&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-6704575305147260695?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/6704575305147260695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=6704575305147260695&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6704575305147260695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6704575305147260695'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/11/7-of-hardest-things-learned-about.html' title='7 of the Hardest Things Learned About Writing Software'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-2894928805801982477</id><published>2007-11-20T12:12:00.001+03:30</published><updated>2007-11-20T12:50:29.216+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Visual Studio 2008 and .NET 3.5 Released</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;Today Microsoft shipped Visual Studio 2008 and .NET 3.5. &lt;br /&gt;You can download the final release using one of the links below:&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;"&gt; &lt;/span&gt;&lt;ul&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;li&gt;&lt;p&gt;If you are a MSDN subscriber, you can download your copy from the MSDN subscription site (note: some of the builds are just finishing being uploaded now - so check back later during the day if you don't see it yet).&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;If you are a non-MSDN subscriber, you can download a 90-day free trial edition of Visual Studio 2008 Team Suite &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=D95598D7-AA6E-4F24-82E3-81570C5384CB&amp;amp;displaylang=en" target="_blank"&gt;here&lt;/a&gt;.  A 90-day trial edition of Visual Studio 2008 Professional (which will be a slightly smaller download) will be available next week.  A 90-day free trial edition of Team Foundation Server can also be downloaded &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=B0155166-B0A3-436E-AC95-37D7E39A440C&amp;amp;displaylang=en" target="_blank"&gt;here&lt;/a&gt;. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;If you want to use the free Visual Studio 2008 Express editions (which are much smaller and totally free), you can download them &lt;a href="http://www.microsoft.com/express/download/" target="_blank"&gt;here&lt;/a&gt;.  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;If you want to just install the .NET Framework 3.5 runtime, you can download it &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&amp;amp;displaylang=en" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;&lt;a href="http://weblogs.asp.net/scottgu/about.aspx"&gt;ScottGu &lt;/a&gt;has reviewed some of new features of Visual Studio 2008 so you can read more about this in his &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/11/19/visual-studio-2008-and-net-3-5-released.aspx"&gt;weblog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fcsharptuning.blogspot.com%2f2007%2f11%2fvisual-studio-2008-and-net-35-released.html "&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fcsharptuning.blogspot.com%2f2007%2f11%2fvisual-studio-2008-and-net-35-released.html " border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-2894928805801982477?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/2894928805801982477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=2894928805801982477&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/2894928805801982477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/2894928805801982477'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/11/visual-studio-2008-and-net-35-released.html' title='Visual Studio 2008 and .NET 3.5 Released'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-5003052265315061155</id><published>2007-10-31T11:16:00.001+03:30</published><updated>2007-10-31T11:16:15.194+03:30</updated><title type='text'>mojoPortal Wins Best Other Open Source CMS 2007</title><content type='html'>Yesterday, &lt;a href="http://www.mojoportal.com/"&gt;mojoPortal &lt;/a&gt;Wins Best Other Open Source Content Management System.&lt;br&gt; &lt;strong&gt;mojoPortal&lt;/strong&gt;, is an open source web site framework and content management system written in C#&amp;nbsp;that runs&amp;nbsp;under &lt;a href="http://ASP.NET"&gt;ASP.NET&lt;/a&gt;&amp;nbsp;on Windows or under &lt;a href="http://www.mono-project.com/Main_Page"&gt; Mono&lt;/a&gt; on Linux or Mac OS X. &lt;br&gt; &lt;br&gt;&lt;span style="font-weight: bold;"&gt;About The Award:&lt;/span&gt;&lt;br&gt;The Packt Open Source Content Management System Award is designed to encourage, support, recognize and reward an Open Source Content Management System (CMS) that has been selected by a panel of judges and visitors to &lt;a href="http://www.packtpub.com/"&gt;www.&lt;span style="font-weight: bold;"&gt;Packt&lt;/span&gt;Pub.com&lt;/a&gt;. Following on from the success of 2006, Packt has expanded the Award for 2007 with an increase in prize money and the addition of new categories.&lt;br&gt; &lt;i&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;The 2007 Award will continue to support open source Content Management Systems and in order to reward more than one project, Packt has developed new categories for a wider variety of CMS's to benefit from. These are broken down into five different categories including the overall winner and the most promising Open Source CMS: &lt;ul&gt;&lt;li&gt;&lt;a href="http://www.packtpub.com/article/open-source-cms-overall-winner-finalists"&gt;Overall Winner&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.packtpub.com/article/open-source-cms-most-promising-finalists"&gt;Most Promising Open Source CMS&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.packtpub.com/article/open-source-cms-php-finalists"&gt;Best Open Source PHP CMS&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.packtpub.com/article/open-source-cms-other-finalists"&gt;Best Other Open Source CMS&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.packtpub.com/article/open-source-cms-social-networking-finalists"&gt;Best Social Networking CMS: &lt;br&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;After more than 18,000 votes, we&amp;#39;ve now closed the voting for the&amp;nbsp; 2007 Open Source CMS Awards. Votes are currently being counted and the judges decisions are coming through . The winners will be announced starting from Monday 29 October, in the following order:&lt;br&gt;&lt;br&gt;&lt;span style="font-weight: bold;"&gt;Monday 29 October:&lt;/span&gt;&lt;br&gt;&lt;a href="http://www.packtpub.com/article/open-source-cms-social-networking-finalists"&gt;Best Open Source Social Networking CMS &lt;/a&gt; &lt;span style="font-weight: bold;"&gt;&lt;br&gt;&lt;br&gt;Winner:&lt;/span&gt; WordPress&lt;br&gt;&lt;span style="font-weight: bold;"&gt;Joint Runners up:&lt;/span&gt; Drupal &amp;amp; Elgg&lt;br&gt;&lt;br&gt;&lt;span style="font-weight: bold;"&gt;Tuesday 30 October:&lt;/span&gt;&lt;br&gt;&lt;a href="http://www.packtpub.com/article/open-source-cms-other-finalists"&gt; Best Other Open Source CMS&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;span style="font-weight: bold;"&gt;Winner:&lt;/span&gt; mojoPortal&lt;br&gt;&lt;span style="font-weight: bold;"&gt;First Runner up:&lt;/span&gt; Plone&lt;br&gt;&lt;span style="font-weight: bold;"&gt;Second Runner up:&lt;/span&gt;  Silva&lt;i&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;/i&gt;&lt;br&gt;&lt;br&gt;you can read the full story &lt;a href="http://www.packtpub.com/award"&gt;here&lt;/a&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-5003052265315061155?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/5003052265315061155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=5003052265315061155&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/5003052265315061155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/5003052265315061155'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/10/mojoportal-wins-best-other-open-source.html' title='mojoPortal Wins Best Other Open Source CMS 2007'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-3627197174921897383</id><published>2007-10-29T09:33:00.000+03:30</published><updated>2007-10-29T09:36:43.252+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Sample Code Download</title><content type='html'>During last week I got some mails and comments about problem with downloading sample codes of posts. I just fixed the problem and now all of the post 's sample code link is working properly. But anyway if there was any problem please let me know.&lt;br /&gt;&lt;br /&gt;Masoud_TB&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-3627197174921897383?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/3627197174921897383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=3627197174921897383&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/3627197174921897383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/3627197174921897383'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/10/sample-code-download.html' title='Sample Code Download'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-1688318705579342468</id><published>2007-10-27T11:37:00.001+03:30</published><updated>2007-10-27T11:37:37.713+03:30</updated><title type='text'>Search .Net</title><content type='html'>  &lt;p class="MsoNormal"&gt;Actually finding something about .NET is easy by using Google or any other search engine, but a custom search engine will give you better and more reliable result.&lt;br&gt; If you want to have a customize search engine about .NET topics, you can take a look at &lt;a href="http://www.searchdotnet.com/"&gt;SearchDotNet.com&lt;/a&gt;. You can also recommend your favorite web site or book about .NET.&lt;br&gt; &lt;span style="font-size: 10pt;"&gt;Here is the site features as it said:&lt;/span&gt; &lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;strong&gt;OpenSearch support:&lt;/strong&gt;      If you&amp;#39;re using Firefox 2.0 or IE7 (or other OpenSearch client), you can      add SearchDotNet to your list of search engines.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;strong&gt;Google Gadgets:&lt;/strong&gt;      Add SearchDotNet to your &lt;a href="http://gmodules.com/ig/creator?url=http%3A%2F%2Fwww.google.com%2Fcoop/api/002213837942349435108/cse/jki1okx03jq/gadget" target="_blank"&gt;website&lt;/a&gt;, &lt;a href="http://fusion.google.com/add?moduleurl=http%3A//searchdotnet.com/searchnetgadget1.xml" target="_blank"&gt; Google home page&lt;/a&gt; or &lt;a href="http://www.searchdotnet.com/searchdotnet.gg"&gt;Google Desktop&lt;/a&gt;.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;strong&gt;Component search      engine:&lt;/strong&gt; Distinct Custom Search Engine includes the sites of      hundreds of component vendors.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;strong&gt;Book site:&lt;/strong&gt;      Top rated .NET related books.&lt;/li&gt;&lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-1688318705579342468?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/1688318705579342468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=1688318705579342468&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/1688318705579342468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/1688318705579342468'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/10/search-net.html' title='Search .Net'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-7184212133068617943</id><published>2007-09-10T16:49:00.001+03:30</published><updated>2007-09-10T16:49:34.889+03:30</updated><title type='text'>How to get list of windows user in C#</title><content type='html'>If you want to have the list of an specific windows group in C# you can get this list by these lines of code below. Notice that you have to add a reference to &lt;span style="font-style: italic; font-weight: bold;"&gt;System.DirectoryServices &lt;/span&gt;.&lt;br&gt;&lt;br&gt;&lt;span style="font-style: italic;"&gt;DirectoryEntry localMachine = new DirectoryEntry(&amp;quot;WinNT://&amp;quot; + &lt;/span&gt;&lt;span style="font-style: italic;"&gt;Environment.MachineName);&lt;/span&gt;&lt;br style="font-style: italic;"&gt; &lt;span style="font-style: italic;"&gt;DirectoryEntry admGroup = localMachine.Children.Find(&amp;quot;administrators&amp;quot;,&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&amp;quot;group&amp;quot;);&lt;/span&gt;&lt;br style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt; object members = admGroup.Invoke(&amp;quot;members&amp;quot;, null);&lt;/span&gt;&lt;br style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;foreach (object groupMember in (IEnumerable)members)&lt;/span&gt;&lt;br style="font-style: italic;"&gt; &lt;span style="font-style: italic;"&gt;{&lt;/span&gt;&lt;br style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DirectoryEntry member = new DirectoryEntry(groupMember);&lt;/span&gt;&lt;br style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; lstUsers.Items.Add(member.Name);&lt;/span&gt;&lt;br style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;}&lt;/span&gt;&lt;br style="font-style: italic;"&gt;&lt;br&gt;you can download the source code here:&lt;br&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/WindowsGroupMember.rar"&gt; http://www.tabatabaei.info/csharpsamples/WindowsGroupMember.rar&lt;/a&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-7184212133068617943?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/7184212133068617943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=7184212133068617943&amp;isPopup=true' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/7184212133068617943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/7184212133068617943'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/09/how-to-get-list-of-windows-user-in-c.html' title='How to get list of windows user in C#'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-8264347291818400722</id><published>2007-09-08T11:14:00.001+03:30</published><updated>2007-09-08T13:47:23.984+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Forms'/><title type='text'>Detecting is current user an Administrator</title><content type='html'>In some cases in your windows application you may want to know is the current user a member of &lt;span style="FONT-WEIGHT: bold"&gt;Aministrators &lt;/span&gt;group or not?&lt;br /&gt;To detect this you can get an object of &lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;WindowsIdentity &lt;/span&gt;like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;WindowsIdentity identity = WindowsIdentity.GetCurrent();&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Then create an instance of &lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;WindowsPrincipan &lt;/span&gt;by :&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;WindowsPrincipal principal = new WindowsPrincipal(identity);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;and finally check it by using &lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;IsInRole()&lt;/span&gt;&lt;span style="FONT-WEIGHT: bold"&gt; &lt;/span&gt;method like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;string role = &lt;span style="FONT-WEIGHT: bold"&gt;"BUILTIN\\Administrators"&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;bool IsAdmin = &lt;/span&gt;&lt;/span&gt;principal.IsInRole(role));&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;then you can use the IsAdmin variable to determine whether the current user is an Admin or not.&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt; &lt;span style="FONT-STYLE: italic"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-8264347291818400722?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/8264347291818400722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=8264347291818400722&amp;isPopup=true' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/8264347291818400722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/8264347291818400722'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/09/detecting-is-current-user-is.html' title='Detecting is current user an Administrator'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-3637778616755296788</id><published>2007-09-05T16:49:00.001+03:30</published><updated>2007-09-06T13:46:05.845+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Distributed Application'/><title type='text'>Remoting in C#</title><content type='html'>While you are developing distributed application by csharp, you might need to have communication between objects that run in different processes.&lt;br /&gt;.NET remoting enables client applications to use objects in other processes on the same computer or on any other computer available on its network.(MSDN)&lt;br /&gt;&lt;br /&gt;Each remoting application consist of three part:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;A remotable object.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;A host application domain to listen for requests for that object.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;A client application domain that makes requests for that object.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;We have two kind of &lt;span style="font-weight: bold;"&gt;remotable &lt;/span&gt;objects, one &lt;span style="font-weight: bold;"&gt;Marshal-by-value&lt;/span&gt; objects and &lt;span style="font-weight: bold;"&gt;Marshal-by-reference &lt;/span&gt;objects.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Marshal-by-value objects are either inherited from &lt;span style="font-weight: bold; font-style: italic;"&gt;ISerializable &lt;/span&gt;interface or using a &lt;span style="font-weight: bold; font-style: italic;"&gt;Serializable &lt;/span&gt;attribute, which are copied and passed from the application domain.&lt;/li&gt;&lt;li&gt;Marshal-by-reference objects are the objects from a class which is inherited from &lt;span style="font-weight: bold; font-style: italic;"&gt;MarshalByRefObject &lt;/span&gt;class.&lt;/li&gt;&lt;/ul&gt;Notice that the objects from other classes which are not in that two types cannot be used in remoting.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Part 1: Remotable Types&lt;/span&gt;&lt;br /&gt;In my first post about remoting I will create a class named "MyRemotableType" which is a &lt;span style="font-weight: bold;"&gt;Marshal-by-reference &lt;/span&gt;type, and I will put this class into a class library with name &lt;span style="font-weight: bold;"&gt;MyRemotableTypes.dll.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;public class MyRemotableType:MarshalByRefObject&lt;br /&gt;{&lt;br /&gt;   public MyRemotableType()&lt;br /&gt;  {&lt;br /&gt;       Console.WriteLine("A New MarshalByRefObject created");&lt;br /&gt;&lt;span style="font-style: italic;"&gt;   &lt;/span&gt;}&lt;br /&gt;  public void AddNumbers(int a,int b)&lt;br /&gt;&lt;span style="font-style: italic;"&gt;   {&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        Console.WriteLine("Sum is : {0}",a+b);&lt;/span&gt;&lt;br /&gt;  }&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;  public string CaldSum(int a,int b)&lt;br /&gt;&lt;span style="font-style: italic;"&gt;   {&lt;br /&gt;       return string.Format("Sum is: {0}", a + b);&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;Notice that  Marshal-by-reference objects needs to be activated. Activation for Marshal-by-reference objects has two types:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;Server activation: which means that objects will be created by server at the first method call, but not when the object is initializing by calling &lt;span style="font-weight: bold; font-style: italic;"&gt;new&lt;/span&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;keyword.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Client activation: which means that objects will be created by server when the client calls the &lt;span style="font-weight: bold; font-style: italic;"&gt;new &lt;/span&gt;keyword.&lt;/li&gt;&lt;/ul&gt;Server activation it self contains two types, which can be specified with using &lt;span style="font-size:0;"&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;WellKnownObjectMode &lt;/span&gt;enumeration items:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;Singleton: It means that there will always be only one instance, regardless of how many clients there are for that object, and which have a default lifetime.&lt;/li&gt;&lt;li&gt;SingleCall: It means that the system creates a new object for each client method invocation.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Part 2: Host Application&lt;/span&gt;&lt;br /&gt;Now I need another application which will listen to request from clients. In this sample I 'm going to create a console application. First I have to add a reference to System.RunTime.Remoting. Then I have to prepare a communication line between clients and server. To do this you can use a TCP or HTTP channel. Like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;HttpChannel channel = new HttpChannel(1234);&lt;br /&gt;ChannelServices.RegisterChannel(channel);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Then you have register the remotable types you want to prepare. As I said before you can choose with activation you want to use. If you want to have Server Activation use this line of code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;RemotingConfiguration.RegisterWellKnownServiceType(&lt;span style="font-weight: bold;"&gt;typeof(MyRemotableType)&lt;/span&gt;,"&lt;span style="font-weight: bold;"&gt;RemotingTest.soap&lt;/span&gt;", &lt;span style="font-weight: bold;"&gt;WellKnownObjectMode&lt;/span&gt;.&lt;span style="font-weight: bold;"&gt;Singleton&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Console.WriteLine("Remote server started ...\r\nPress enter to stop"); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Console.ReadLine();&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Notice that in line above I used the &lt;span style="font-weight: bold; font-style: italic;"&gt;Singleton &lt;/span&gt;but you can change it to &lt;span style="font-weight: bold; font-style: italic;"&gt;SingleCall&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;, also.You can also use &lt;span style="font-weight: bold; font-style: italic;"&gt;RegisterActivatedServiceType&lt;/span&gt; . Notice that here in server application I used &lt;span style="font-style: italic;"&gt;ReigsterXXXX&lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Services&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Type&lt;/span&gt;&lt;br /&gt;but in the client side you have to use &lt;span style="font-style: italic;"&gt;RegisterXXXX&lt;span style="font-weight: bold;"&gt;Client&lt;/span&gt;Type.&lt;/span&gt; And I also passed a name for this channel &lt;span style="font-weight: bold;"&gt;" RemotingTest.soap", &lt;/span&gt;this name is used to find the remote channel.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Part 3: Client Application&lt;br /&gt;&lt;/span&gt;Now I want to use &lt;span style="font-weight: bold; font-style: italic;"&gt;MyRemotableType &lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;and create instance from that but as a remote object. To do this first I add a reference to my &lt;span style="font-weight: bold;"&gt;MyRemotableTypes.dll.&lt;/span&gt;  The I have to set the channel in my client application. I do this by using the &lt;span style="font-weight: bold; font-style: italic;"&gt;RegisterWellKnownClientType &lt;/span&gt;method of &lt;span style="font-weight: bold; font-style: italic;"&gt;RemotingConfiguration, &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;as I said before.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;RemotingConfiguration.RegisterWellKnownClientType(typeof(MyRemotableType),"http://RemoteServerName/RemotingTest.soap");&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;But notice that you give the type you want to use by remoting and also the url of remote server as parameters.&lt;br /&gt;Now try to create some objects from the &lt;span style="font-weight: bold;"&gt;MyRemotableType.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;MyRemotableType t = new MyRemotableType();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;t.AddNumbers(10,10);&lt;br /&gt;Console.WriteLine(t.CaldSum(10,10));&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Part 4: Test the Applications&lt;br /&gt;&lt;/span&gt;Now for testing the application, first run the Server Application,&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;then while the server is running start the client application. And see the result.&lt;br /&gt;&lt;br /&gt;As you may see, you will get just one line printed in client :&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Sum is: 20&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But in server side you got two printed line:&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;A New MarshalByRefObject created&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;ُS&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt; um is: 20&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;It means that you the object is created on server and the first method call is Writing to Console of server, but the result of method is accessible in client.&lt;br /&gt;&lt;br /&gt;It will discuss more about remoting in my next posts.&lt;br /&gt;You can download the sample code at:&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/firstremoting.rar"&gt;http://www.tabatabaei.info/csharpsamples/firstremoting.rar&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-3637778616755296788?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/3637778616755296788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=3637778616755296788&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/3637778616755296788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/3637778616755296788'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/09/remoting-in-c_05.html' title='Remoting in C#'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-7625644964257167109</id><published>2007-09-04T14:24:00.001+03:30</published><updated>2007-09-04T14:41:47.138+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework'/><title type='text'>C# Copy Semantics</title><content type='html'>Let 's talk about &lt;span style="FONT-WEIGHT: bold"&gt;Copy Semantics&lt;/span&gt; a little bit in &lt;a href="http://csharptuning.blogspot.com/"&gt;C# Tuning&lt;/a&gt;&lt;br /&gt;There is three type of object copy in C#.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Reference copy&lt;/li&gt;&lt;li&gt;Shallow copy&lt;/li&gt;&lt;li&gt;Deep copy&lt;/li&gt;&lt;/ol&gt;As you may now the default behavior of c# compiler is the first one. Let me explain it by a sample:&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;br /&gt;Person p = new Person("Ali", 40); &lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;Person p2 = p;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;p2.Name = "Reza";&lt;br /&gt;Console.WriteLine(p.Name); // ==&amp;gt;&amp;gt; the result is Reza&lt;br /&gt;Console.WriteLine (p2.Name); // ==&amp;gt;&amp;gt; the result is Reza&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;By default when you have the code above you will get a reference copy of your &lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;p &lt;/span&gt;object. It means that, if you change the value of &lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;p2&lt;/span&gt;&lt;/span&gt; it will effect the values of &lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;p.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;So if I want a real copy of my object what I have to do?&lt;br /&gt;There is two way to do this, but with a different. Imagine that I have a class named &lt;span style="FONT-WEIGHT: bold"&gt;Invoice&lt;/span&gt; which has a reference to &lt;span style="FONT-WEIGHT: bold"&gt;Person &lt;/span&gt;class, like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;public class Invoice&lt;br /&gt;{&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;      public int No;&lt;br /&gt;      public DateTime Date;&lt;br /&gt;     public Person Customer;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;     //.............&lt;br /&gt;}&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Now I want to have a copy of my &lt;span style="FONT-WEIGHT: bold"&gt;Invoice &lt;/span&gt;object &lt;span style="FONT-WEIGHT: bold"&gt;inc. &lt;span style="FONT-WEIGHT: bold"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;br /&gt;Invoice inc = new Invoice("1001",DateTime.Now,new Person("Reza",40));&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;// Invoice inc2 = inc; // It 's not what I really want.&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;So I have to use the second type of object copy which is &lt;span style="FONT-WEIGHT: bold"&gt;Shallow copy. &lt;span style="FONT-WEIGHT: bold"&gt;&lt;/span&gt;&lt;/span&gt;In &lt;span style="FONT-WEIGHT: bold"&gt;Shallow Copy&lt;/span&gt; you will get a new object with all the values copies to the new object. But the point is that you just &lt;span style="FONT-WEIGHT: bold"&gt;have a reference copy of you related references types &lt;/span&gt;(like Customer: Person). To get a Shallow Copy of your object you can use &lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;MemberwiseClone() &lt;/span&gt;method of &lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;object&lt;/span&gt;. I've created a method called &lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;ShallowCopy() &lt;/span&gt;&lt;span style="FONT-WEIGHT: bold"&gt;&lt;/span&gt;in my &lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;Invoice&lt;/span&gt; class.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;public Invoice ShallowCopy()&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;return (Invoice)this.MemberwiseClone();&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;} &lt;/span&gt;&lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then if you create an object copy of your invoice and change No or Date values this will not effect to the inc object values. But changing the value of it 's Customer, will do:&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-STYLE: italic"&gt;Invoice inc2 = inc.ShallowCopy();&lt;br /&gt;inc2.No = 1002;&lt;br /&gt;inc2.Customer.Name = "Masoud";&lt;br /&gt;Console.WriteLine("Invoice No: {0}, Customer Name :{1}",inc.No,inc.Customer.Name); // ==&amp;gt; &lt;/span&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;I&lt;/span&gt; nvoice No: 1001, Customer Name : Masoud&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;Console.WriteLine("Invoice No: {0}, Customer Name :{1}",inc2.No,inc2.Customer.Name);// ==&amp;gt; &lt;/span&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;/span&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;I&lt;/span&gt;nvoice No: 1002, Customer Name : Masoud&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-WEIGHT: bold"&gt;&lt;/span&gt;To get a Deep Copy of you object, you have to implement &lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;IClonable &lt;/span&gt;interface for &lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;Invoice &lt;/span&gt;and all of it 's related classes:&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;br /&gt;public class Invoice: IClonable&lt;br /&gt;{&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;      public int No;&lt;br /&gt;      public DateTime Date;&lt;br /&gt;     public Person Customer;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;     //.............&lt;br /&gt;&lt;br /&gt;      public object Clone()&lt;br /&gt;     {&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;          Invoice myInvoice = (Invoice)this.MemberwiseClone();&lt;br /&gt;          myInvoice.Customer = (Person) this.Customer.Clone();&lt;br /&gt;          return myInvoice;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-STYLE: italic"&gt;      }&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class Person: IClonable&lt;br /&gt;{&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;       public string Name;&lt;br /&gt;       public int Age;&lt;br /&gt;&lt;br /&gt;     public object Clone()&lt;br /&gt;    {&lt;br /&gt;        return this.MemberwiseClone();&lt;br /&gt;    }&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Now you have a real deep copy of you &lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;invoice &lt;/span&gt;object.&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;I&lt;/span&gt;nvoice inc3 = (Invoice) inc.Clone();&lt;br /&gt;inc3.No = 1003;&lt;br /&gt;inc3.Customer.Name = "Mohammad";&lt;br /&gt;Console.WriteLine("Invoice No: {0}, Customer Name :{1}",inc.No,inc.Customer.Name); // ==&amp;gt; &lt;/span&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;I&lt;/span&gt; nvoice No: 1001, Customer Name : Masoud&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;Console.WriteLine("Invoice No: {0}, Customer Name :{1}",inc2.No,inc2.Customer.Name);// ==&amp;gt; &lt;/span&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;/span&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;I&lt;/span&gt;nvoice No: 1002, Customer Name : Masoud&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-STYLE: italic"&gt;Console.WriteLine("Invoice No: {0}, Customer Name :{1}",inc3.No,inc3.Customer.Name);// ==&amp;gt; &lt;/span&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;/span&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;I&lt;/span&gt;nvoice No: 1003, Customer Name : Mohammad&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can download the sample code at:&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/copysemantics.rar"&gt;http://www.tabatabaei.info/csharpsamples/copysemantics.rar&lt;/a&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-7625644964257167109?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/7625644964257167109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=7625644964257167109&amp;isPopup=true' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/7625644964257167109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/7625644964257167109'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/09/c-copy-semantics.html' title='C# Copy Semantics'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-5877785202128654557</id><published>2007-08-19T14:27:00.001+03:30</published><updated>2007-08-20T14:33:39.415+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Forms'/><category scheme='http://www.blogger.com/atom/ns#' term='Distributed Application'/><title type='text'>Service Controller Sample</title><content type='html'>In this sample I've used the &lt;span style="FONT-STYLE: italic"&gt;ServiceController &lt;/span&gt;class to view services installed on local or any machine.&lt;br /&gt;You can download the source code here:&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/serviceController.rar"&gt;http://www.tabatabaei.info/csharpsamples/serviceController.rar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Please let me know if there was any question.&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-5877785202128654557?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/5877785202128654557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=5877785202128654557&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/5877785202128654557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/5877785202128654557'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/08/service-controller-sample.html' title='Service Controller Sample'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-4654171000188284932</id><published>2007-08-19T13:26:00.000+03:30</published><updated>2007-08-20T14:35:44.876+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Forms'/><category scheme='http://www.blogger.com/atom/ns#' term='Distributed Application'/><title type='text'>Windows Service Applications</title><content type='html'>In some cases you may want to have an application which is performing since the computer has been turned on. For instance consider an application which is logging changes in an specific directory in your server, or you might think about Anti Viruses or any other application like that.&lt;br /&gt;&lt;br /&gt;Windows Services a kind of windows application without any user interface, which is working in background of your system. In many situation you may want to have an application which is working on your system, event before any user has been logged in.&lt;br /&gt;&lt;br /&gt;There is a class names &lt;span style="FONT-STYLE: italic"&gt;ServiceBase &lt;/span&gt;in &lt;span style="FONT-STYLE: italic"&gt;System.ServiceProcess&lt;/span&gt; namespace which has to be derived if you want to have your own Windows Service application. The &lt;span style="FONT-STYLE: italic"&gt;ServiceBase &lt;/span&gt;classs has &lt;span style="FONT-STYLE: italic"&gt;OnStart() &lt;/span&gt;method which will occur when the service has been started using SCM (&lt;span style="font-size:-1;"&gt;Service Control Manager) which is accessible by Services icon on Administrative Tools of Control Panel. You can override the &lt;span style="FONT-STYLE: italic"&gt;OnStart() &lt;/span&gt;method for doing any special task in your service. You can also stop your service tasks by overriding the &lt;span style="FONT-STYLE: italic"&gt;OnStop()&lt;/span&gt; method of &lt;span style="FONT-STYLE: italic"&gt;ServiceBase.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Consider that every service class needs an Service Installer to install the service. So for creating the service installer just goto design mode of your service class and Right Click on it and then click on &lt;span style="FONT-WEIGHT: bold"&gt;Add Installer &lt;/span&gt;then you will see that a new class has been added to your project. Consider that your services will be run with an specific User of system, to change this behavior you have to change the &lt;span style="FONT-WEIGHT: bold"&gt;Account &lt;/span&gt;property of &lt;span style="FONT-STYLE: italic"&gt;ServiceProcessIntaller &lt;/span&gt;instance in the new added class to &lt;span style="FONT-WEIGHT: bold"&gt;LocalSystem.&lt;/span&gt; In the next post I will talk more about other accounts and properties of this class.&lt;br /&gt;&lt;br /&gt;َFor running a service you SCM first you have to install. To achieve this goal you can use the &lt;span style="FONT-WEIGHT: bold"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;InstallUtil&lt;/span&gt;&lt;/span&gt; application with your assembly (the exe file) passed as parameter. You may also want to uninstall a service which can be done by passing &lt;span style="FONT-WEIGHT: bold"&gt;/U &lt;/span&gt;at the end of &lt;span style="FONT-WEIGHT: bold"&gt;InstallUtil.&lt;/span&gt;&lt;br style="FONT-WEIGHT: bold"&gt;&lt;br style="FONT-WEIGHT: bold"&gt;&lt;/span&gt;I've prepared a sample which will log all the changes in a specified directory within the configuration file. The log file path is also can be set within the configuration file.&lt;br /&gt;&lt;br /&gt;You can download the source code here:&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/systemwatcher.rar"&gt;http://www.tabatabaei.info/csharpsamples/systemwatcher.rar&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-4654171000188284932?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/4654171000188284932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=4654171000188284932&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4654171000188284932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4654171000188284932'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/08/windows-service-applications.html' title='Windows Service Applications'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-392967964771287074</id><published>2007-07-16T13:07:00.000+03:30</published><updated>2007-10-29T09:31:46.155+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Forms'/><title type='text'>Adding a control into Menu or Toolbar</title><content type='html'>You can add a control into a menu, context menu or toolbar by using a ToolStripControlHost class.&lt;br /&gt;Just pass the control reference to constructor of ToolStripControlHost class and then add your ToolStripControlHost instance as a MenuItem in you Menu or .... Just take a look at the code below:&lt;br /&gt;&lt;br /&gt;&lt;pre class="alt2" dir="ltr" style="BORDER-RIGHT: 1px inset; PADDING-RIGHT: 6px; BORDER-TOP: 1px inset; PADDING-LEFT: 6px; PADDING-BOTTOM: 6px; MARGIN: 0px; OVERFLOW: auto; BORDER-LEFT: 1px inset; PADDING-TOP: 6px; BORDER-BOTTOM: 1px inset; TEXT-ALIGN: left"&gt;private void Form1_Load(object sender, EventArgs e)&lt;br /&gt;  {&lt;br /&gt;      MonthCalendar picker = new MonthCalendar();&lt;br /&gt;      picker.DateSelected += new DateRangeEventHandler(picker_DateSelected);&lt;br /&gt;      &lt;b&gt;ToolStripControlHost host = new ToolStripControlHost(picker);&lt;/b&gt;&lt;br /&gt;      &lt;b&gt;fileToolStripMenuItem.DropDownItems.Insert(2,host&lt;/b&gt;);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  void picker_DateSelected(object sender, DateRangeEventArgs e)&lt;br /&gt;  {&lt;br /&gt;      MonthCalendar picker = ((MonthCalendar)sender);&lt;br /&gt;      this.Text = picker.SelectionStart.ToString("yyyy/MMM/dd");&lt;br /&gt;  }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You can download the sample code:&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/CalendarContext.rar"&gt;http://www.tabatabaei.info/csharpsamples/CalendarContext.rar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span dir="rtl"&gt;&lt;br /&gt;نسخه فارسي اين پست رو مي تونين از طريق لينك زير پيدا كنين:&lt;br /&gt;&lt;a href="http://www.developercenter.ir/Forum/showthread.php?t=7183"&gt;DeveloperCenter.ir&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-392967964771287074?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/392967964771287074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=392967964771287074&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/392967964771287074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/392967964771287074'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/06/adding-control-into-menu-or-toolbar.html' title='Adding a control into Menu or Toolbar'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-4765225949222876143</id><published>2007-06-25T14:01:00.000+03:30</published><updated>2007-10-29T09:29:19.532+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Forms'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>Hashing Passwords</title><content type='html'>In many web site you have seen that they reset your password instead of giving your current password. The only reason that they do this is that actually they cannot retrieve your password.&lt;br /&gt;The way that you store passwords in databases it 's really important. If you store all the users and passwords in clear text, if somebody can access to your database she might do what ever she want. Because of this it 's recommended to store passwords in a way that nobody can get it.&lt;br /&gt;In &lt;span style="font-style: italic;"&gt;Hash &lt;/span&gt;algorithms you cannot get the original value from the hashed value. And It 's approximately impossible to find a value which the hash of that value become the same as your hashed value. (But not 100%). So I 'm going to tell you how you can &lt;span style="font-style: italic;"&gt;Hash &lt;/span&gt;your password and store that in your database.&lt;br /&gt;&lt;br /&gt;In &lt;span style="font-style: italic;"&gt;System.Security.Cryptography&lt;/span&gt; namespace there is a class named HashAlgorithm which is a base class for all Hashing algorithm classes such as &lt;span style="font-style: italic;"&gt;SHA1Managed &lt;/span&gt;or &lt;span style="font-style: italic;"&gt;MD5 &lt;/span&gt;and ...&lt;br /&gt;&lt;br /&gt;It has a method named &lt;span style="font-style: italic;"&gt;ComputeHash &lt;/span&gt;which return a &lt;span style="font-style: italic;"&gt;byte[]&lt;/span&gt; of hashed value you passed as &lt;span style="font-style: italic;"&gt;byte[]&lt;/span&gt;. Take a look at these lines:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;HashAlgorithm hashAl = HashAlgorithm.Create("MD5");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;byte[] myPasswordInBytes = Encoding.Unicode.GetBytes(txtPassword.Text);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;byte[] myHashedPassword = hashAl.ComputeHash(myPasswordInBytes);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Now you can store your hashed password in wherever you want.&lt;br /&gt;Notice that next time the user tries to login , you have to again hash the password and compare it with the one it 's stored in Database, like this: &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;private bool CompareHashPasswords(byte[] hashedNewPass, byte[] hashedPass)&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;{&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;      if (hashedNewPass == null || hashedPass == null || hashedNewPass.Length != hashedPass.Length)&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;            return false;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;for (int i = 0; i &lt;&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;{&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;      if (hashedPass[i] != hashedNewPass[i])&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;             return false;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;}&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;return true;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Download the sample code:&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/HashPassword.zip"&gt;http://www.tabatabaei.info/csharpsamples/HashPassword.zip&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-4765225949222876143?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/4765225949222876143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=4765225949222876143&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4765225949222876143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4765225949222876143'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/06/hashing-passwords.html' title='Hashing Passwords'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-4985563882738296016</id><published>2007-06-19T08:59:00.000+03:30</published><updated>2007-10-29T09:29:02.159+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Forms'/><title type='text'>Impersonation in C#</title><content type='html'>Imagine you are going to create an application that have a method which is working with a file named Test.txt. When you run the application your code throws an error containing this message : "Access Denied on C:\Test\test.txt". After reviewing the code you find out that because the current user of windows does not have access to "C:\Test" directory. Now you want to force your application to use another User information in that block of code, we call this procedure Impersonation.&lt;br /&gt;&lt;br /&gt;There is some classes in &lt;span style="font-style: italic;"&gt;System.Security.Principal &lt;/span&gt;which helps you to achieve this goal. &lt;span style="font-style: italic;"&gt;WindowsIdentity &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;WindowsImpersonationContext &lt;/span&gt;are two classes which we are going to use. We want to use &lt;span style="font-style: italic;"&gt;Impersonate()&lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt; &lt;/span&gt;method of &lt;span style="font-style: italic;"&gt;WindowsIdentity &lt;/span&gt;which return a &lt;span style="font-style: italic;"&gt;WindowsImpersonationContext&lt;/span&gt;. Then after you 've finished working with your file after calling &lt;span style="font-style: italic;"&gt;Impersonate() &lt;/span&gt;method, you can return you current login of windows using &lt;span style="font-style: italic;"&gt;Undo()&lt;/span&gt; method of your &lt;span style="font-style: italic;"&gt;WindowsImpersonationContext &lt;/span&gt;instance. like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;IntPtr&lt;span style="font-family: courier new;"&gt; &lt;/span&gt;accessToken&lt;span style="font-family: courier new;"&gt; = &lt;/span&gt;IntPtr&lt;span style="font-family: courier new;"&gt;.Zero;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;....&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;//You have to &lt;/span&gt;initialize&lt;span style="font-family: courier new;"&gt; your &lt;/span&gt;accessToken&lt;span style="font-family: courier new;"&gt; with &lt;/span&gt;API&lt;span style="font-family: courier new;"&gt; calling &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;....&lt;/span&gt;&lt;br /&gt;WindowsIdentity&lt;span style="font-family: courier new;"&gt; identity = new &lt;/span&gt;WindowsIdentity&lt;span style="font-family: courier new;"&gt;(&lt;/span&gt;accessToken&lt;span style="font-family: courier new;"&gt;);&lt;/span&gt;&lt;br /&gt;WindowsImpersonationContext&lt;span style="font-family: courier new;"&gt; context = identity.&lt;span style="font-weight: bold;"&gt;Impersonate()&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;// Now your code is using the new &lt;/span&gt;WindowsLogin&lt;span style="font-family: courier new;"&gt; and you can do what ever this &lt;/span&gt;login&lt;span style="font-family: courier new;"&gt; can do&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;//Now you can return to your current &lt;/span&gt;login&lt;span style="font-family: courier new;"&gt; of Windows&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;context&lt;span style="font-weight: bold;"&gt;.Undo();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can download the complete sample code here:&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/Impersonation.zip"&gt;http://www.tabatabaei.info/csharpsamples/Impersonation.zip&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-4985563882738296016?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/4985563882738296016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=4985563882738296016&amp;isPopup=true' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4985563882738296016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4985563882738296016'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/06/impersonation-in-c.html' title='Impersonation in C#'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-8293641746259944079</id><published>2007-06-11T11:40:00.000+03:30</published><updated>2007-10-29T09:28:41.824+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>Multi Row Selection in GridView</title><content type='html'>It some cases you want to have the ability to select mutli rows in &lt;em&gt;GridView&lt;/em&gt;. By default it can not be done in &lt;em&gt;GridView&lt;/em&gt;, but you can have a &lt;em&gt;CheckBox&lt;/em&gt; for each row in your &lt;em&gt;GridView&lt;/em&gt; and then users can select two or more row by checking the &lt;em&gt;CheckBoxes&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;So, after you created your &lt;em&gt;GridView&lt;/em&gt; and binding that to a &lt;em&gt;DataSource&lt;/em&gt;. You can add a &lt;em&gt;TemplateColumn&lt;/em&gt; in your &lt;em&gt;GirdView&lt;/em&gt; as the first Column. Like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;asp:TemplateField HeaderText="Select"&amp;gt; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;ItemTemplate&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;asp:CheckBox ID="&lt;strong&gt;chkSelect&lt;/strong&gt;" runat="server" /&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;/ItemTemplate&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;/asp:TemplateField&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Then you can have the selected rows index with these lines of code:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;private int[] GetSelectedIndices()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ArrayList indicesList = new ArrayList();&lt;/span&gt;&lt;br /&gt;&lt;/em&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;em&gt;for(int i = 0 ; i &lt;&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;GridViewRow row = GridView1.Rows[i];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;color:#33cc00;"&gt;// 0 means the first column if your Select column is not first write it 's correct index&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;CheckBox chk = row.Cells[&lt;strong&gt;0&lt;/strong&gt;].FindControl("&lt;strong&gt;chkSelect&lt;/strong&gt;") as CheckBox;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;if(chk != nul &amp;&amp;amp; chk.Checked)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;indeicesList.Add(i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;return (int[]) indicesList.ToArray(typeof(int));&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;you can find sample code here:&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/mutlirowselectgrid.zip"&gt;http://www.tabatabaei.info/csharpsamples/mutlirowselectgrid.zip&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-8293641746259944079?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/8293641746259944079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=8293641746259944079&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/8293641746259944079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/8293641746259944079'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/06/multi-row-selection-in-gridview.html' title='Multi Row Selection in GridView'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-6862700141964739365</id><published>2007-06-03T10:31:00.000+03:30</published><updated>2007-10-29T09:28:23.242+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework'/><title type='text'>Constructor Overloading</title><content type='html'>&lt;a href="http://www.bepors.net/ConstructorOverloading.zip"&gt;Here&lt;/a&gt; is a simple sample of constructor overloading.&lt;br /&gt;There is nothing to explain I think, but if anybody has question leave it on comment, I will answer.&lt;br /&gt;&lt;br /&gt;Here is the link:&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/ConstructorOverloading.zip"&gt;http://www.tabatabaei.info/csharpsamples/ConstructorOverloading.zip&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-6862700141964739365?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/6862700141964739365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=6862700141964739365&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6862700141964739365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6862700141964739365'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/06/constructor-overloading.html' title='Constructor Overloading'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-3376287410299961494</id><published>2007-06-01T15:17:00.000+03:30</published><updated>2007-06-02T09:14:16.515+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>ASP .NET Page Caching</title><content type='html'>&lt;em&gt;ASP .NET 2.0&lt;/em&gt; provides a great mechanism for page out put caching. Consider that you have a web page which is showing some information to the users. Now we want to cache this page out put for user with 60 seconds.&lt;br /&gt;&lt;br /&gt;To achieve this goal you need just put some code in your pages like this:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;%@ OutputCache VaryByParam="None" Duration="60" %&amp;gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The &lt;em&gt;OutputCache&lt;/em&gt; directive will create a copy of your page html output to &lt;em&gt;ASP .NET Cache&lt;/em&gt; and from the next request to this page up to the end of &lt;em&gt;Duration&lt;/em&gt; period the response object will return only this &lt;em&gt;Html&lt;/em&gt; cached output. So as you see I’ve put &lt;strong&gt;60&lt;/strong&gt; in &lt;em&gt;Duration&lt;/em&gt; which mean that the cache duration is &lt;strong&gt;60&lt;/strong&gt; seconds.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;VaryByParam&lt;/em&gt; attribute is semicolon-separated list of strings used to vary the output cache. When I set it to “&lt;em&gt;None&lt;/em&gt;” it means that this page will just have one version in its cache. But if I set it to &lt;strong&gt;catalogId&lt;/strong&gt; it means that it will cache each and every page with different &lt;strong&gt;catalogId&lt;/strong&gt; &lt;em&gt;Query String&lt;/em&gt; passed. Like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;http://www.mywebsite.com/mypage.aspx?catalogId=10 ==&gt; version 1&lt;br /&gt;&lt;br /&gt;http://www.mywebsite.com/mypage.aspx?catalogId=102 ==&gt; version 2&lt;br /&gt;&lt;br /&gt;http://www.mywebsite.com/mypage.aspx?catalogId=1010 ==&gt; version 3 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And so on....&lt;br /&gt;As I said, VaryByParam can have more that one parameters as semicolon-seperated list, like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;&amp;lt;%@ OutputCache VaryByParam="None" Duration="60" %&amp;gt;&lt;/strong&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I will discuss more about page output cache in my next post.&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-3376287410299961494?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/3376287410299961494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=3376287410299961494&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/3376287410299961494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/3376287410299961494'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/06/asp-net-page-caching.html' title='ASP .NET Page Caching'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-3332385596820322152</id><published>2007-05-30T13:57:00.000+03:30</published><updated>2007-05-30T14:03:36.388+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Sample Code Post</title><content type='html'>I was thinking about &lt;a href="http://csharptuning.blogspot.com/"&gt;C# Tuning&lt;/a&gt; and I found out that some days I don't have enough time to write an article and post it but there are lot 's of samples that can be published here and you can get some point over them. So I decided to create a new kind of posts, which I will call it "Sample Code Post".&lt;br /&gt;&lt;br /&gt;So I hope these samples can be useful for you and&lt;strong&gt; if there was any king of question &lt;/strong&gt;about these samples you can just &lt;strong&gt;comment&lt;/strong&gt; over the post and then I will answer to your questions.&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-3332385596820322152?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/3332385596820322152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=3332385596820322152&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/3332385596820322152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/3332385596820322152'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/05/sample-posts.html' title='Sample Code Post'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-196736929756221244</id><published>2007-05-29T14:21:00.000+03:30</published><updated>2007-10-29T09:27:29.976+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>Loading images asynchronously with JavaScripts</title><content type='html'>Sometime you may want to load a list of data in your web pages. Imagine that every row of your data has an image. So you can use a &lt;em&gt;GridView&lt;/em&gt; control in your webpage and create you template. The point that I 'm goint to cover in this post is about how to load the images of your rows asynchronously!&lt;br /&gt;&lt;br /&gt;It 's seems great to set a default image for your page that will be shown while the images is loading from the server asynchronously. Because that image is loaded once it will help your page load time. And then after page load completed you will start loading your images from server asynchronously.&lt;br /&gt;&lt;br /&gt;Let 's start with creating the &lt;em&gt;GridView&lt;/em&gt; control and setting an &lt;em&gt;XML&lt;/em&gt; file for it 's datasource by using an &lt;em&gt;XML&lt;/em&gt; &lt;em&gt;Datasource&lt;/em&gt; object in our form. The source code would be something like this:&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;asp:XmlDataSource ID="xmlDataSource1" runat="server" DataFile="~/App_Data/mySource.xml"&amp;gt;&amp;lt;/asp:XmlDataSource&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:GridView ID="gridView1" runat="Server" AutoGenerateColumns="False" DataSourceID="xmlDataSource1" Enabled="false"&amp;gt;&lt;br /&gt;&amp;lt;Columns&amp;gt;&lt;br /&gt;&amp;lt;asp:BoundField DataField="Author" HeaderText="Author" /&amp;gt;&lt;br /&gt;&amp;lt;asp:BoundField DataField="Title" HeaderText="Title" /&amp;gt;&lt;br /&gt;&amp;lt;asp:TemplateField&amp;gt;&lt;br /&gt;&amp;lt;HeaderTemplate&amp;gt;Image&amp;lt;/HeaderTemplate&amp;gt;&lt;br /&gt;&amp;lt;ItemTemplate&amp;gt;&lt;br /&gt;&amp;lt;img border="1" &lt;strong&gt;src="images/csharptuning.jpg"&lt;/strong&gt; &lt;strong&gt;onError="this.src=csharptuning.jpg" onLoad="GetArticleImage(this,'&amp;lt;%# Eval("ImageUrl")%&amp;gt;');"&lt;/strong&gt; width="125" height="125"/&amp;gt;&lt;br /&gt;&amp;lt;/ItemTemplate&amp;gt;&lt;br /&gt;&amp;lt;/asp:TemplateField&amp;gt;&lt;br /&gt;&amp;lt;/Columns&amp;gt;&lt;br /&gt;&amp;lt;/asp:GridView&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Notice that for loading the default image in each data row, I 've set the "&lt;em&gt;src&lt;/em&gt;" attribute of my image control to a default value like &lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;em&gt;&lt;strong&gt;src='csharptuning.jpg'&lt;/strong&gt;.&lt;/em&gt;&lt;/span&gt;I have also set something to load the actual images asynchronously after the loading of image controls.&lt;/p&gt;&lt;span style="font-family:georgia;"&gt;So, first I create a web page which is give me my images dynamically by a &lt;em&gt;QueryString&lt;/em&gt;. (I have been explained how to create these kind of pages &lt;/span&gt;&lt;a href="http://csharptuning.blogspot.com/2007/05/changing-content-type-of-web-page.html"&gt;&lt;span style="font-family:georgia;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:0;"&gt;&lt;span style="font-family:georgia;"&gt;).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Then I have to set it to load the actual image after the image control loaded. For this purpose I create a &lt;em&gt;JavaScript&lt;/em&gt; function in my page like this:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;em&gt;&amp;lt;script&amp;gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;function GetArticleImage(img, url)&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;{&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;img.onload = null;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;img.src = 'GetImages.aspx?fname=' + url;&lt;/span&gt;&lt;/em&gt;&lt;em&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;span style="font-family:georgia;font-size:100%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;span style="font-family:georgia;font-size:100%;"&gt;and then I added &lt;em&gt;&lt;strong&gt;&lt;span style="font-size:85%;"&gt;onLoad='GetArticleImage(this,&amp;lt;%# DataBinder.EvalContainer.DataItem,"ImageUrl") %&amp;gt;'&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt; event on my image control. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now you can start your page, then you will see that in first seconds you will get a default image for each record, but after some seconds (in my code is 5") you will get the actual result of your images.&lt;br /&gt;&lt;br /&gt;You can also download this sample by this link:&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/asyncImages.zip"&gt;http://www.tabatabaei.info/csharpsamples/asyncImages.zip&lt;/a&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-196736929756221244?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/196736929756221244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=196736929756221244&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/196736929756221244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/196736929756221244'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/05/loading-images-asynchronously-with.html' title='Loading images asynchronously with JavaScripts'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-4093553396635736328</id><published>2007-05-28T15:07:00.000+03:30</published><updated>2007-10-29T09:26:55.676+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Forms'/><title type='text'>Background Worker</title><content type='html'>&lt;p&gt;I 'm going to explain how you can use the C# &lt;em&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;BackgroundWorker&lt;/span&gt;&lt;/em&gt; component of &lt;em&gt;System.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;ComponentModel&lt;/span&gt;&lt;/em&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;namespace&lt;/span&gt;, in your windows form applications. &lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;BackgroundWorker&lt;/span&gt;&lt;/em&gt; component gives you a way to run a time-consuming task on a separate thread. Actually it works the same way as the asynchronous delegates, but in asynchronous delegate approach you have to consider some issues about working with your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;UI&lt;/span&gt; elements, because there are running on another thread. In &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;BackgroundWorker&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;marshalling&lt;/span&gt; issues are abstracted away with an event-based model.&lt;/p&gt;&lt;p&gt;Now let start working with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;BackgroundWorker&lt;/span&gt;.&lt;br /&gt;First, you need an instance of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;BackgroundWorker&lt;/span&gt; class,  no diff you are creating this &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;programmatically&lt;/span&gt; or by dragging it onto a form at design time from your Component tab of Toolbox.&lt;br /&gt;&lt;br /&gt;Next step is to set the event handlers of you object, and finally you have to call &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;RunWorkerAsync&lt;/span&gt;() method.&lt;br /&gt;&lt;br /&gt;Whenever you call this method it get a free thread from &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;CLR&lt;/span&gt; and fires &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;DoWork&lt;/span&gt; event. Now you put your codes (The codes that you want to be executed in another thread) in event handler of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;DoWork&lt;/span&gt; event. If the code completed it will raise an event called &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;RunWorkerCompleted&lt;/span&gt; to notify you. It 's important to know that this event is not raised on the new thread instead, it will be raised on main thread of your application.&lt;/p&gt;&lt;p&gt;In many cases you may want to prepare some information (Arguments) for your time-consuming task. So, you can achieve this by passing an object into &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;RunWorkerAsync&lt;/span&gt;() method, this object is accessible in your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;DoWork&lt;/span&gt; event as an object with it 's event argument.&lt;/p&gt;&lt;p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The event &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;args&lt;/span&gt; of &lt;em&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;DoWork&lt;/span&gt;&lt;/em&gt; event is an object of type &lt;em&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;DoWorkEventArgs&lt;/span&gt;&lt;/em&gt;.&lt;br /&gt;In this object you have a property called &lt;em&gt;Argument&lt;/em&gt; for getting what you have passed in &lt;em&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;RunWorkerAsync&lt;/span&gt;&lt;/em&gt;() method. You can use it in your time-consuming task. &lt;/p&gt;&lt;p&gt;Then you may want to have the result of your task in your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;UI&lt;/span&gt;. Again for this purpose you have a property called &lt;em&gt;Result&lt;/em&gt; which you can set it in your &lt;em&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;DoWorkEventArgs&lt;/span&gt;&lt;/em&gt;. And it will be accessible in your &lt;em&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;RunWorkerCompletedEventArgs&lt;/span&gt;&lt;/em&gt; of &lt;em&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;RunWorkerCompleted&lt;/span&gt;&lt;/em&gt; event. &lt;/p&gt;&lt;p&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;BackgroundWorker&lt;/span&gt; sample download link:&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/backgroundworker.zip"&gt;http://www.tabatabaei.info/csharpsamples/backgroundworker.zip&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-4093553396635736328?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/4093553396635736328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=4093553396635736328&amp;isPopup=true' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4093553396635736328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4093553396635736328'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/05/background-worker.html' title='Background Worker'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-4871665104195472392</id><published>2007-05-24T09:39:00.000+03:30</published><updated>2007-10-29T09:26:25.103+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>Changing the Content Type of a Web Page</title><content type='html'>Some times we want to get an image dynamically from a &lt;em&gt;ASP .NET&lt;/em&gt; web form.&lt;br /&gt;So we just create a web form containing an &lt;em&gt;ImageControl&lt;/em&gt;. Then in this form we set a value on &lt;em&gt;Session&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;protected void Page_Load(object sender,EventArgs e)&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;// Putting some files path on session&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Session["MyValue"] = "myImage.gif";&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now I want another web page which is create/load an image depending on the value I 've put in Session. And then I set the ImageUrl of that Image control to my new web page. Like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;asp:Image ID="imgDynamic" runat="server" &lt;strong&gt;ImageUrl="~/getimages.aspx"&lt;/strong&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Notice that ImageUrl have been set to an aspx file!&lt;br /&gt;&lt;br /&gt;Now in my GetImages web form I have to decide to create/load the image depending on the value of Session variable. The important point is that the output of this web form is not HTML code, instead I is responding some images. So I have to change the content type of my web page. And finally I have to put my Image to the Response of my web page. For these I just write these lines of code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;protected void Page_Load(object sender, System.EventArgs e)&lt;br /&gt;{&lt;br /&gt;// Create/Load the image from the string value in session&lt;br /&gt;Bitmap b = new Bitmap(Server.MapPath(Request.ApplicationPath) + "\\Images\\" + &lt;strong&gt;Session["MyValue"].ToString()&lt;/strong&gt;);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;// Change the response headers to output a JPEG image.&lt;br /&gt;this.Response.Clear();&lt;br /&gt;&lt;strong&gt;this.Response.ContentType = "image/jpeg";&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;// Write the image to the response stream in JPEG format.&lt;br /&gt;&lt;strong&gt;b.Save(this.Response.OutputStream, ImageFormat.Jpeg); &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Download the sample code:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/dynamicImage.zip"&gt;http://www.tabatabaei.info/csharpsamples/dynamicImage.zip&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-4871665104195472392?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/4871665104195472392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=4871665104195472392&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4871665104195472392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4871665104195472392'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/05/changing-content-type-of-web-page.html' title='Changing the Content Type of a Web Page'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-6816132517101098093</id><published>2007-05-21T09:42:00.000+03:30</published><updated>2008-11-14T03:25:51.374+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>Localization in ASP .NET 2.0</title><content type='html'>I 'm going to explain How to implement multi lingual web forms in &lt;em&gt;ASP .NET 2.0&lt;/em&gt;.&lt;br /&gt;Let take it with a sample. Imagine we have a web form which user has to fill their personal information and save it to our database. Now, I want this web page to be &lt;strong&gt;multilingual&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;So, First I just create a web page that I 'm going to have in &lt;strong&gt;English&lt;/strong&gt; version. The web form name is "&lt;strong&gt;MultiLingualWebForm.aspx&lt;/strong&gt;".&lt;br /&gt;&lt;br /&gt;Then I have to add an special &lt;em&gt;ASP .NET&lt;/em&gt; folder to my web site. So right click on web site, then Add &lt;em&gt;ASP .NET&lt;/em&gt; Folder and choose &lt;em&gt;App_LocalResources&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;Now I have to add a new item in this folder like this:&lt;br /&gt;&lt;em&gt;R.C&lt;/em&gt;* on &lt;em&gt;App_LocalResources&lt;/em&gt; --&gt; &lt;em&gt;Add New Item&lt;/em&gt; --&gt; &lt;em&gt;Resource File&lt;/em&gt; --&gt; Set the name to "&lt;strong&gt;MultiLingualWebForm.aspx.resx&lt;/strong&gt;"&lt;br /&gt;&lt;br /&gt;Now a file will open up in Visual Studio .Net, I just try to add some Items in this Resource file and save the file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5066918642053300322" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_0uLJ4ISp3BU/RlFPqMVkQGI/AAAAAAAAAMU/1_v_3JXmyas/s400/1.GIF" border="0" /&gt;&lt;br /&gt;Notice that the first part of name "&lt;strong&gt;WelcomeLable&lt;/strong&gt;" is the Control name on the page, and the second part &lt;strong&gt;".Text&lt;/strong&gt;" is the property name of the control.&lt;br /&gt;&lt;br /&gt;Then create another copy of this file with "&lt;strong&gt;MultiLingualWebForm.aspx.fr.resx&lt;/strong&gt;" name.&lt;br /&gt;The &lt;strong&gt;fr&lt;/strong&gt; is telling that it 's the &lt;strong&gt;French&lt;/strong&gt; version of that file.&lt;br /&gt;&lt;br /&gt;And also another copy with name "&lt;strong&gt;MultiLingualWebForm.aspx.fa.resx&lt;/strong&gt;" which &lt;strong&gt;fa&lt;/strong&gt; is the international name of &lt;strong&gt;Farsi&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then change all the values to it 's translation of target language:&lt;br /&gt;&lt;br /&gt;Welcome ==&gt; خوش آمديد&lt;br /&gt;and so on...&lt;br /&gt;&lt;br /&gt;Now, I 'm going to add some new attributes on my &lt;em&gt;ASP&lt;/em&gt; controls. So in each of my &lt;em&gt;Label&lt;/em&gt; controls I added a new tag called &lt;strong&gt;meta&lt;/strong&gt; with a &lt;strong&gt;resourceKey&lt;/strong&gt; property like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;asp:Label ID="WelcomeLabel" runat="server" Text="Label" &lt;strong&gt;meta:resourceKey="WelcomeLabel" &lt;/strong&gt;&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I add this to all the other &lt;em&gt;Labels&lt;/em&gt; and also for those &lt;em&gt;Buttons&lt;/em&gt; on my web form.&lt;br /&gt;And I set two properties of my Page in my &lt;em&gt;page&lt;/em&gt; &lt;em&gt;directive&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Culture="auto:en-US" UICulture="auto"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then I save the web page and run it.&lt;br /&gt;So, to check out is it working or not? While you have your browser open, go to &lt;em&gt;Tools&lt;/em&gt; menu then &lt;em&gt;Internet Option&lt;/em&gt;, in the opening window go to &lt;em&gt;Languages&lt;/em&gt; then add &lt;em&gt;Farsi&lt;/em&gt; and &lt;em&gt;French&lt;/em&gt;, bring up on of the to the first (it 's setting default language of your browser) then OK and OK again.&lt;br /&gt;&lt;br /&gt;Now &lt;em&gt;Refresh&lt;/em&gt; you page, you will see the translation of that page to your preferred language. OK That 's all.&lt;br /&gt;&lt;br /&gt;Anyway, here is the code of my our sample you can download it.&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/"&gt;http://www.tabatabaei.info/csharpsamples/MultiLingualWebForm.zip&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-6816132517101098093?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/6816132517101098093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=6816132517101098093&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6816132517101098093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6816132517101098093'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/05/localization-in-asp-net-20.html' title='Localization in ASP .NET 2.0'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_0uLJ4ISp3BU/RlFPqMVkQGI/AAAAAAAAAMU/1_v_3JXmyas/s72-c/1.GIF' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-5840872874483421880</id><published>2007-05-21T09:08:00.000+03:30</published><updated>2007-05-21T09:14:30.753+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>ASP.NET 2.0 Data Tutorials</title><content type='html'>I was browsing &lt;em&gt;ASP .Net : The Official Microsoft ASP .NET 2.0&lt;/em&gt; web site and I found out a link about working with data and ASP. NET 2.0.&lt;br /&gt;It 's really great articles about how to work with data in ASP .NET 2.0 and It cover 's lot of things in ASP .Net.&lt;br /&gt;&lt;br /&gt;I strongly suggest you to read this articles if you 're interested in working data intensive web application in ASP. NET 2.0&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.asp.net/Learn/DataAccess/#intro"&gt;http://www.asp.net/Learn/DataAccess/#intro&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-5840872874483421880?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/5840872874483421880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=5840872874483421880&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/5840872874483421880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/5840872874483421880'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/05/aspnet-20-data-tutorials.html' title='ASP.NET 2.0 Data Tutorials'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-848732609389845004</id><published>2007-05-20T14:42:00.000+03:30</published><updated>2007-05-20T14:46:22.586+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>ScottGu's Blog</title><content type='html'>I want you to introduce a blog from a Microsoft man.&lt;br /&gt;His is name is Scott Guthrie, and he is General Manager within the Microsoft Developer Division. He runs the development teams that build the following products/technologies:&lt;br /&gt;&lt;br /&gt;Common Language Runtime (CLR)&lt;br /&gt;ASP.NET &lt;br /&gt;Silverlight&lt;br /&gt;WPF&lt;br /&gt;IIS 7.0&lt;br /&gt;Commerce Server&lt;br /&gt;.NET Compact Framework  &lt;br /&gt;Visual Web Developer &lt;br /&gt;Visual Studio Tools for WPF&lt;br /&gt;&lt;br /&gt;You can find too many great tips about ASP .NET and Oracas (new version of Visual Studio) and some other Microsoft Technologies.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://weblogs.asp.net/scottgu/"&gt;http://weblogs.asp.net/scottgu/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-848732609389845004?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/848732609389845004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=848732609389845004&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/848732609389845004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/848732609389845004'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/05/scottgus-blog.html' title='ScottGu&apos;s Blog'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-4334037295452139209</id><published>2007-05-20T11:31:00.000+03:30</published><updated>2007-05-29T09:11:58.317+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Forms'/><title type='text'>Starting new process</title><content type='html'>In the last post, I explained how to get a list of existing process on local or remote machine.&lt;br /&gt;Now I want to explain how to start a new process in C#.&lt;br /&gt;&lt;br /&gt;If you create an object of Process class, you can set some information on StartInfo property of the object to specify what to do when you start the process. In the line below I 'm going to Print a word document in my C# sample:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Process printProcess = new Process();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;try&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;OpenFileDialog op = new OpenFileDialog();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;op.Filter = "Microsoft Word Document (*.doc)*.doc";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;if(op.ShowDialog() == DialogResult.OK)&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;printProcess.StartInfo.FileName = op.FileName;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;printProcess.StartInfo.Verb = "Print";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;printProcess.StartInfo.CreateNoWindow = true;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;printProcess.Start();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;catch(Win32Exception ex)&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;if(e.NativeErrorCode ==2)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;MessageBox.Show(e.Message + ". Check the path.");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;else if(e.NativeErrorCode == 5)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;MessageBox.Show(e.Message + ". You do not have permission to print this file.");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;Notice that I 've used "Print" for &lt;em&gt;Verb&lt;/em&gt; property of &lt;em&gt;StartInfo&lt;/em&gt;. If you don't know what are available verbs on a extension (if it 's not executable) you can get list of verbs by using Verbs proerty of the process. Just like this:&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ProcessStartInfo stInfo = new ProcessStartInfo(fileNameWithExtension);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;foreach(string verb in stInfo.Verbs)&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Console.WriteLine(" {0}",verb);&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;Notice that after you ran the process, changing the value of &lt;em&gt;StartInfo&lt;/em&gt; property does not effect on the running process.&lt;br /&gt;&lt;br /&gt;And you can use specific username and password withing &lt;em&gt;UserName&lt;/em&gt;,&lt;em&gt;Password &lt;/em&gt;property in &lt;em&gt;StartInfo&lt;/em&gt; but if you set thses property the process starts in new window even if the &lt;em&gt;CreateNoWindow&lt;/em&gt; property value is &lt;strong&gt;true&lt;/strong&gt; of the &lt;em&gt;WindowStyle&lt;/em&gt; property value is &lt;strong&gt;Hidden&lt;/strong&gt;.&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-4334037295452139209?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/4334037295452139209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=4334037295452139209&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4334037295452139209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4334037295452139209'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/05/starting-new-process.html' title='Starting new process'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-7644700987802787488</id><published>2007-05-20T10:43:00.000+03:30</published><updated>2007-05-29T09:09:59.295+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Forms'/><title type='text'>Getting processes on local or remote machine</title><content type='html'>The &lt;em&gt;Process&lt;/em&gt; class in &lt;em&gt;System.Diagnostics&lt;/em&gt; namespace, provide information about processes on current or a remote machine.&lt;br /&gt;&lt;br /&gt;You can get list of all process on your local machine by this line of code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#000000;"&gt;Process&lt;/span&gt;[] process = Process.GetProcesses();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or if you want to have a list of a remote computer process list:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Process[] processList = Process.GetProcesses("machineName");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can also use IP instead of computer name if desired.&lt;br /&gt;There are also some static methods that help you to get specific process by it 's Name/Id on local or a remote computer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Process proc = Process.GetProcessesByName("notepad");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;&lt;/span&gt;&lt;br /&gt;Then you can get some information about the process. For instance in the line below I 'm getting the process &lt;span style="font-family:courier new;"&gt;filename&lt;/span&gt; from the &lt;span style="font-size:+0;"&gt;&lt;em&gt;MainModule&lt;/em&gt;&lt;/span&gt; property:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;foreach(Process proc in Process.GetProcesses())&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Console.WriteLine(" ProcessName : {0}, File Name: {1}",proc.MainModule.ModuleName, proc.MainModule.FileName);&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you want to stop a process you can use the &lt;span style="font-size:+0;"&gt;&lt;em&gt;Kill&lt;/em&gt;&lt;/span&gt; method on that process. But notice that if the process cannot be terminated you will get a &lt;em&gt;Win32Exception&lt;/em&gt; or if the process has already exited you will get an &lt;em&gt;InvalidOperationException&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;It 's important to know when you are using &lt;em&gt;Kill&lt;/em&gt; method, that you can only &lt;em&gt;Kill&lt;/em&gt; local processes and if you try to terminate a remote process by calling &lt;em&gt;Kill&lt;/em&gt; method, you will get a &lt;em&gt;SystemException&lt;/em&gt;.&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-7644700987802787488?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/7644700987802787488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=7644700987802787488&amp;isPopup=true' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/7644700987802787488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/7644700987802787488'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/05/getting-processes-on-local-or-remote.html' title='Getting processes on local or remote machine'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-4873217915762811126</id><published>2007-05-19T12:23:00.000+03:30</published><updated>2007-10-29T09:23:06.618+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>Adding Removing Items from ListBox</title><content type='html'>I this simple sample code, I 've two Listboxes which in the Left Side there is a list of cars, and you can add/remove Item from/to the RightListbox.&lt;br /&gt;&lt;br /&gt;I 'm holding all cars, and selected cars in session two keep over post backs.&lt;br /&gt;If you want to enable multi select on the sample put&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SelectionMode="multiple"&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;for the listboxes.&lt;br /&gt;&lt;br /&gt;You can download the code here:&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/csharpsamples/AddRemoveItems.zip"&gt;http://www.tabatabaei.info/csharpsamples/AddRemoveItems.zip&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-4873217915762811126?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/4873217915762811126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=4873217915762811126&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4873217915762811126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4873217915762811126'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/05/adding-removing-items-from-listbox.html' title='Adding Removing Items from ListBox'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-7639865618549291878</id><published>2007-05-19T09:51:00.000+03:30</published><updated>2007-10-26T14:30:27.849+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>Uploading Multiple Files</title><content type='html'>Sometime in your web application, especially the ones which is working with files, you may need to upload more than one file in a web page. While you don't know how many files you have to upload it seems to be a good way to create a control which can upload one or more dynamically.&lt;br /&gt;&lt;br /&gt;The first thing that I 'm going to do is to place a FileUpload control in my control and a button for upload and a link for a new file upload control. Like this:&lt;br /&gt;&lt;br /&gt;&amp;lt;div&amp;gt;FileName: &amp;lt;asp:FileUpload ID="FileUpload1" runat="server" /&amp;gt;        &amp;lt;asp:LinkButton ID="lnkAddMore" Text="Add More..." runat="server"OnClick="lnkAddMore_Click"&amp;gt;&amp;lt;/asp:LinkButton&amp;gt;        &amp;lt;asp:Button ID="btnUpload" runat="server" Text="Upload" OnClick="btnUpload_Click" /&amp;gt;&amp;lt;br /&amp;gt;        &amp;lt;div runat="server" id="divFileUpload"&amp;gt;        &amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;notice that, inside the last div I put another div which is a server html control.&lt;br /&gt;&lt;br /&gt;Then in the link button event handler I wrote some codes like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;protected void lnkAddMore_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;         FileUpload fileUpload = new FileUpload();&lt;br /&gt;         Literal lt = new Literal();&lt;br /&gt;         lt.Text = "&amp;lt;br/&amp;gt;";&lt;br /&gt;     &lt;br /&gt;         divFileUpload.Controls.Add(fileUpload);&lt;br /&gt;         divFileUpload.Controls.Add(lt);&lt;br /&gt;     &lt;br /&gt;         AddedControls.Add(fileUpload);&lt;br /&gt;         AddedControls.Add(lt);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;I put the "&lt;strong&gt;AddedControls&lt;/strong&gt;" property on the control which is &lt;strong&gt;List&lt;control&gt;&lt;/control&gt;&lt;/strong&gt; to keep all the added controls in the &lt;strong&gt;Session&lt;/strong&gt;. The point is that we have to keep them to add in each and every post back.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;protected List&lt;control&gt; AddedControls&lt;br /&gt;{&lt;br /&gt;    get&lt;br /&gt;   {&lt;br /&gt;         if (Session["AddedControls"] == null)&lt;br /&gt;                Session["AddedControls"] = new List&lt;control&gt;();&lt;br /&gt;         return (List&lt;control&gt;)Session["AddedControls"];&lt;br /&gt;    }&lt;br /&gt;    set&lt;br /&gt;    {&lt;br /&gt;          Session["AddedControls"] = value;&lt;br /&gt;     }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;So, for adding this controls every time I create the event handler for "&lt;strong&gt;PreInit&lt;/strong&gt;" event:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;protected void Page_PreInit(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;     foreach (Control ctrl in AddedControls)&lt;br /&gt;    {&lt;br /&gt;            divFileUpload.Controls.Add(ctrl);&lt;br /&gt;         &lt;br /&gt;     }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;In the last part, I 'm saving all the uploaded files using "&lt;strong&gt;Request.Files&lt;/strong&gt;" property in Upload button event handler:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;protected void btnUpload_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;      for (int i = 0; i &lt; &lt;strong&gt;Request.Files&lt;/strong&gt;.Count; i++)&lt;br /&gt;      {&lt;br /&gt;&lt;strong&gt;               HttpPostedFile&lt;/strong&gt; file = (&lt;strong&gt;HttpPostedFile&lt;/strong&gt;)Request.Files[i];&lt;br /&gt;             if (file.ContentLength &gt; 0)&lt;br /&gt;             {&lt;br /&gt;                    try&lt;br /&gt;                    {&lt;br /&gt;                            file.SaveAs(&lt;strong&gt;Request.PhysicalApplicationPath&lt;/strong&gt; + "\\UploadedFiles\\" + file.FileName.Substring(file.FileName.LastIndexOf("\\") + 1));&lt;br /&gt;                     }&lt;br /&gt;                     catch (Exception ex)&lt;br /&gt;                     {&lt;br /&gt;                              Response.Write("&lt;font style=""&gt;" + ex.Message + "&lt;/font&gt;");&lt;br /&gt;continue;&lt;br /&gt;                      }&lt;br /&gt;               }&lt;br /&gt;      }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;in &lt;strong&gt;HttpPostedFile &lt;/strong&gt;class&lt;strong&gt; &lt;/strong&gt;there is a &lt;strong&gt;SaveAs&lt;/strong&gt; method which I 'm using to save my files to the server. The method need a physical path so I provide it by &lt;strong&gt;Request.PhysicalApplicationPath.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;You can download the sample code here:&lt;br /&gt;&lt;a href="http://www.tabatabaei.info/dynamicfileupload.zip"&gt;http://www.tabatabaei.info/dynamicfileupload.zip&lt;/a&gt;&lt;/control&gt;&lt;/control&gt;&lt;/control&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-7639865618549291878?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/7639865618549291878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=7639865618549291878&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/7639865618549291878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/7639865618549291878'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/05/uploading-multiple-files.html' title='Uploading Multiple Files'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-4842626676196650971</id><published>2007-05-12T13:32:00.000+03:30</published><updated>2007-05-12T13:43:11.697+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Ehsan 's blog</title><content type='html'>Congratulations to Ehsan, for starting his weblog "&lt;a href="http://ehsanbraindump.blogspot.com/"&gt;EhsanBrainDump&lt;/a&gt;".&lt;br /&gt;&lt;br /&gt;As you may know "Ehsan Shalchian" is one my friend and of course one of my great teachers who is famous for his knowledge over "Software Analysis &amp; Design Patterns" and "C#" and also too many software engineering related technologies.&lt;br /&gt;&lt;br /&gt;I suggest you to review his posts which of course would be valuable posts.&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-4842626676196650971?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/4842626676196650971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=4842626676196650971&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4842626676196650971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4842626676196650971'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/05/ehsan-s-blog.html' title='Ehsan &apos;s blog'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-6218276279173718875</id><published>2007-05-12T12:26:00.000+03:30</published><updated>2007-05-13T08:56:26.534+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>ASP .NET References</title><content type='html'>As many of my students ask from me to give them some references for ASP.NET, I will introduce a web log post from "Bill Evjen" who has wrote some books in C# and VB .NET. &lt;a href="http://geekswithblogs.net/evjen/archive/2004/12/10/learnaspnet.aspx"&gt;http://geekswithblogs.net/evjen/archive/2004/12/10/learnaspnet.aspx&lt;/a&gt; He has categorized some Subjects over ASP.NET. Take a look, it worth.&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-6218276279173718875?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/6218276279173718875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=6218276279173718875&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6218276279173718875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/6218276279173718875'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/05/asp-net.html' title='ASP .NET References'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-5482891479575237841</id><published>2007-05-12T12:17:00.000+03:30</published><updated>2007-05-13T08:58:13.507+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>Getting All Selected Items of CheckListBox</title><content type='html'>Oh, after a while again I decided to start writing on this blog.&lt;br /&gt;&lt;br /&gt;Any way, I thing sometimes it happens that you need to show some choices to your users then ask them to select any many as they want. So as you may know the best choice is CheckListBox. So after Binding it or adding your items into it you may want to get a list of SelectedItems over the checklistbox. So you have to iterate over your items then check whether if the item is checked or not like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;foreach (ListItem item in CheckBoxList1.Items)&lt;br /&gt;{&lt;br /&gt;      if(item.Selected)&lt;br /&gt;     {&lt;br /&gt;             Response.Write("&amp;lt;h3&amp;gt;" + item.Text + "&amp;lt;/h3&amp;gt;");&lt;br /&gt;     }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Do not forget comments.&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-5482891479575237841?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/5482891479575237841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=5482891479575237841&amp;isPopup=true' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/5482891479575237841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/5482891479575237841'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/05/getting-all-selected-items-of.html' title='Getting All Selected Items of CheckListBox'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-4783030703989584806</id><published>2007-03-07T13:02:00.000+03:30</published><updated>2007-10-29T09:20:53.684+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>MutiView Control</title><content type='html'>You can think of MultiView as more advanced panel that let you switch between groups of controls on a page.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MutliView&lt;br /&gt;&lt;/b&gt;Essentially, the MultiViewgives you a way to declare multiple views and show only one at a time.&lt;br /&gt;It 's really simple to use that, just put it from the Toolbox, then add one or more View control inside this.Now you can have you user interface design in all the views, separately.&lt;br /&gt;By default the &lt;i&gt;ActiveViewIndex&lt;/i&gt;, the property which determine which of the view control 's has to be shown, is set to -1.&lt;br /&gt;So you can just set the index of your desire.&lt;br /&gt;It 's also a method called &lt;i&gt;SetActiveView&lt;/i&gt; which can set the active view control by it 's reference.&lt;br /&gt;It the sample that I 've been created.I set the &lt;i&gt;ActiveViewIndex&lt;/i&gt; to 0 in &lt;i&gt;Page_Load&lt;/i&gt; event, when it 's not post backed.&lt;br /&gt;&lt;br /&gt;Masoud_TB&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-4783030703989584806?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/4783030703989584806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=4783030703989584806&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4783030703989584806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/4783030703989584806'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/03/mutiview-control.html' title='MutiView Control'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-431647777179564906</id><published>2007-03-06T14:34:00.000+03:30</published><updated>2007-10-29T09:21:21.875+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>Sending email in ASP .NET 2</title><content type='html'>In asp.net application it may needed to send an email to specefic email address. In ASP .Net 1 and 1.1 it was so simple to send an email, as it 's in ASP .NET 2.0.&lt;br /&gt;&lt;br /&gt;In ASP .NET 1.1 we just create a MailMessage object from the System.Web.Mail namespace setting the properties and send that mail. Just like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;MailMessage m = new MailMessage();&lt;br /&gt;m.Body = “Mail Body Text”&lt;br /&gt;m.BodyEncoding = System.Text.Encoding.UTF8;&lt;br /&gt;m.BodyFormat = MailFormat.Html;&lt;br /&gt;m.To = "SbElse@AnotherWebSite.com";&lt;br /&gt;m.Subject = ”Mail Subject”;&lt;br /&gt;m.From = "Somebody@AWebSite.com";&lt;br /&gt;m.Priority = MailPriority.High;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;SmtpMail.Send(m); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ASP .NET team in the 2.0 version decided to move the System.Net.Mail instead of System.Web.Mail.&lt;br /&gt;Actually System.Net.Mail is a new namespace which contains classes used to send electronic mail to a Simple Mail Transfer Protocol (SMTP) server for delivery. (as Microsoft Says)&lt;br /&gt;&lt;br /&gt;Anyway, for sending mail in ASP .NET 2.0 , I just create a MailMessage and set the properties of that, and at the end I use a SmtpClient object to send the mail message, like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;em&gt;System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(&lt;/em&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;em&gt;"From@WebSite.com",&lt;/em&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;em&gt;"To@WebSite.com");&lt;br /&gt;message.Subject = "Here is the subject";&lt;br /&gt;message.Body = "Body of the message";&lt;br /&gt;message.DeliveryNotificationOptions = System.Net.Mail.DeliveryNotificationOptions.OnFailure;&lt;br /&gt;message.Priority = System.Net.Mail.MailPriority.High;&lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;em&gt;System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient();&lt;br /&gt;smtp.UseDefaultCredentials = true;&lt;br /&gt;smtp.Send(message);&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I used the UseDefaultCredentials becuase for some SMTP servers it requires to authenticate for sending mail. So this information can be setted in web.config file when UseDefaultCredentials is true.&lt;br /&gt;&lt;br /&gt;Finally, I set these configuration settings on the web.config file like this:&lt;br /&gt;&lt;br /&gt;&amp;lt;system.net&amp;gt;&lt;br /&gt;&amp;lt;mailSettings&amp;gt;&lt;br /&gt;&amp;lt;smtp from="user@host.com"&amp;gt;&lt;br /&gt;&amp;lt;network userName="user@host.com" password="pass" host="localhost"&amp;gt;&lt;br /&gt;&amp;lt;/smtp&amp;gt;&lt;br /&gt;&amp;lt;/mailsettings&amp;gt;&lt;br /&gt;&amp;lt;/system.net&amp;gt;&lt;br /&gt;&lt;br /&gt;notice that the host attribute of the network entity is the SMTP mail server address. Which I used localhost in this sample.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;I hope it can help you.&lt;br /&gt;Masoud_TB&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-431647777179564906?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/431647777179564906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=431647777179564906&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/431647777179564906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/431647777179564906'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/03/sending-email-in-asp-net-2.html' title='Sending email in ASP .NET 2'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-8815293053186368531</id><published>2007-03-06T10:03:00.000+03:30</published><updated>2008-11-14T03:25:51.928+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Forms'/><title type='text'>Input Language</title><content type='html'>&lt;p&gt;While you have a multilingual application you may intended to set the current input language (Keyboard language) in your application. There is a class called InputLanguage in System.Windows.Forms namespace, which Provides methods and fields to manage the input language (as Microsoft says)&lt;br /&gt;&lt;br /&gt;In this Windows C# sample I 'm going to list all the InputLanguages installed on the current windwos and set the InputLanguage which the user desired.&lt;br /&gt;&lt;br /&gt;For instance I have installed English and Farsi keyboard installed on my windows xp. So a comboBox list these two languages and whenever the user changes the languages on it, the system input language will change to the selected one. On the other hand I have two specefied textbox which I want whenever the user tries to type something on these textboxed change the keyboard language to farsi or english as desired.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_0uLJ4ISp3BU/Re0Mesh0e1I/AAAAAAAAAA0/lnh2SfGViO8/s1600-h/InputLanguages.GIF"&gt;&lt;img id="BLOGGER_PHOTO_ID_5038697279586073426" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_0uLJ4ISp3BU/Re0Mesh0e1I/AAAAAAAAAA0/lnh2SfGViO8/s200/InputLanguages.GIF" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Masoud_TB &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-8815293053186368531?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/8815293053186368531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=8815293053186368531&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/8815293053186368531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/8815293053186368531'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/03/while-you-have-multilingual-application.html' title='Input Language'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_0uLJ4ISp3BU/Re0Mesh0e1I/AAAAAAAAAA0/lnh2SfGViO8/s72-c/InputLanguages.GIF' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-2745422349960779485</id><published>2007-03-05T15:34:00.000+03:30</published><updated>2007-10-29T09:22:08.561+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP .NET'/><title type='text'>Uploading Images to Server</title><content type='html'>Last week I was working on a project and in web form we wanted to ask people to upload their images to the server, and fill the application form.&lt;br /&gt;&lt;br /&gt;So I tried to use the FileUpload Control which is a new WebControl in ASP.NET to upload the images to the server. The point was that I wanted to restrict people to only upload images with file extension "jpg" and "gif", so because the FileUpload control by default allow all types of file format to be uploaded, I used a regular expression to extract the file extension from the file name.&lt;br /&gt;Another important thing for me was the file size of the images. I just want to allow users to upload images with max size of 50Kb, so I used the Length on FileContent property of the FileUpload, and at the end of my code, I used the SaveAs method to save the file in a specific way.&lt;br /&gt;&lt;br /&gt;Notice that while your working with web application you have to get the physical path of your web application, not the http://www.yoursite.com/ so I used the Server.MapPath(Request.ApplicationPath) to get the physical path.&lt;br /&gt;&lt;br /&gt;Masoud_TB&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-2745422349960779485?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/2745422349960779485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=2745422349960779485&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/2745422349960779485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/2745422349960779485'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/03/uploading-images-to-server.html' title='Uploading Images to Server'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6415357984415247598.post-8268517743570897535</id><published>2007-02-28T12:59:00.000+03:30</published><updated>2007-05-19T13:02:45.642+03:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Welcome to C# Tuning</title><content type='html'>Hi, So eventually I started to create a webblog on C# programming language which is actually a great hobby and also my profession.&lt;br /&gt;Here in this blog I will try to focus on programming with Microsoft C# .NET and actually I 'm intended to be more deep on ASP .NET, but anyway if there was any question about any thing please do not hesitate and go on.&lt;br /&gt;&lt;br /&gt;Masoud_TB&lt;div class="blogger-post-footer"&gt;C# Tuning&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6415357984415247598-8268517743570897535?l=csharptuning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharptuning.blogspot.com/feeds/8268517743570897535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6415357984415247598&amp;postID=8268517743570897535&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/8268517743570897535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6415357984415247598/posts/default/8268517743570897535'/><link rel='alternate' type='text/html' href='http://csharptuning.blogspot.com/2007/02/welcome-to-c-tuning.html' title='Welcome to C# Tuning'/><author><name>Masoud Tabatabaei</name><uri>http://www.blogger.com/profile/04898748271772268192</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp0.blogger.com/_0uLJ4ISp3BU/R4yXmVTh2DI/AAAAAAAAAN8/3EX0UrNkHh8/S220/Masoud2.jpg'/></author><thr:total>0</thr:total></entry></feed>
