<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-2766646214085653731</atom:id><lastBuildDate>Fri, 01 Nov 2024 08:11:41 +0000</lastBuildDate><category>VS 2010</category><category>C# 4.0</category><category>VS 2008</category><category>SQL Server</category><category>VS Extension</category><category>Jquery</category><category>Sql Injuction</category><category>Visual Basic 10</category><category>Vsual Studio Reporting</category><category>Asp.net Format</category><category>Dynamic Programming</category><category>GUID in SQL Server</category><category>New in VB 10</category><category>Order By</category><category>Partition By</category><category>SQL SERVER Unique ID</category><category>TSQL Bulk Delete</category><category>Case Sensitive Search T sql</category><category>Click event after blur</category><category>Color Schems</category><category>DBMail</category><category>Data Securidy</category><category>Date Format</category><category>Date.ToString()</category><category>Deploy ASP.NET Web Application</category><category>DotNet</category><category>Download Color Schemes</category><category>Enum</category><category>Export in Excel</category><category>Flagged Enum</category><category>Globalization</category><category>Gridview Export</category><category>Identity</category><category>Java script error handling</category><category>Jquery continuous events</category><category>List Paging</category><category>Localisation</category><category>MS Access</category><category>New in Vsual Studio</category><category>Password Hacking</category><category>Pickup Directory</category><category>ROW_NUMBER()</category><category>Row_Number</category><category>SQL</category><category>SQL Serial Number</category><category>SQl Server Mail</category><category>Scope_Identity</category><category>Security</category><category>Send Mail from SQL Server</category><category>Silverlight Toolbar and Menu Control - v2010 vol 1</category><category>Styles</category><category>System.Net.Mail</category><category>T sql Replace function</category><category>Time Format</category><category>Unique Identifire</category><category>VS Color Schemes</category><category>Validate Request</category><category>click event with blur</category><category>client side error handling</category><category>global exception handling</category><category>newID</category><category>sp_Send_dbmail</category><title>DotNetAdda</title><description>Solutions that counts</description><link>http://dotnetadda.blogspot.com/</link><managingEditor>noreply@blogger.com (xyz)</managingEditor><generator>Blogger</generator><openSearch:totalResults>78</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>20</openSearch:itemsPerPage><xhtml:meta content="noindex" name="robots" xmlns:xhtml="http://www.w3.org/1999/xhtml"/><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-4598550865664049084</guid><pubDate>Mon, 08 Apr 2013 11:18:00 +0000</pubDate><atom:updated>2014-06-11T14:01:59.551+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">client side error handling</category><category domain="http://www.blogger.com/atom/ns#">global exception handling</category><category domain="http://www.blogger.com/atom/ns#">Java script error handling</category><title>Global Error Handling through javascript</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
In&amp;nbsp;java script we can&amp;nbsp;handle&amp;nbsp;all&amp;nbsp;&amp;nbsp;uncaught&amp;nbsp;errors on a single place which is handy to manage exception handling in application.&lt;br /&gt;
&lt;br /&gt;
There are try catch block to handle block level exception but there are so many which left and thrown&amp;nbsp;run time. Following code can do the trick for this.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: js"&gt;

  window.addEventListener("error", function (evt) {  
    log.error(evt.message   
             + "\n File: "   
             + parseURL(evt.filename).attr["file"]   
             + "\n Line No: "  
             + evt.lineno);  
    console.log(evt);  
  });  
&lt;/pre&gt;
&lt;br /&gt;
&lt;span style="color: blue; font-family: Courier New, Courier, monospace;"&gt;&lt;b&gt;parseURL()&lt;/b&gt;&lt;/span&gt; is UFD used to extract filename from path.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue; font-family: Courier New, Courier, monospace;"&gt;&lt;b&gt;log.error()&lt;/b&gt;&lt;/span&gt; is a UFD used to log error in file.&lt;br /&gt;
&lt;br /&gt;
these two function can be written according to your need.&lt;/div&gt;</description><link>http://dotnetadda.blogspot.com/2013/04/global-error-handling-through-javascript.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-8508166606036083631</guid><pubDate>Wed, 10 Oct 2012 09:02:00 +0000</pubDate><atom:updated>2014-06-11T14:22:49.606+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Click event after blur</category><category domain="http://www.blogger.com/atom/ns#">click event with blur</category><category domain="http://www.blogger.com/atom/ns#">Jquery continuous events</category><title>jQuery problem with simultaneous events</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
I was working on some jQuery validation logic in my project when I came across this problem.
When two continuous events fired from jQuery or jQuery mobile i.e. focus () and select () or blur () and click () only one event get fired and other one not. This is very annoying problem which sometime force you to scratch your head for hours and days. I was also having same problem in one of my module where blur and click are called sequentially. I am not sure that this also happen with the traditional java script or not.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Scenario&lt;/h4&gt;
&lt;br /&gt;
&lt;br /&gt;
I have two controls a textbox and a button
A textbox has blur event and a button has click event.
Now if you write something in textbox and click the button directly only blur event get fired but click event don’t. The ideal condition should be that first blur should called and then click. so now if your form has to get post on button click or some other logic written on its click &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;input id="text1" type="text" /&amp;gt;
&amp;lt;input id="btn" type="button" value="click" /&amp;gt;
&lt;/pre&gt;
&lt;pre class="brush: js"&gt;$("#btn").click(function() {
    alert("click")
})
$("#text1").blur(function() {
    alert("blur")
})
&lt;/pre&gt;
&lt;br /&gt;
&lt;h4&gt;
Solution&lt;/h4&gt;
&lt;br /&gt;
&lt;br /&gt;
Well you can say that it is not a proper solution but just a fix to achieve what is expected but this is the best what came out after hours of efforts and brain exercise.
We have to capture the condition that button has been clicked, before blur event get fired. Mousedown is the best event we can use for this.
so need to take a variable to set it true on button mousedown and in blur event we can check if the variable is true or not i.e. the button is also clicked or it is just a simple blur triggered in result of lost focus from text box. And there we can explicitly call the button click.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: js"&gt;
var clickwithblur = false;

$("#btn").click(function() {
    alert("click")
}).mousedown(function() {
    clickwithblur = true;
})
$("#text1").blur(function() {
    alert("blur")
    if (clickwithblur) {
        $("#btn").click()
    }
})​
&lt;/pre&gt;
&lt;hr /&gt;
&lt;h4&gt;Working Solution&lt;/h4&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="0" height="300" src="http://jsfiddle.net/amitrdx/TmPtZ/embedded/js,html,result" width="100%"&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;hr /&gt;
&lt;h4&gt;
Fiddle Link&lt;/h4&gt;
&lt;br /&gt;
&lt;a href="http://jsfiddle.net/amitrdx/TmPtZ/"&gt;http://jsfiddle.net/amitrdx/TmPtZ&lt;/a&gt;&lt;/div&gt;</description><link>http://dotnetadda.blogspot.com/2012/10/jquery-problem-with-simultaneous-events.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-1037886963850895083</guid><pubDate>Mon, 23 Jul 2012 11:25:00 +0000</pubDate><atom:updated>2014-06-16T13:37:50.723+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">DotNet</category><category domain="http://www.blogger.com/atom/ns#">Enum</category><category domain="http://www.blogger.com/atom/ns#">Flagged Enum</category><title>Enum types, FlagAttribute &amp; Zero value</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://weblogs.asp.net/nunogomes/archive/2012/07/05/enum-types-flagattribute-amp-zero-value.aspx"&gt;Enum types, FlagAttribute &amp;amp; Zero value&lt;/a&gt;: &lt;br /&gt;
We all know about Enums types and use them every single day. What is not that often used is to decorate the Enum type with the &lt;a href="http://msdn.microsoft.com/en-us/library/system.flagsattribute.aspx"&gt;FlagsAttribute&lt;/a&gt;.&lt;br /&gt;
When an Enum type has the &lt;a href="http://msdn.microsoft.com/en-us/library/system.flagsattribute.aspx"&gt;FlagsAttribute&lt;/a&gt; we can assign multiple values to it and thus combine multiple information into a single enum.&lt;br /&gt;
The enum values should be a power of two so that a bit set is achieved.&lt;br /&gt;
Here is a typical Enum type:&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;public enum &lt;/span&gt;&lt;span style="color: #2b91af;"&gt;OperationMode
&lt;/span&gt;{
    &lt;span style="color: grey;"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style="color: green;"&gt;No operation mode
    &lt;/span&gt;&lt;span style="color: grey;"&gt;/// &amp;lt;/summary&amp;gt;
    &lt;/span&gt;None = 0,
    &lt;span style="color: grey;"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style="color: green;"&gt;Standard operation mode
    &lt;/span&gt;&lt;span style="color: grey;"&gt;/// &amp;lt;/summary&amp;gt;
    &lt;/span&gt;Standard = 1,
    &lt;span style="color: grey;"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style="color: green;"&gt;Accept bubble requests mode
    &lt;/span&gt;&lt;span style="color: grey;"&gt;/// &amp;lt;/summary&amp;gt;
    &lt;/span&gt;Parent = 2
}&lt;/pre&gt;
&lt;br /&gt;
In such scenario no values combination are possible. In the following scenario a default operation mode exists and combination is used:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;[&lt;span style="color: #2b91af;"&gt;Flags&lt;/span&gt;]
&lt;span style="color: blue;"&gt;public enum &lt;/span&gt;&lt;span style="color: #2b91af;"&gt;OperationMode
&lt;/span&gt;{
    &lt;span style="color: grey;"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style="color: green;"&gt;Asynchronous operation mode
    &lt;/span&gt;&lt;span style="color: grey;"&gt;/// &amp;lt;/summary&amp;gt;
    &lt;/span&gt;Async = 0,
    &lt;span style="color: grey;"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style="color: green;"&gt;Synchronous operation mode
    &lt;/span&gt;&lt;span style="color: grey;"&gt;/// &amp;lt;/summary&amp;gt;
    &lt;/span&gt;Sync = 1,
    &lt;span style="color: grey;"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style="color: green;"&gt;Accept bubble requests mode
    &lt;/span&gt;&lt;span style="color: grey;"&gt;/// &amp;lt;/summary&amp;gt;
    &lt;/span&gt;Parent = 2
}&lt;/pre&gt;
&lt;br /&gt;
Now, it’s possible to do statements like:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;[&lt;span style="color: #2b91af;"&gt;DefaultValue&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;OperationMode&lt;/span&gt;.Async)]
[&lt;span style="color: #2b91af;"&gt;TypeConverter&lt;/span&gt;(&lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;EnumConverter&lt;/span&gt;))]
&lt;span style="color: blue;"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af;"&gt;OperationMode &lt;/span&gt;Mode { &lt;span style="color: blue;"&gt;get&lt;/span&gt;; &lt;span style="color: blue;"&gt;set&lt;/span&gt;; }

&lt;span style="color: grey;"&gt;/// &amp;lt;summary&amp;gt;
/// &lt;/span&gt;&lt;span style="color: green;"&gt;Gets a value indicating whether this instance supports request from childrens.
&lt;/span&gt;&lt;span style="color: grey;"&gt;/// &amp;lt;/summary&amp;gt;
&lt;/span&gt;&lt;span style="color: blue;"&gt;public bool &lt;/span&gt;IsParent
{
    &lt;span style="color: blue;"&gt;get &lt;/span&gt;{ &lt;span style="color: blue;"&gt;return &lt;/span&gt;(&lt;span style="color: blue;"&gt;this&lt;/span&gt;.Mode &amp;amp; &lt;span style="color: #2b91af;"&gt;OperationMode&lt;/span&gt;.Parent) == &lt;span style="color: #2b91af;"&gt;OperationMode&lt;/span&gt;.Parent; }
}&lt;/pre&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;switch &lt;/span&gt;(&lt;span style="color: blue;"&gt;this&lt;/span&gt;.Mode)
{
    &lt;span style="color: blue;"&gt;case &lt;/span&gt;&lt;span style="color: #2b91af;"&gt;OperationMode&lt;/span&gt;.Sync | &lt;span style="color: #2b91af;"&gt;OperationMode&lt;/span&gt;.Parent:
        &lt;span style="color: #2b91af;"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: #a31515;"&gt;"Sync,Parent"&lt;/span&gt;);
        &lt;span style="color: blue;"&gt;break&lt;/span&gt;;
[…]
&lt;/pre&gt;
&lt;br /&gt;
But there is something that you should never forget: &lt;a href="http://en.wikipedia.org/wiki/Absorbing_element"&gt;Zero is the absorber element for the bitwise AND operation&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
So, checking for &lt;span style="color: #2b91af;"&gt;OperationMode&lt;/span&gt;.Async (the Zero value) mode just like the &lt;span style="color: #2b91af;"&gt;OperationMode&lt;/span&gt;.Parent mode makes no sense since it will always be true:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;(&lt;span style="color: blue;"&gt;this&lt;/span&gt;.Mode &amp;amp; 0x&lt;span style="color: #2b91af;"&gt;0&lt;/span&gt;) == 0x&lt;span style="color: #2b91af;"&gt;0&lt;span style="color: #2b91af;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
Instead, inverse logic should be used: &lt;span style="color: #2b91af;"&gt;OperationMode&lt;/span&gt;.Async = !&lt;span style="color: #2b91af;"&gt;OperationMode&lt;/span&gt;.Sync&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;public bool &lt;/span&gt;IsAsync
{
    &lt;span style="color: blue;"&gt;get &lt;/span&gt;{ &lt;span style="color: blue;"&gt;return &lt;/span&gt;(&lt;span style="color: blue;"&gt;this&lt;/span&gt;.Mode &amp;amp; &lt;span style="color: #2b91af;"&gt;ContentManagerOperationMode&lt;/span&gt;.Sync) != &lt;span style="color: #2b91af;"&gt;ContentManagerOperationMode&lt;/span&gt;.Sync; }
}&lt;/pre&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;public bool &lt;/span&gt;IsAsync
{
    &lt;span style="color: blue;"&gt;get &lt;/span&gt;{ &lt;span style="color: blue;"&gt;return &lt;/span&gt;(&lt;span style="color: blue;"&gt;int&lt;/span&gt;)&lt;span style="color: blue;"&gt;this&lt;/span&gt;.Mode == 0; }
}&lt;/pre&gt;
The above samples snippets were taken from an ASP.NET control and enabled the following markup usage:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;my&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: maroon;"&gt;Control &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;Mode&lt;/span&gt;&lt;span style="color: blue;"&gt;="Sync,Parent"&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Drawback&lt;/b&gt;&lt;br /&gt;
Zero value is the absorber element for the bitwise AND operation&lt;br /&gt;
&lt;br /&gt;
Be very carefully when evaluating the Zero value, either evaluate the enum value as an integer or use inverse logic.&lt;br /&gt;
&lt;/div&gt;
</description><link>http://dotnetadda.blogspot.com/2012/07/enum-types-flagattribute-zero-value.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-5765078115943342223</guid><pubDate>Mon, 23 Jul 2012 11:19:00 +0000</pubDate><atom:updated>2012-07-23T16:53:31.909+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Jquery</category><title>jQuery Tip #1 – Defining a Context When Using Selectors</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://weblogs.asp.net/dwahlin/archive/2012/02/07/jquery-tip-1-defining-a-context-when-using-selectors.aspx"&gt;jQuery Tip #1 – Defining a Context When Using Selectors&lt;/a&gt;: &lt;br /&gt;
I really enjoy working with jQuery and have had the opportunity to use it a lot over the years on various projects.&amp;nbsp; It’s an essential part of my “technology tool belt”. My company has also started providing new &lt;a href="http://www.thewahlingroup.com/"&gt;training&lt;/a&gt; classes on jQuery to various companies and I’ve had a lot of great questions come up about best practices, tips and tricks, when certain functions should be used over other functions, and more.&lt;br /&gt;
I decided to put together a series of posts that highlight simple tips and tricks that I’ve used in jQuery applications over the years to provide some guidance to developers new to jQuery and provide answers to different questions I’ve been asked. In this first post I’ll cover an oldie but goodie tip – defining a context when using selectors. It’s something I struggled with when I first started using jQuery but once I found the secret (which is quite easy) it changed how I used selectors and how I used CSS classes in my HTML.    &lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Defining a Context when using Selectors&lt;/h2&gt;
Selectors are an essential part of jQuery that provide a great way to locate nodes in the DOM quickly and easily. For example, the following selector can be used to find all &lt;i&gt;div&lt;/i&gt; elements with a class of &lt;i&gt;panel&lt;/i&gt; on them in a page:     &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;panelDivs = $(&lt;span style="color: maroon;"&gt;'div.panel'&lt;/span&gt;); &lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Selectors are well documented at &lt;a href="http://api.jquery.com/category/selectors"&gt;http://api.jquery.com/category/selectors&lt;/a&gt; so I won't rehash what they are or how to use them here. However, I do want to mention one simple yet powerful tip that many people new to jQuery will find useful. It's one of the tips that I've ended up using over and over as I build applications. To demonstrate the technique let’s walk through a simple example.&lt;br /&gt;
&lt;br /&gt;
Selectors can be used in the following way to find all elements with a class of &lt;i&gt;panel&lt;/i&gt; on them:  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;panels = $(&lt;span style="color: maroon;"&gt;'.panel'&lt;/span&gt;);&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
However, what if you want to grab all elements with a &lt;i&gt;panel&lt;/i&gt; class that are children of a given parent container element? To better understand the scenario, consider the following HTML:  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div &lt;/span&gt;&lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="emailContainer"&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div &lt;/span&gt;&lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="panel"&amp;gt;
        &lt;/span&gt;…
    &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div &lt;/span&gt;&lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="panel"&amp;gt;
        &lt;/span&gt;…
    &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div &lt;/span&gt;&lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="ordersContainer"&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div &lt;/span&gt;&lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="panel"&amp;gt;
        &lt;/span&gt;…
    &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div &lt;/span&gt;&lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="panel"&amp;gt;
        &lt;/span&gt;…
    &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Assume that you already have a reference to the &lt;i&gt;emailContainer&lt;/i&gt; div stored in a variable named &lt;i&gt;emailDiv&lt;/i&gt;: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;emailDiv = $(&lt;span style="color: maroon;"&gt;'#emailContainer'&lt;/span&gt;);&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
How do you find all div elements with a &lt;i&gt;panel&lt;/i&gt; class on them within the &lt;i&gt;emailDiv&lt;/i&gt; element as opposed to finding every one within the page? One technique is to use the jQuery find() function:  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;panels = emailDiv.find(&lt;span style="color: maroon;"&gt;'div.panel'&lt;/span&gt;);&lt;/pre&gt;
&lt;br /&gt;
You can alternatively supply a context object to the selector as shown next. This is the technique I normally use mainly because it’s something I’ve used for quite awhile (and old habits are hard to break).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;panels = $(&lt;span style="color: maroon;"&gt;'div.panel'&lt;/span&gt;, emailDiv);&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Which way is the best? It depends on who you talk to although you can check out some live performance tests at &lt;a href="http://jsperf.com/jquery-find-vs-context-sel"&gt;http://jsperf.com/jquery-find-vs-context-sel&lt;/a&gt; that infer that find() has a slight performance advantage. Regardless, knowing how to supply a context when using selectors is a great technique to understand and useful in many different scenarios.&lt;br /&gt;
&lt;br /&gt;
My development team has been using this technique a lot in an application that has several panels with a consistent set of CSS classes defined on elements within each panel. We’re using a plugin that we need to dynamically re-size as the panel changes size and created a function called refreshPanel() that accepts the panel to refresh. The object passed in to the function is used as the context for several selectors (it’s a jQuery object) to identify a starting point for searching elements with specific CSS classes. Here’s a section of a JavaScript file that defines refreshPanel().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;...
refreshPanel = &lt;span style="color: blue;"&gt;function &lt;/span&gt;(panel) {
    &lt;span style="color: blue;"&gt;var &lt;/span&gt;&lt;span class="currency_converter_text"&gt;padding = &lt;/span&gt;&lt;span class="currency_converter_link" title="Convert this amount"&gt;&lt;span class="currency_converter_link" title="Convert this amount"&gt;&lt;span class="currency_converter_link" title="Convert this amount"&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="currency_converter_text"&gt;;
    &lt;/span&gt;&lt;span style="color: darkgreen;"&gt;//Handle height
    &lt;/span&gt;&lt;span style="color: blue;"&gt;if &lt;/span&gt;(panelHeight == &lt;span style="color: blue;"&gt;null&lt;/span&gt;) {
        toolbarH = $(&lt;span style="color: maroon;"&gt;'.toolBar'&lt;/span&gt;, panel).height();
        tableHeadH = $(&lt;span style="color: maroon;"&gt;'.clientDataTable'&lt;/span&gt;&lt;span class="currency_converter_text"&gt;, panel).height();
        maxHeight = $(window).height();
        panelHeight = (maxHeight / panels.length) - toolbarH - (tableHeadH * &lt;/span&gt;&lt;span class="currency_converter_link" title="Convert this amount"&gt;&lt;span class="currency_converter_link" title="Convert this amount"&gt;&lt;span class="currency_converter_link" title="Convert this amount"&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="currency_converter_text"&gt;);
    }
    &lt;/span&gt;&lt;span style="color: darkgreen;"&gt;//Grab panel's current height
    &lt;/span&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;&lt;span class="currency_converter_text"&gt;h = panel.height() - toolbarH - (tableHeadH * &lt;/span&gt;&lt;span class="currency_converter_link" title="Convert this amount"&gt;&lt;span class="currency_converter_link" title="Convert this amount"&gt;&lt;span class="currency_converter_link" title="Convert this amount"&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="currency_converter_text"&gt;);
    &lt;/span&gt;&lt;span style="color: darkgreen;"&gt;//If panel's height is greater than the original panelHeight assigned in "if"
 above then they're maximizing
    &lt;/span&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;&lt;span class="currency_converter_text"&gt;newHeight = (h &amp;gt; panelHeight) ? maxHeight - toolbarH - (tableHeadH * &lt;/span&gt;&lt;span class="currency_converter_link" title="Convert this amount"&gt;&lt;span class="currency_converter_link" title="Convert this amount"&gt;&lt;span class="currency_converter_link" title="Convert this amount"&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="currency_converter_text"&gt;) : panelHeight;

    &lt;/span&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;w = panel.width();
    $(&lt;span style="color: maroon;"&gt;'div.dataTables_scrollBody'&lt;/span&gt;, panel).height(newHeight - padding).width(w);
    $(&lt;span style="color: maroon;"&gt;'.dataTables_scrollHeadInner, table.clientDataTable'&lt;/span&gt;, panel).width(w);
}
...&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that the panel object is used throughout as the selector context which allows the function to be re-used over and over for multiple panels. We use this technique in several places which allows us to consistently use the same CSS classes over and over within a given panel.  &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</description><link>http://dotnetadda.blogspot.com/2012/07/jquery-tip-1-defining-context-when.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-8872975789158814729</guid><pubDate>Mon, 23 Jul 2012 10:12:00 +0000</pubDate><atom:updated>2014-06-11T14:24:50.424+05:30</atom:updated><title>“Time-Saving VS11 and ASP.NET 4.5 Features You Shouldn’t Miss” ebook by Telerik</title><description>&lt;a href="http://weblogs.asp.net/lduveau/archive/2012/07/18/time-saving-vs11-and-asp-net-4-5-features-you-shouldn-t-miss-ebook-by-telerik.aspx"&gt;“Time-Saving VS11 and ASP.NET 4.5 Features You Shouldn’t Miss” ebook by Telerik&lt;/a&gt;: &lt;br /&gt;
&lt;img alt="" border="0" height="435" src="https://mscblogs.blob.core.windows.net/media/lduveau/Media/image_74763D05.png" style="background-image: none; border: 0px currentColor; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="" width="500" /&gt;&lt;br /&gt;
Here is a nice opportunity offered by &lt;a href="http://www.telerik.com/"&gt;Telerik&lt;/a&gt;:&lt;br /&gt;
They have created this amazing new ebook that you can download for free.   &lt;br /&gt;
More than that, you don’t even need to register to download the pdf, so it is free free!&lt;br /&gt;
&lt;img alt="" border="0" height="77" src="https://mscblogs.blob.core.windows.net/media/lduveau/Media/image_4CCFC0DB.png" style="background-image: none; border: 0px currentColor; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="" width="425" /&gt;&lt;br /&gt;
What’s inside ?&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Intellisense help you discover JS and CSS features&lt;/li&gt;
&lt;li&gt;WAI Aria makes the web usable by all&lt;/li&gt;
&lt;li&gt;HTML5 and CSS3 are available out of the box&lt;/li&gt;
&lt;li&gt;WebAPI exposes data via HTTP service&lt;/li&gt;
&lt;li&gt;Strongly Typed Data Binding ensures runtime confidence&lt;/li&gt;
&lt;li&gt;Request Validation prevents yellow screens of death&lt;/li&gt;
&lt;li&gt;Page Inspector puts an end to layout headaches&lt;/li&gt;
&lt;/ul&gt;&lt;strong&gt;Download it here:&lt;/strong&gt;    &lt;br /&gt;
&lt;a href="http://www.telerik.com/campaigns/visual-studio-2012.aspx?utm_source=MVPs&amp;amp;utm_medium=blog&amp;amp;utm_campaign=VS11_ebook_july2012"&gt;Free E-book: Time-Saving VS11 and ASP.NET 4.5 Features You Shouldn’t Miss&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I strongly recommend this reading, you will not loose your time and will learn something new for sure!&lt;br /&gt;
&lt;img height="1" src="http://weblogs.asp.net/aggbug.aspx?PostID=8755366" width="1" /&gt;</description><link>http://dotnetadda.blogspot.com/2012/07/time-saving-vs11-and-aspnet-45-features.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-7033581952192743794</guid><pubDate>Wed, 11 Aug 2010 07:23:00 +0000</pubDate><atom:updated>2014-06-11T14:32:54.578+05:30</atom:updated><title>Some nice code editor features provided by the VS 2010 Power Tool Extensions</title><description>&lt;a href="http://weblogs.asp.net/scottgu/archive/2010/08/04/some-nice-code-editor-features-provided-by-the-vs-2010-power-tool-extensions.aspx"&gt;Some nice code editor features provided by the VS 2010 Power Tool Extensions&lt;/a&gt;: "&lt;span class="entry-author-parent"&gt;by &lt;span class="entry-author-name"&gt;ScottGu&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;u&gt;Ctrl+Click “Go to Definition” &lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;One of the small, but useful, features that I find myself using a lot with the extensions is the "Ctrl + Click” go to definition feature.  &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;For those of you who haven’t tried it, it enables you to quickly navigate to the definition of a member or type within your code.  You can accomplish the same behavior out of the box with Visual Studio by right-clicking on a member/type and then choosing the “Go to Definition” context menu item – or by moving your cursor over a type/member and then pressing the F12 key.  But for some reason I’ve found the Ctrl+Click gesture provided by the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/en-us/d0d33361-18e2-46c0-8ff2-4adea1e34fef"&gt;VS 2010 Power Tool Extensions&lt;/a&gt; more natural and faster to use (since for my keyboard the F12 key requires a split-second extra finger move to use – whereas the control key is always in easy reach).&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;To try out the “Ctrl+Click” behavior, just hold down the “Ctrl” key and use your mouse to hover over a type or member in your code.  When the extension is enabled you’ll find that this causes a hyperlink to appear under each type/member you hover over: &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;a href="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_52C631B7.png"&gt;&lt;img alt="image" border="0" height="86" src="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_thumb_5FC011C8.png" style="border-width: 0px; display: inline;" title="image" width="398" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;Clicking the hyperlink will immediately navigate you to the definition of the type/member within your code:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;a href="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_0A2C42E6.png"&gt;&lt;img alt="image" border="0" height="185" src="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_thumb_70580CB6.png" style="border-width: 0px; display: inline;" title="image" width="479" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;Note that the “go-to-definition” feature in VS can also be used on a type that you don’t have source access to.  For example, like with the DbSet&amp;lt;T&amp;gt; collection I used in my &lt;a href="http://weblogs.asp.net/scottgu/archive/2010/08/03/using-ef-code-first-with-an-existing-database.aspx"&gt;EF “code-first” blog post&lt;/a&gt; yesterday:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;a href="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_61AD60D1.png"&gt;&lt;img alt="image" border="0" height="117" src="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_thumb_15E18A18.png" style="border-width: 0px; display: inline;" title="image" width="458" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;When you click a type referenced from a binary library, VS will automatically generate a class definition based on the signature compiled into the assembly:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;a href="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_2E04F473.png"&gt;&lt;img alt="image" border="0" height="390" src="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_thumb_5AADAE4C.png" style="border-width: 0px; display: inline;" title="image" width="640" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;u&gt;Triple Click Selection&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;Another one of the “small but useful” features provided with the power tool extensions that I find myself using a lot is the “triple click” feature.  &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;Today with VS you can double-click on a word to automatically select it: &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;a href="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_64929FB7.png"&gt;&lt;img alt="image" border="0" height="117" src="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_thumb_6AD97645.png" style="border-width: 0px; display: inline;" title="image" width="470" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;When the “Triple Click” extension is enabled you can now also triple-click on a line to automatically select the entire line:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;a href="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_5C2ECA60.png"&gt;&lt;img alt="image" border="0" height="124" src="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_thumb_223F8774.png" style="border-width: 0px; display: inline;" title="image" width="491" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;This behavior has been supported in Word for awhile.  Until I saw that there was a power tools extension for it I didn’t actually realize that VS didn’t already do it by default.  Well – now you can. &lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;u&gt;“Alt Up/Down Arrow” Line Movement&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;Another “small but useful” feature provided by the power tool extensions is the ability to easily move lines of code up/down within the editor.  &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;Simply select either a single line of code, or a block of multiple lines of code, within the editor:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;a href="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_5C2ECA60.png"&gt;&lt;img alt="image" border="0" height="124" src="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_thumb_223F8774.png" style="border-width: 0px; display: inline;" title="image" width="491" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;Then hold down the “alt” key, and press either the up or down arrow on your keyboard.  This will cause the editor to move the selected code up or down within the editor (without you having to copy/paste or move anything around manually):&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;a href="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_5673B0BA.png"&gt;&lt;img alt="image" border="0" height="125" src="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_thumb_2D889BB1.png" style="border-width: 0px; display: inline;" title="image" width="483" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;This is another one of those features that Word has had for awhile – and which is nice to now have in VS.&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;u&gt;Column Guides&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;Column guidelines allow you display a vertical band within the code editor.  This is useful to help identify the maximum size a single line of text should be within your code (for example: to avoid wrapping when printing it out).&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;The power tool extensions enable you to add a column guide pretty easily.  Just cursor over in your code editor to where you want the guideline to be (note: you can see the exact line column count at the bottom of the editor):&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;a href="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_1E71BCD7.png"&gt;&lt;img alt="image" border="0" height="417" src="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_thumb_23E02D7B.png" style="border-width: 0px; display: inline;" title="image" width="640" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;Then right-click and choose the “Guidelines-&amp;gt;Add Guideline” menu command: &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;a href="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_42B6A159.png"&gt;&lt;img alt="image" border="0" height="436" src="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_thumb_3ABEFEF7.png" style="border-width: 0px; display: inline;" title="image" width="554" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;This will then cause VS to show a column guide-line in all code editor windows at that column width – making it easier to see when you’ve written code or a comment that wraps beyond that:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;a href="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_75A631C0.png"&gt;&lt;img alt="image" border="0" height="449" src="https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_thumb_2D0C42EF.png" style="border-width: 0px; display: inline;" title="image" width="640" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;If you want to remove a guideline, you need to move your editor cursor to be at the same column width as the guideline.  You can then right-click and use the “Guidelines-&amp;gt;Remove Guideline” command to remove it.&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;u&gt;Extensions Update&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;In case you missed it, the Visual Studio team last week made a minor update to the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/en-us/d0d33361-18e2-46c0-8ff2-4adea1e34fef"&gt;VS 2010 Productivity Power Tool Extensions&lt;/a&gt; to fix a few bugs and performance issues that people reported with the &lt;a href="http://weblogs.asp.net/scottgu/archive/2010/07/19/vs-2010-productivity-power-tools-update-with-some-cool-new-features.aspx"&gt;last release&lt;/a&gt;.  &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;Sean has a blog post with more details about the update &lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2010/07/28/fixes-for-solution-navigator-amp-quick-access-in-the-productivity-power-tools.aspx"&gt;here&lt;/a&gt;.  The update included fixes for:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;
&lt;li&gt;Poor performance with Solution Navigator searches on large projects. In this revision, we've made some optimizations to the search algorithm. Search will also now only be initiated after two characters are typed in the search box. &lt;/li&gt;
&lt;li&gt;Items in Solution Folders were not sorted.  In this revision, they are sorted alphabetically. &lt;/li&gt;
&lt;li&gt;Invoking Quick Access could cause a crash on some machine configurations. This issue has been resolved in the current revision. &lt;/li&gt;
&lt;li&gt;Ctrl+1 &amp;amp; Ctrl+2 were not configurable in the Solution Navigator, which blocked the ability to type @ on some keyboards. This revision provides the Edit.ShowSolutionNavigatorPopupForSelection &amp;amp; Edit.ShowSolutionNavigatorPopupForFile commands which can be rebound using Tools =&amp;gt; Options =&amp;gt; Environment =&amp;gt; Keyboard. &lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;If you have a previous build of the Power Tool Extensions installed you use the “Tools-&amp;gt;Extension Manager” menu command, select the power tools extension and then click the “update” button to upgrade to the latest build.  &lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;u&gt;Summary&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial; font-size: 85%;"&gt;If you haven’t tried out the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/en-us/d0d33361-18e2-46c0-8ff2-4adea1e34fef"&gt;VS 2010 Productivity Power Tool Extensions&lt;/a&gt; yet, I’d encourage you to give it a try. It includes some nice additional functionality which can help save you keystrokes and time as you work within Visual Studio.  I’ve only covered a few of the features in this post and my previous two posts – there are a lot more cool things in there that I haven’t blogged about yet.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;You can also now enable/disable each individual feature within the extensions pack – allowing you to selectively choose what you want to use.  Use the “Tools-&amp;gt;Options” menu command, and navigate to the “Power Productivity Tools” tree-view item to enable/disable individual features. &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;Hope this helps,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;Scott&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: 85%;"&gt;&lt;/span&gt;</description><link>http://dotnetadda.blogspot.com/2010/08/some-nice-code-editor-features-provided.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-3883258603816641455</guid><pubDate>Wed, 11 Aug 2010 07:07:00 +0000</pubDate><atom:updated>2014-06-11T14:43:11.268+05:30</atom:updated><title>Different ways to get Identity of New Inserted Rows in SQL Server</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
There are different methods to know the Identity Value of a newly added row.&lt;br /&gt;
Let us consider the following example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre name="code"&gt;&lt;span style="color: #6aa84f;"&gt;--Create a Table&lt;/span&gt;
&lt;span style="color: blue;"&gt;CREATE TABLE&lt;/span&gt; table1
(
id &lt;span style="color: blue;"&gt;int&lt;/span&gt; &lt;span style="color: blue;"&gt;identity&lt;/span&gt;(1,1),
Employee &lt;span style="color: blue;"&gt;varchar&lt;/span&gt;(100)
)

&lt;span style="color: #6aa84f;"&gt;--Insert Data&lt;/span&gt;
&lt;span style="color: blue;"&gt;INSERT INTO&lt;/span&gt; table1(Employee) &lt;span style="color: blue;"&gt;SELECT&lt;/span&gt; &lt;span style="color: red;"&gt;'Amit'&lt;/span&gt;

&lt;span style="color: #6aa84f;"&gt;--Get Identity Value of the Current Scope&lt;/span&gt;
&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt; &lt;span style="color: magenta;"&gt;scope_identity&lt;/span&gt;()


&lt;span style="color: #6aa84f;"&gt;--Get Identity value of the Current Session&lt;/span&gt;
&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt; &lt;span style="color: magenta;"&gt;@@identity&lt;/span&gt;

&lt;span style="color: #6aa84f;"&gt;--Get Identity value of the Table&lt;/span&gt;
&lt;span style="color: #6aa84f;"&gt;--Regardless of Scope and Session&lt;/span&gt;
&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt; &lt;span style="color: magenta;"&gt;ident_current&lt;/span&gt;(&lt;span style="color: red;"&gt;'table1'&lt;/span&gt;)&lt;/pre&gt;
&lt;h5&gt;
Note that first two methods wont give correct values if data are added to the ‘different tables’.&lt;/h5&gt;
&lt;br /&gt;
OUTPUT&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;img alt="" height="1" src="https://blogger.googleusercontent.com/tracker/495177919198719500-5570601931142630747?l=www.sqlservercurry.com" width="1" /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf5Fg8xXc7CK6M_1pkLm25Lhlr4gFI4ZGuveBRG9GHRyogg4EWCnA42gWreOXzmnjhaVzibswFvHhR_vSVURzc-EfQfsz5JOiykXeayn0nn7cl_89Ur2DtwqvOY5luwCJVikxwwCiUIHU/s1600/identity.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf5Fg8xXc7CK6M_1pkLm25Lhlr4gFI4ZGuveBRG9GHRyogg4EWCnA42gWreOXzmnjhaVzibswFvHhR_vSVURzc-EfQfsz5JOiykXeayn0nn7cl_89Ur2DtwqvOY5luwCJVikxwwCiUIHU/s1600/identity.png" height="320" width="153" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/%7Er/sqlservercurry/blog/%7E4/c_aceX4gnjw" height="1" width="1" /&gt;&lt;/div&gt;
</description><link>http://dotnetadda.blogspot.com/2010/08/different-ways-to-get-identity-of-new.html</link><author>noreply@blogger.com (xyz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf5Fg8xXc7CK6M_1pkLm25Lhlr4gFI4ZGuveBRG9GHRyogg4EWCnA42gWreOXzmnjhaVzibswFvHhR_vSVURzc-EfQfsz5JOiykXeayn0nn7cl_89Ur2DtwqvOY5luwCJVikxwwCiUIHU/s72-c/identity.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-5234423419077997714</guid><pubDate>Wed, 11 Aug 2010 06:51:00 +0000</pubDate><atom:updated>2010-08-11T12:21:10.635+05:30</atom:updated><title>How to redesign a website in 5 weeks</title><description>&lt;a href="http://www.simple-talk.com/community/blogs/redwork/archive/2010/08/10/93923.aspx"&gt;How to redesign a website in 5 weeks&lt;/a&gt;: "&lt;br /&gt;
&lt;b&gt;You will need&lt;/b&gt;: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;A dedicated room - a usability lab or 'war room' if you like &lt;/li&gt;
&lt;li&gt;A dithering of designers. Pick and mix any five or six from:      &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Information architect &lt;/li&gt;
&lt;li&gt;Interaction designer &lt;/li&gt;
&lt;li&gt;Usability engineer &lt;/li&gt;
&lt;li&gt;User interface designer &lt;/li&gt;
&lt;li&gt;User researcher &lt;/li&gt;
&lt;li&gt;Any other title using one or more of the above terms &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Reams of paper, pens, pencils, crayons, glue, pipe cleaners and felt (glitter optional) &lt;/li&gt;
&lt;li&gt;A Spotify playlist with at least 500 songs, none of which shall be by Maroon 5 &lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;Step One - Review the internets&lt;/b&gt;&lt;br /&gt;
Be exhaustive in your research. Critiquing everything from the &lt;a href="http://www.abyssandapex.com/200710-wikihistory.html"&gt;International Association of Time Travellers member's forum&lt;/a&gt; through to &lt;a href="http://www.peopleofwalmart.com/?page_id=9798"&gt;People of Walmart&lt;/a&gt;. Oh, and probably some competitor sites. Like &lt;a href="http://failblog.org/"&gt;Fail blog&lt;/a&gt;.&lt;br /&gt;
&lt;b&gt;Step Two - Inspiration wall&lt;/b&gt; Print out the best elements then get an adult to cut them out. Next, stick them on the walls and windows. Look at them often for inspiration. Try and work a silverback gorilla into all of your designs.&lt;br /&gt;
&lt;img src="http://www.simple-talk.com/blogbits/redatwork/IMG_8719.jpg" /&gt;&lt;br /&gt;
&lt;b&gt;Step Three - Early prototyping&lt;/b&gt;&lt;br /&gt;
Sketch out some designs. For websites, start by drawing an empty rectangle on the page. This represents the web page.&lt;br /&gt;
&lt;img src="http://www.simple-talk.com/blogbits/redatwork/IMG_8314.jpg" /&gt; &lt;br /&gt;
&lt;b&gt;Step Four - User feedback&lt;/b&gt;&lt;br /&gt;
Show your early prototypes to people whose profile closely matches that of your websites key personas. Failing that, show them to the stakeholders who're lining up to kick your ass should the project fail.&lt;br /&gt;
&lt;img src="http://www.simple-talk.com/blogbits/redatwork/IMG_8317.jpg" /&gt; &lt;br /&gt;
You: 'What are you thinking?'&lt;br /&gt;
Them: 'Does that rectangle represent the webpage?' &lt;br /&gt;
You: 'Mmmmaybe...'&lt;br /&gt;
Them: 'But the piece of paper itself is a rectangle. Why draw a rectangle on it?'&lt;br /&gt;
You: 'I would explain, but I don't want to bias your feedback.'&lt;br /&gt;
&lt;b&gt;Step Five - Iterate the designs&lt;/b&gt;&lt;br /&gt;
You'll now spend the following weeks in a cyclical design process which goes something like Sketching &amp;gt; Feedback &amp;gt; Swearing &amp;gt; Sketching &amp;gt; Feedback &amp;gt; Arguing &amp;gt; Coffee &amp;gt; Sketching &amp;gt; Beer At some point you will want to move away from the sketches and create designs with higher fidelity. We use &lt;a href="http://www.balsamiq.com/"&gt;Balsamiq&lt;/a&gt; because it makes your higher fidelity designs look like sketches. &lt;br /&gt;
&lt;img src="http://www.simple-talk.com/blogbits/redatwork/IMG_8727.jpg" /&gt; &lt;br /&gt;
&lt;b&gt;Step Six - Plan B&lt;/b&gt;&lt;br /&gt;
By this point it's week 5 and you've already known for four weeks that you'd never get it done in five. Take a holiday and delay your return by encouraging the French to strike (easy). Have a 'day out' at the company's expense. Undergo root canal treatment. Anything that will persuade the stakeholders to give you more time... Suggest another 12 weeks. When they agree and leave the room, high-fives all round and bring out the 12 year old malt whiskey.&lt;br /&gt;
&lt;img src="http://www.simple-talk.com/blogbits/redatwork/IMG_8308.jpg" /&gt; &lt;br /&gt;
To be continued... (hic)&lt;br /&gt;
&lt;b&gt;Post by: Adam Walker&lt;/b&gt;&lt;br /&gt;
&lt;img height="1" src="http://www.simple-talk.com/community/aggbug.aspx?PostID=93923" width="1" /&gt;"</description><link>http://dotnetadda.blogspot.com/2010/08/how-to-redesign-website-in-5-weeks.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-6505770582116522206</guid><pubDate>Wed, 28 Jul 2010 12:14:00 +0000</pubDate><atom:updated>2014-06-11T15:40:10.472+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Password Hacking</category><category domain="http://www.blogger.com/atom/ns#">Security</category><category domain="http://www.blogger.com/atom/ns#">SQL</category><category domain="http://www.blogger.com/atom/ns#">Sql Injuction</category><title>Security Issues in SQL Server</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h3&gt;
Security Issues&lt;/h3&gt;
Security, IMSHO, is one of those interesting issues that everyone  should be aware of. You cannot store a record or two in a database  server without considering the security issues. What if a role is broken  and a CC# is stolen? Huh? What if an intruder creates a new  account/password pair without having the appropriate permission to do  so?&lt;br /&gt;
Considering the security issues, however, doesn't mean that you can  block every single intruder. I honestly believe that whatever you do to  block intruders, there will always be another man on this earth who can  break the rule. So, all you can do is just try your best to block most  of those intruders - Remember, you cannot block all of them!&lt;br /&gt;
Well! The question now is what security has got to do with the &lt;code lang="sql"&gt;&lt;span class="code-keyword"&gt;SELECT&lt;/span&gt;&lt;/code&gt; statement. To  understand this, you should know that there are 3 types of permissions  in SQL-SERVER:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Object permission - which involves granting or revoking permission  rights to the objects. By objects, we mean data and/or stored  procedures. Does a certain user have the appropriate access to a certain  database to query for a specific table and/or view? Does she have the  proper right to insert, update, or delete a row within a table of a  certain database? This is where "Object Permission" comes into play.  This kind of data manipulation requires the user to have a class of  permission called “Object Permission”. &lt;/li&gt;
&lt;li&gt;Statement permission - which involves granting or revoking  permission rights to create a database and/or table within a database. &lt;code lang="sql"&gt;&lt;span class="code-keyword"&gt;CREATE&lt;/span&gt; &lt;span class="code-keyword"&gt;TABLE&lt;/span&gt;&lt;/code&gt;, &lt;code lang="sql"&gt;&lt;span class="code-keyword"&gt;CREATE&lt;/span&gt; &lt;span class="code-keyword"&gt;VIEW&lt;/span&gt;&lt;/code&gt;,  and &lt;code lang="sql"&gt;&lt;span class="code-keyword"&gt;CREATE&lt;/span&gt; &lt;span class="code-keyword"&gt;PROCEDURE&lt;/span&gt;&lt;/code&gt; are 3 kinds of Statement  permissions introduced in SQL-Server. &lt;/li&gt;
&lt;li&gt;Implied permission - which states that the owner of an object has  got the permission to control the activities of the object. Once a “foo”  user owns a “bar” table, she can add and remove data on the “bar”  table. The implied permission also states that the “foo” user can  control the way other users work with the “bar” table. &lt;/li&gt;
&lt;/ol&gt;
With this information in hand, it is now time to say that granting or  revoking those three types of permissions to users is done by database  administrators, and therefore a programmer doesn’t care about such  permissions. So, what is left to the programmer? Well. This is what we  have considered as “Security Issues” and is discussed below.&lt;br /&gt;
To start, consider a typical ASP application that is supposed to let  an authorized user to login to the system. To develop such an ASP  application, we simply create a form containing two edit boxes, one  provided for user name entry and the other to get a password from the  visitor:&lt;br /&gt;
&lt;div class="small-text align-right" id="premain38" style="display: block;" width="100%"&gt;
&lt;br /&gt;
&lt;pre style="background: white; font-family: Consolas; font-size: 15px;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;!&lt;/span&gt;—-login.asp&amp;nbsp;file!--&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;form&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;method&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"GET"&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;action&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"login.asp"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;table&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;border&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"0"&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;width&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"100%"&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;cellspacing&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"0"&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;cellpadding&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"5"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;tr&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;td&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;width&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"13%"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&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;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;font&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;size&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"2"&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;face&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"Verdana"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;User&amp;nbsp;ID:&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;font&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;td&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;td&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;width&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"87%"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&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;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;input&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"text"&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"UserID"&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;size&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"20"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;td&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;tr&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;tr&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;td&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;width&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"13%"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&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;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;font&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;size&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"2"&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;face&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"Verdana"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;Password:&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;font&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;td&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;td&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;width&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"87%"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&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;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;input&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"password"&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"Password"&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;size&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"20"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;td&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;tr&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;tr&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;td&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;width&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"13%"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;td&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;td&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;width&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"87%"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&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;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;input&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"submit"&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;value&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"Submit"&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"btnSubmit"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;td&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;tr&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;table&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;form&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;pre id="pre38" lang="html" style="margin-top: 0pt;"&gt;&lt;/pre&gt;
Considering “Mehdi” as the username and “mypass” as the password, the  following URL is generated when the submit button is pressed:&lt;br /&gt;
login.asp?UserID=Mehdi&amp;amp;Password=mypass&amp;amp;btnSubmit=Submit&lt;br /&gt;
Therefore, to authorize a given user, we can simply write a function,  namely, &lt;code&gt;IsAuthorized&lt;/code&gt; as shown below:&lt;br /&gt;
&lt;div class="small-text align-right" id="premain39" style="display: block;" width="100%"&gt;
&lt;br /&gt;
&lt;pre style="background: white; font-family: Consolas; font-size: 15px;"&gt;&lt;span style="color: blue;"&gt;Function&lt;/span&gt;&amp;nbsp;IsAuthorized(szUser,&amp;nbsp;szPassword)
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IsAuthorized&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;False&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oConnection&amp;nbsp;=&amp;nbsp;Server.CreateObject(&lt;span style="color: #a31515;"&gt;"ADODB.Connection"&lt;/span&gt;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;szConnection&amp;nbsp;=&amp;nbsp;&lt;span style="color: #a31515;"&gt;"provider=sqloledb;&amp;nbsp;server=myserver;&amp;nbsp;uid=myid;&amp;nbsp;"&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;szConnection&amp;nbsp;=&amp;nbsp;szConnection&amp;nbsp;&amp;amp;&amp;nbsp;"pwd=mypwd;&amp;nbsp;database=mydb;"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oConnection.Open(szConnection)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;szSqlStatement&amp;nbsp;=&amp;nbsp;&lt;span style="color: #a31515;"&gt;"SELECT&amp;nbsp;*&amp;nbsp;FROM&amp;nbsp;Login&amp;nbsp;WHERE&amp;nbsp;UserID&amp;nbsp;=&amp;nbsp;'"&lt;/span&gt;&amp;nbsp;&amp;amp;&amp;nbsp;szUser
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;szSqlStatement&amp;nbsp;=&amp;nbsp;szSqlStatement&amp;nbsp;&amp;amp;&amp;nbsp;"'&amp;nbsp;AND&amp;nbsp;Password&amp;nbsp;=&amp;nbsp;'"&amp;nbsp;&amp;amp;&amp;nbsp;szPassword&amp;nbsp;&amp;amp;&amp;nbsp;"'"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oRS&amp;nbsp;=&amp;nbsp;Server.CreateObject(&lt;span style="color: #a31515;"&gt;"ADODB.Recordset"&lt;/span&gt;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oRS.Open(szSqlStatement,&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;oConnection,&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;adOpenStatic,&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;adLockOptimistic,&amp;nbsp;_
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;adCmdText())
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;If&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;Not&lt;/span&gt;&amp;nbsp;oRS.EOF&amp;nbsp;&lt;span style="color: blue;"&gt;Then&lt;/span&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;IsAuthorized&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;True&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;If&lt;/span&gt;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oRS.Close()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oRS&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;Nothing&lt;/span&gt;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oConnection.Close()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oConnection&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;Nothing&lt;/span&gt;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;Function&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;pre id="pre39" lang="vbscript" style="margin-top: 0pt;"&gt;&lt;/pre&gt;
&lt;br /&gt;
Now, let’s take a precise look to what we already wrote. Again,  consider an intruder accessing our login page using the following user  id: ' OR 1 = 1 --&lt;br /&gt;
What does actually happen in such circumstances? To understand this,  let’s take a look at our SQL statement constructed in &lt;code&gt;IsAuthorized&lt;/code&gt;  function based on the above entry:&lt;br /&gt;
&lt;div class="small-text align-right" id="premain40" style="display: block;" width="100%"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre id="pre40" lang="sql" style="margin-top: 0pt;"&gt;&lt;pre style="background: white; font-family: Consolas; font-size: 15px;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&amp;nbsp;&lt;span style="color: grey;"&gt;*&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;Login&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;UserID&lt;/span&gt;&amp;nbsp;&lt;span style="color: grey;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;''&lt;/span&gt;&amp;nbsp;&lt;span style="color: grey;"&gt;OR&lt;/span&gt;&amp;nbsp;1&amp;nbsp;&lt;span style="color: grey;"&gt;=&lt;/span&gt;&amp;nbsp;1&amp;nbsp;&lt;span style="color: green;"&gt;--'&amp;nbsp;AND&amp;nbsp;Password&amp;nbsp;=&amp;nbsp;''&lt;/span&gt;
&lt;/pre&gt;
&lt;/pre&gt;
&lt;pre id="pre40" lang="sql" style="margin-top: 0pt;"&gt;&lt;span class="code-comment"&gt;
&lt;/span&gt;&lt;/pre&gt;
Since two hyphen mentioned by the intruder indicates a user-provided  text (i.e., comments) in SQL-92 standards, whatever comes after those  hyphens is not considered as the SQL statement and therefore the above  statement is simplified to:&lt;br /&gt;
&lt;div class="small-text align-right" id="premain41" style="display: block;" width="100%"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre id="pre41" lang="sql" style="margin-top: 0pt;"&gt;&lt;pre style="background: white; font-family: Consolas; font-size: 15px;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&amp;nbsp;&lt;span style="color: grey;"&gt;*&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;Login&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;UserID&lt;/span&gt;&amp;nbsp;&lt;span style="color: grey;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: red;"&gt;''&lt;/span&gt;&amp;nbsp;&lt;span style="color: grey;"&gt;OR&lt;/span&gt;&amp;nbsp;1&amp;nbsp;&lt;span style="color: grey;"&gt;=&lt;/span&gt;&amp;nbsp;1&lt;/pre&gt;
&lt;/pre&gt;
&lt;br /&gt;
Well! You could guess the rest. Since 1 is equal to 1, the  above-mentioned query results in all the rows already settled in the  Login table. You see the intruder had neither user ID nor password but  he has been identified as an authorized member.&lt;br /&gt;
In some circumstances, though, it will get even worst when an  intruder inserts a pair of ID and password to a table. So what the heck  can we do to prevent abusing the system? There are basically 3 ways to  prevent such things:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Create a procedure, say, &lt;code&gt;sp_is_authorized()&lt;/code&gt; to make the  actual authorization on database side. This way, the intruder won’t be  able to bypass the authorization process as described above. The  specified procedure follows:  &lt;div class="small-text align-right" id="premain42" style="display: block;" width="100%"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre id="pre42" lang="sql" style="margin-top: 0pt;"&gt;&lt;pre style="background: white; font-family: Consolas; font-size: 15px;"&gt;&lt;span style="color: blue;"&gt;CREATE&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;PROCEDURE&lt;/span&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;sp_is_authorized&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: teal;"&gt;@user_id&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;char&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;16&lt;span style="color: grey;"&gt;),&lt;/span&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;@password&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;char&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;16&lt;span style="color: grey;"&gt;)&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;AS&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;declare&lt;/span&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;@nRet&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;int&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;select&lt;/span&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;@nRet&lt;/span&gt;&amp;nbsp;&lt;span style="color: grey;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: magenta;"&gt;count&lt;/span&gt;&lt;span style="color: grey;"&gt;(*)&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;Login&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;where&lt;/span&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: teal;"&gt;UserID&lt;/span&gt;&amp;nbsp;&lt;span style="color: grey;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;@user_id&lt;/span&gt;&amp;nbsp;&lt;span style="color: grey;"&gt;AND&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;Password&lt;/span&gt;&amp;nbsp;&lt;span style="color: grey;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;@password&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;return&lt;/span&gt;&amp;nbsp;&lt;span style="color: teal;"&gt;@nRet&lt;/span&gt;
&lt;span style="color: blue;"&gt;GO&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;br /&gt;
We will talk about this usage of &lt;code lang="sql"&gt;&lt;span class="code-keyword"&gt;SELECT&lt;/span&gt;&lt;/code&gt; statement later in this  article.&lt;br /&gt;
 &lt;/li&gt;
&lt;li&gt;Rewrite the &lt;code&gt;IsAuthorized&lt;/code&gt; function using the ADO  parameterized queries:  &lt;div class="small-text align-right" id="premain43" style="display: block;" width="100%"&gt;
&lt;br /&gt;
&lt;pre style="background: white; font-family: Consolas; font-size: 15px;"&gt;&lt;span style="color: blue;"&gt;Function&lt;/span&gt;&amp;nbsp;IsAuthorized(szUser,&amp;nbsp;szPassword)
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IsAuthorized&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;False&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;On&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;Error&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;Resume&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;Next&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oConnection&amp;nbsp;=&amp;nbsp;Server.CreateObject(&lt;span style="color: #a31515;"&gt;"ADODB.Connection"&lt;/span&gt;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;szConnection&amp;nbsp;=&amp;nbsp;&lt;span style="color: #a31515;"&gt;"provider=sqloledb;&amp;nbsp;server=myserver;&amp;nbsp;"&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;szConnection&amp;nbsp;=&amp;nbsp;szConnection&amp;nbsp;&amp;amp;&amp;nbsp;"uid=myid;&amp;nbsp;pwd=mypass;&amp;nbsp;database=pubs;"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oConnection.Open(szConnection)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oCmd&amp;nbsp;=&amp;nbsp;Server.CreateObject(&lt;span style="color: #a31515;"&gt;"ADODB.Command"&lt;/span&gt;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oCmd.ActiveConnection&amp;nbsp;=&amp;nbsp;oConnection
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oCmd.CommandText&amp;nbsp;=&amp;nbsp;&lt;span style="color: #a31515;"&gt;"select&amp;nbsp;*&amp;nbsp;from&amp;nbsp;Login&amp;nbsp;where&amp;nbsp;UserID=&amp;nbsp;?&amp;nbsp;AND&amp;nbsp;Password&amp;nbsp;=&amp;nbsp;?"&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oCmd.CommandType&amp;nbsp;=&amp;nbsp;adCmdText
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oCmd.Parameters.Append(oCmd.CreateParameter(&lt;span style="color: #a31515;"&gt;"UserID"&lt;/span&gt;,&amp;nbsp;adChar,&amp;nbsp;adParamInput,&amp;nbsp;16,&amp;nbsp;szUser))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oCmd.Parameters.Append(oCmd.CreateParameter(&lt;span style="color: #a31515;"&gt;"Password"&lt;/span&gt;,&amp;nbsp;adChar,&amp;nbsp;adParamInput,&amp;nbsp;16,&amp;nbsp;szPassword))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oRS&amp;nbsp;=&amp;nbsp;Server.CreateObject(&lt;span style="color: #a31515;"&gt;"ADODB.Recordset"&lt;/span&gt;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oRS&amp;nbsp;=&amp;nbsp;oCmd.Execute()
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;If&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;Not&lt;/span&gt;&amp;nbsp;oRS.EOF&amp;nbsp;&lt;span style="color: blue;"&gt;Then&lt;/span&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;IsAuthorized&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;True&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;If&lt;/span&gt;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oRS.Close()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oRS&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;Nothing&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oCmd.Close()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oCmd&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;Nothing&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oConnection.Close()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oConnection&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;Nothing&lt;/span&gt;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;Function&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;pre id="pre43" lang="vbscript" style="margin-top: 0pt;"&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Construct your dynamic SQL statement after the given user ID and  password is checked against the invalid characters. The most common way  to do so is using the Regular Expression component, &lt;code&gt;RegExp&lt;/code&gt;,  which is introduced with IE 5.0. Since describing it goes beyond the  scope of this paper, we could simply leave it to the reader. &lt;/li&gt;
&lt;/ol&gt;
The final thing we are going to say in this regard is that the  above-mentioned situation is still in charge even when you are using the  POST method (instead of GET) to submit your form. I strictly emphasize  that using the POST method to submit a form is not still secure if you  are not going to apply the above-mentioned conditions. There are several  ways that an intruder can POST illegal information to your form, and  therefore you cannot count on this, solely. So, what we already  mentioned is applied to any form (either submitted by POST or GET  method) that processes user input.&lt;/div&gt;
</description><link>http://dotnetadda.blogspot.com/2010/07/security-issues-in-sql-server.html</link><author>noreply@blogger.com (Farogh Haider)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-4937276102382243385</guid><pubDate>Thu, 15 Jul 2010 05:43:00 +0000</pubDate><atom:updated>2010-07-15T11:13:13.083+05:30</atom:updated><title>7 Personality Types of Developers Today</title><description>&lt;a href="http://www.webdesignerdepot.com/2010/05/7-personality-types-of-developers-today/"&gt;7 Personality Types of Developers Today&lt;/a&gt;: " from &lt;span id="chrome-title"&gt;&lt;/span&gt;&lt;a href="http://www.webdesignerdepot.com/" target="_blank"&gt;Webdesigner Depot&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.webdesignerdepot.com/2010/05/7-personality-types-of-developers-today/"&gt;&lt;img alt="" height="160" src="http://netdna.webdesignerdepot.com/uploads/developer_types/type.jpg" width="200" /&gt;&lt;/a&gt;&lt;br /&gt;
Developers and programmers are meticulous individuals, and developers sometimes stand out even among themselves.&lt;br /&gt;
&lt;br /&gt;
We introduced you to 7 types of designers in our article &lt;a href="http://www.webdesignerdepot.com/2010/05/7-personality-types-of-designers-today/" rel="nofollow"&gt;7 Personality Types of Designers Today&lt;/a&gt;. Developers have peculiar traits and habits of their own. This article looks at &lt;b&gt;7 types of developers&lt;/b&gt; &lt;b&gt;today&lt;/b&gt; and their defining characteristics.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;“The best programmers are not marginally better than merely good ones. They are an order of magnitude better, measured by whatever standard: conceptual creativity, speed, ingenuity of design or problem-solving ability.”&lt;br /&gt;
&lt;b&gt;—Randall E. Stross&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Stereotyping is generally not good practice. But we’re not trying to squeeze individuals into categories. Rather, delineating these types can help you figure out where you stand and help you understand others.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;1. The Self-Help Constructor&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/joshuacripps/4286861448/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/developer_types/constructor.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The self-help constructor does whatever it takes to get the job done with his experience and skill, no matter how limited.&lt;br /&gt;
&lt;br /&gt;
For example, he may accomplish the job by finding open-source software and other free applications and tools. His best assets are his willingness to learn what he needs to complete the job and his ability to absorb the information like a sponge. He is resourceful, working with whatever is available to him.&lt;br /&gt;
&lt;br /&gt;
Not every client will be impressed. Those who don’t know any better will praise his work, but the self-help constructor does not develop applications or plug-ins himself.&lt;br /&gt;
&lt;br /&gt;
He merely exploits existing tools to construct something seemingly new for clients. With the wide range of sophisticated tools available today, this is becoming easier, but much less impressive.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;2. The Experienced Old Man&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/matt_lew/1760002850/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/developer_types/oldman.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
He may not be the hippest guy in this energetic and creative field, but the experienced old man brings something valuable to the table: a wealth of knowledge and experience.&lt;br /&gt;
&lt;br /&gt;
He may appear outdated, unable to keep up with the latest tools and technology, but he is wise and knows the basics like the back of his hand.&lt;br /&gt;
&lt;br /&gt;
His battle stories of bygone days will fascinate and thrill. He may not be the fastest or most technologically savvy, but slow and steady wins the race, and he delivers the goods as he always has.&lt;br /&gt;
&lt;br /&gt;
He proves that the old-school style of coding may be antique but isn’t extinct. He may not be your heaviest hitter, but in times of great need, you know you can count on the experienced old man to deliver.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;3. The Hardcore Geek&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/banana2000/2196309606/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/developer_types/geek.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Workaholic doesn’t begin to describe the hardcore geek, this martyr of developers. He goes beyond the call of duty to deliver the product and takes great pride in his work.&lt;br /&gt;
&lt;br /&gt;
He spends his lunch hour at his desk working frantically to finish the project ahead of time. When he allows himself a little free time, he reads books, journal articles and the like to improve himself. Very much an introvert, he feels most comfortable in the world of code and programming jargon.&lt;br /&gt;
&lt;br /&gt;
The more code the hardcore geek writes, the more content he feels. As great as he is with code, he makes for a much better worker bee than a leader.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;4. The Scholarly Know-It-All&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/feelingcroppy/3908455646/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/developer_types/knowitall.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The scholarly know-it-all is a walking encyclopedia on programming. He can spend hours passionately discussing the history of a programming language or dissecting imperfect code.&lt;br /&gt;
&lt;br /&gt;
He is the poet of the programming world, whose code is a work of art that can be appreciated and analyzed. Recursion is his middle name, and he tweaks every block of code to perfection, regardless of timelines or readability.&lt;br /&gt;
&lt;br /&gt;
He sets high standards for himself, and his work sometimes complicates matters: a task that should take only an hour to complete takes him a few months. Mind you, he’s not incompetent. On the contrary, he is highly capable; but he makes work for himself by creating new tools and libraries and even reconstructing entirely new systems, all to meet his own standards.&lt;br /&gt;
&lt;br /&gt;
He feels obliged to impart his knowledge to others and share his passion for the theory and technical intricacies of coding and programming. He tries his best to explain to clients why using state-of-the-art technology is so important. Every project is his precious child.&lt;br /&gt;
&lt;br /&gt;
The scholarly know-it-all is great to have on your team, but be sure you can get him to spend his energy on the important details, rather than waste time satisfying his urge to delve into every nook and cranny.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;5. The Ninja&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/latitude13/143351547/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/developer_types/ninja.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The ninja is a man of few words and keeps to himself. While similar to the hardcore geek, he has more in his life than code and work.&lt;br /&gt;
&lt;br /&gt;
He is an enigma: not outright friendly or forthcoming, but he works surprisingly well on a team. Everyone notices his tireless nature but can’t figure out how he does everything so well and so quickly. There is much evidence of his work but little evidence that he did it. “Show don’t tell” describes his modus operandi best.&lt;br /&gt;
&lt;br /&gt;
Never outwardly frazzled (try as you might to throw him off), he resolves problems quickly and efficiently, regardless of time or place. The ninja’s stealth sends chills down your spine, and he leaves you wondering how he managed to accomplish his feat.&lt;br /&gt;
&lt;br /&gt;
A lone ranger, he gets the job done regardless of his status on the team or his relationship with other members. His motto? Don’t have doubts; just resolve the problem quickly and efficiently. This no-nonsense attitude makes him an absolute joy to work with.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;6. The Clever Ambassador&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/vancouverislanduniversity/4118587412/in/set-72157622836779916/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/developer_types/ambassador.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The clever ambassador is the face of the team. He is outspoken and the unofficial project manager. His knowledge of software development, project workflows and code theory is adequate, but he does very little of the actual programming or work.&lt;br /&gt;
&lt;br /&gt;
He is quick to pick up leads and great at communicating with clients. He is the consummate ring-master, able to please both clients (the ferocious lions) and team members (the elephants that could easily trample him if they wanted).&lt;br /&gt;
&lt;br /&gt;
In his supervisory role, the clever ambassador ensures that every project meets the requirements and satisfies the client. He is the go-between, representing the development team for the client and balancing client satisfaction with practicality.&lt;br /&gt;
&lt;br /&gt;
Having to walk this tight rope, he often feels that he should be better compensated, despite never doing any heavy lifting (i.e. coding). He is the model who sits pretty in front of the camera selling the product, while the rest of the team (make-up artists, hair stylists, etc.) works behind the scenes, receiving lower payment for what amounts to the same work.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;7. The Half-Cup Speedster&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/moojieturtle/424931649/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/developer_types/multitask.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The half-cup speedster takes on multiple projects at once. He works much faster than most, but his amazing quantity is tarnished by its quality: his speed results from cutting corners and hacking core.&lt;br /&gt;
&lt;br /&gt;
He feels that optimizing and checking code takes too long. His code is messy because he does not follow best practices and never makes use of object-oriented programming (OOP).&lt;br /&gt;
&lt;br /&gt;
Amazingly, despite his code looking like a minefield, the product works just as intended. Cutting corners is generally not good practice, but in an impossible crunch, the half-cup speedster might be the person for the job.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, much like the handwriting of physicians, his code is practically indecipherable. Should someone need to fix a problem that surfaces later, they will surely encounter difficulties. You can’t fix what you can’t read or understand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Written exclusively for Webdesigner Depot by Aidan Huang, a freelance front-end developer and designer. He is also an editor at &lt;a href="http://www.onextrapixel.com/" title="Onextrapixel"&gt;Onextrapixel&lt;/a&gt;.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;As we’ve seen, there are many types of developers in the field. Which do you most closely resemble? Have you met anyone who fits any of the categories mentioned here? Share your thoughts with us in the comments below…&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: y1oV1V</description><link>http://dotnetadda.blogspot.com/2010/07/7-personality-types-of-developers-today.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-8765088371591454827</guid><pubDate>Thu, 15 Jul 2010 05:38:00 +0000</pubDate><atom:updated>2010-07-15T11:08:29.460+05:30</atom:updated><title>7 Personality Types of Designers Today</title><description>&lt;a href="http://www.webdesignerdepot.com/2010/05/7-personality-types-of-designers-today/"&gt;7 Personality Types of Designers Today&lt;/a&gt;: "from &lt;span id="chrome-title"&gt;&lt;/span&gt;&lt;a href="http://www.webdesignerdepot.com/" target="_blank"&gt;Webdesigner Depot&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.webdesignerdepot.com/2010/05/7-personality-types-of-designers-today/"&gt;&lt;img alt="" height="160" src="http://netdna.webdesignerdepot.com/uploads/designer_types/thumb.jpg" width="200" /&gt;&lt;/a&gt;&lt;br /&gt;
Design is a universal language. It transcends all cultural and national boundaries. It is diverse and ever-changing. Despite the fact that designs can be universally appreciated, the artists behind them are all unique and talented individuals.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What kind of designer are you?&lt;/b&gt; What is your philosophy? How do you contribute to the design community? Designers from different walks of life might have similar answers to these questions, and yet we are all different.&lt;br /&gt;
&lt;br /&gt;
Some designers take it upon themselves to educate those who have not yet developed an appreciation for Web design and art. Some designers aim to improve the overall quality of design on the Internet.&lt;br /&gt;
&lt;br /&gt;
And of course, some designers strive primarily to make a good living from their talents so that they can live a comfortable life.&lt;br /&gt;
&lt;br /&gt;
Whatever your reason for being a designer, you are unique.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;&lt;b&gt;If you want to be a well-paid designer, please the client.&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;If you want to be an award-winning designer, please yourself.&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;If you want to be a great designer, please the audience.&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h1&gt;Spotting the 7 Different Designers&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/marthita/3802140657/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/designer_types/type.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Human beings constantly wear masks to hide their true feelings, thoughts and personality quirks. Designers wear masks of their own: one to attend to clients, another to handle a project’s details, another to collaborate with colleagues and yet another to communicate with family and friends. Human nature is to wear a different mask according to the role one is playing.&lt;br /&gt;
&lt;br /&gt;
Despite these masks, our true personality still shines through. &lt;b&gt;There are seven different personality types of designers&lt;/b&gt;. Which one best describes you?&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;1. The Pablo Picasso Designer&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/medinad/4056879296/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/designer_types/picasso.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
A perfectionist, the Pablo Picasso designer does not stand for any pixel to be out of place or unsightly. Egotistical, he does not care about other people’s opinions, and he belittles them for their ignorance and lack of appreciation of design and the arts.&lt;br /&gt;
&lt;br /&gt;
Principled, the Pablo Picasso designer has a strong mind and set beliefs that cannot be swayed by any amount of money. His only concern is for the ingenuity of ideas.&lt;br /&gt;
&lt;br /&gt;
A man out to change the world of design, he does not succumb to the whims of clients, and he believes it is their loss if they do not heed his advice. Believing he is a cut above the rest, he admits to only a few other designers in the world being his peers. The Pablo Picasso designer sees himself, above all else, as an artist.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;2. The Albert Einstein Designer&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/amphibian06/4081548179/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/designer_types/albert.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
A smart man with an excellent work ethic, the Albert Einstein designer has the motto “No pain, no gain.” Unafraid of ridicule, he dares to be different.&lt;br /&gt;
&lt;br /&gt;
If at first you don’t succeed, try, try and try again. Failure is the mother of all success, and the Albert Einstein designer has a never-give-up attitude that pushes him to continually reach his goals despite countless failures.&lt;br /&gt;
&lt;br /&gt;
The Albert Einstein designer continues to create his own designs, putting them to the test in various design competitions. He may not get it right each time or win every competition, but he believes his hard work will eventually pay off and that he will be recognized for his talents and effort.&lt;br /&gt;
&lt;br /&gt;
His strong faith and his belief in himself enable him to patiently wait for the day when he is praised for his contributions. To him, the question is not &lt;i&gt;if&lt;/i&gt; he will be successful, but rather when will he attain his goals and be successful.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;3. The David Copperfield Designer&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/nicolekiss/2148783567/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/designer_types/copperfield.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The David Copperfield designer is a great storyteller and illusionist. Capable of anything, regardless of how seemingly impossible it is, he conjures the best designs for his clients.&lt;br /&gt;
&lt;br /&gt;
Convincing his clients to hire him and only him to do everything is a simple task. Given everything he delivers to clients, he does not come cheap. After all, he gives them everything they want, which amounts to a cleverly constructed illusion. Using his great storytelling skills, he leads clients to believe that he is the only person they need to achieve their goals.&lt;br /&gt;
&lt;br /&gt;
Behind the scenes, the David Copperfield designer orchestrates his illusions down to the second. Appearances can be misleading; outsourcing his tasks, he packages the result as his own work.&lt;br /&gt;
&lt;br /&gt;
The client doesn’t realize who are the hard-working talents who support him. He manages the project and delegates work to others but claims credit in the end.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;4. The Captain Hook Designer&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/pelicanpetesphotos/4409747318/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/designer_types/hook.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Why create when you can steal? The Captain Hook designer is cunning and sly. He scouts for the most innovative and successful designs and makes them his own—not by blatantly duplicating, mind you, but by cleverly working in his own ideas and inspiration.&lt;br /&gt;
&lt;br /&gt;
Craftily avoiding outright plagiarism, the Captain Hook designer mashes up several successful ideas to create a fresh “new” concept.&lt;br /&gt;
&lt;br /&gt;
Money being his sole interest, the Captain Hook designer tries to squeeze as much as he can out of his designs. By making small, simple changes to the color, font and layout, he passes off designs as new creations.&lt;br /&gt;
&lt;br /&gt;
Unfazed by whether he loses some clients, he simply finds new ones who are unaware of his tricks. His lives by the pirate code that dictates, &lt;i&gt;“A good designer copies, but a great designer steals.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;5. The Mahatma Gandhi Designer&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/pickinpics/2511745041/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/designer_types/gandhi.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Believing he is obliged to right wrongs, the Mahatma Gandhi designer takes it upon himself to effect change through peaceful means. He feels an obligation to improve Web design standards, regardless of any difficulties or opposition he might face. If he has to achieve his goal one client at a time, he will gladly do so.&lt;br /&gt;
&lt;br /&gt;
Sharing his design philosophy with whomever will listen, the Mahatma Gandhi designer tries to persuade others—designers, clients and the general public alike—to help him make the design industry a better place.&lt;br /&gt;
&lt;br /&gt;
A forward-thinking man who sets trends, he advocates for what he believes is necessary to improve and sustain the design industry. Willing to sacrifice himself for the benefit of other designers, the Mahatma Gandhi designer does whatever he can to improve the world of design through peaceful and lasting change.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;6. The Bashful Dwarf Designer&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/43153185@N00/3732943567//"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/designer_types/drawfs.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Shunning the spotlight, the Bashful Dwarf designer always feels like he could have done a better job. When praised, he is quick to share the credit with colleagues. Insecure about his talents, he is content to work behind the scenes and let others take the honor.&lt;br /&gt;
&lt;br /&gt;
The Bashful Dwarf designer doesn’t think much of fame or fortune, and he prefers not to show his name or face. Lack of confidence is the cause: he believes many other designers out there deserve more recognition.&lt;br /&gt;
&lt;br /&gt;
As long as he makes enough money to put a roof over his head and not go hungry, he remains content with his lot in life.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;7. The Ella of Frell Designer&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/moon_photograpy/4353780006/in/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/designer_types/ella.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The real Ella of Frell fell under a spell and couldn’t say no to anyone. Slightly different, the Ella of Frell designer actually has a choice and does not have to do everything she is told.&lt;br /&gt;
&lt;br /&gt;
Instead, she chooses not to decline her clients’ every wish. Believing the customer is always right, she goes out of her way to please clients. Clients never find fault with her because she is ever willing to make whatever changes they ask for. “No” is not in her vocabulary.&lt;br /&gt;
&lt;br /&gt;
Often ignoring her better judgment, the Ella of Frell designer subjugates her design sense to the clients’ will in order to avoid displeasing them. She is at the client’s beck and call, night and day.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;We Are All Different&lt;/h1&gt;&lt;br /&gt;
Each designer has their own personality type. Whatever yours is, the important thing is to be true to yourself and honorable. Any one of the seven types covered here could be an extreme version of you. or you may see a little of yourself in each.&lt;br /&gt;
&lt;br /&gt;
The only constant is change, and perhaps we have all been more than one of these seven at different times in our lives. We are, after all, always growing and hopefully wiser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Written exclusively for Webdesigner Depot by Aidan Huang, a freelance developer and designer. He is also an editor at &lt;a href="http://www.onextrapixel.com/" title="Onextrapixel"&gt;Onextrapixel&lt;/a&gt;.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Do you see yourself in any one of these personality types? Which best describes you? Share your thoughts on any Picassos, Einsteins, Hooks, Bashfuls, Copperfields, Gandhis and Ellas you may have encountered in this competitive industry.&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: X7Lk2h&lt;br /&gt;
&lt;br /&gt;
&lt;img height="1" src="http://feeds.feedburner.com/%7Er/webdesignerdepot/%7E4/rm5iAQCa1Ks" width="1" /&gt;"</description><link>http://dotnetadda.blogspot.com/2010/07/7-personality-types-of-designers-today.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-8121243385193464836</guid><pubDate>Thu, 15 Jul 2010 05:22:00 +0000</pubDate><atom:updated>2010-07-15T10:52:10.491+05:30</atom:updated><title>7 Personality Types of Clients Today</title><description>&lt;a href="http://www.webdesignerdepot.com/2010/07/7-personality-types-of-clients-today/"&gt;7 Personality Types of Clients Today&lt;/a&gt;: " from &lt;span id="chrome-title"&gt;&lt;/span&gt;&lt;a href="http://www.webdesignerdepot.com/" target="_blank"&gt;Webdesigner Depot&lt;/a&gt;&lt;br /&gt;
&lt;img alt="" height="160" src="http://netdna.webdesignerdepot.com/uploads/clients_type/client.jpg" width="200" /&gt;&lt;br /&gt;
In previous articles, we discussed &lt;a href="http://www.webdesignerdepot.com/2010/05/7-personality-types-of-designers-today/" title="7 Types of Designers Today"&gt;seven types of designers&lt;/a&gt; and &lt;a href="http://www.webdesignerdepot.com/2010/05/7-personality-types-of-developers-today/" title="7 Types of Developers Today"&gt;seven types of developers&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Designers and developers form two parts of the design trinity: the  client completes it. You can have the technology to build something and  the design to make it magnificent, but if someone doesn’t fund the  project, it usually falls flat.&lt;br /&gt;
&lt;br /&gt;
No one has the time to do such a thing  for fun. Designers and developers need clients to build their portfolio,  sustain their lifestyle and grow and learn.&lt;br /&gt;
&lt;br /&gt;
Not all clients are difficult, so we’ll try not to stereotype. But in  all honesty, the perfect client needs no introduction or description.  The perfect client is rare, though not extinct.&lt;br /&gt;
&lt;br /&gt;
Today’s article focuses  on seven types of clients who aren’t so perfect. You can decide for  yourself which of them are the lesser evils.&lt;br /&gt;
&lt;br /&gt;
Common comments from clients:&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;“I want this done as well and as cheaply as possible.”&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;“This should be easy to do right.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;“I know of others who would do it for free, so please hurry up.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;“Don’t freelancers work for free?”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;“I need a professional-looking and functional website, but I can only  pay you when I start earning from it.”&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;Spotting the 7 Types of Clients&lt;/h1&gt;&lt;br /&gt;
You have probably encountered all kinds of clients in your time. You  may have worked with clients from hell, and you may have been lucky to  work with amiable and respectful clients.&lt;br /&gt;
&lt;br /&gt;
We need clients to sustain our business and to build our portfolio  and reputation. Sometimes we have the luxury of choosing which projects  to take on and which clients to work with.&lt;br /&gt;
&lt;br /&gt;
So, who are these seven?&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;1. The Word-Breaker&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/diesmali/1378900140/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/clients_type/wordbreaker.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
“Promises are made to be broken,” says the word-breaker.  Word-breaking clients remind us just how important it is to write a  contract prior to commencing a project. Sometimes, though, even legal  contracts do not prevent these clients from breaking their word. The  word-breaker is dishonorable and can side-step the agreements in a  contract. He expects you to honor your end but has no intention of  fulfilling his own commitments.&lt;br /&gt;
&lt;br /&gt;
The word-breaker is glib and charming, and he manipulates people into  doing his bidding. He is always right in his own eyes and works hard to  keep the upper hand. Be careful when dealing with the word-breaker  because when something goes wrong, you will be the target in his firing  range, and he will not hesitate to shoot you dead.&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “I’m the client! You can’t &lt;/i&gt;&lt;i&gt;make me  agree to your schedule!”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; “But it’s in the contract you signed.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “That was a month ago—this is now!”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; “You’ve changed your mind? Well, I could  walk you through the creation process and explain why the schedule and  the fee are as they are.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “I don’t care. I’m the client.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt;&lt;h1&gt;2. The Garbage Collector&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/mytwofeet/4646783363/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/clients_type/rubbishcollector.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Less is &lt;i&gt;not&lt;/i&gt; more—at least, not in the world of the garbage  collector. As freelancers, we always hope that our clients have an idea  of what they want, but the garbage collector goes to the extreme; prior  to approaching you with his project, he has done plenty of research and  assembled all of the designs that he likes.&lt;br /&gt;
&lt;br /&gt;
This kind of person goes to a buffet and puts a little of everything  on his plate. The garbage collector gathers all of the effects,  functions and designs that have caught his eye and will insist that you  include them in his project. The concept of usability is lost on him,  even though you repeatedly try to explain it. It’s his way or the  highway.&lt;br /&gt;
&lt;br /&gt;
This type of client wants a construction worker, not a designer. “Do  or do not; there is no try,” insists the garbage collector.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “I hear a lot of new web technology has come  out since we last spoke. Can you put all of it in our website?”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; “Err, you’re won’t need all of it, and  more features will cost you more.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “Then add $10 to the total cost. I’ll also  need you to help me fill in the content, write a couple of articles and  set up a marketing campaign for this.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt;&lt;h1&gt;3. The Clueless Child&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/sparth/3983563414/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/clients_type/cluelesschild.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
On the opposite end of the spectrum is the clueless child. Like a  child with a short attention span, he is indecisive and ignorant.  Working with the clueless child might not seem so bad at the beginning;  he is agreeable and relies on your expertise. Problems arise after your  initial agreement on the details of the project—when he starts to change  his mind.&lt;br /&gt;
&lt;br /&gt;
His interest was piqued by the details of the project, and now the  clueless child is not so ignorant. Perhaps he has been hit by a sudden  epiphany or has received feedback from friends, co-workers or other  experts. He calls you in the middle of the night—whenever inspiration  strikes—to tell you that he wants certain changes made.&lt;br /&gt;
&lt;br /&gt;
It doesn’t end there. You make the changes he wants, and when he  comes to view the project he brings his mother along. She then suggests  more changes. After all, “Mom knows best.”&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “We want something that looks professional.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; “Okay.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Client&lt;/b&gt; (three hours later, after you have sent  proofs): “Get rid of that image and add this instead.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; “Okay.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “The blue isn’t right.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; “What Pantone color are we trying to  match?”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “Oh, you know—the color of the Miami sky at  daybreak.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt;&lt;h1&gt;4. The Queen of Hearts&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/johnnydeppnews/3756397221/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/clients_type/queen.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Be prepared to be at the beck and call of the queen of hearts. A  royal decree must always be obeyed, and the queen is of the opinion that  you are blessed to be showered by her favor. She has no concept of  weekends, public holidays or time itself. A summons in the middle of the  night is a common occurrence.&lt;br /&gt;
&lt;br /&gt;
Your loyalty is expected, your respect demanded. The queen of hearts  wants you to fix all her problems, and she wants it done yesterday. She  wants you to be a designer, developer, technician, networker, anti-virus  expert, plumber and even nanny. Her wish is your command. And don’t  expect to be paid extra—for she is your queen; obedience is your  privilege.&lt;br /&gt;
&lt;br /&gt;
Just learn to say, “Yes, your majesty.” And learn it fast or it’s  “Off with his head!”&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;&lt;b&gt;Client&lt;/b&gt; (calling at five minutes to midnight): “It’s  not too late, is it? I Googled my name, and there is some nasty stuff  about me on the Internet. This guy saying on his blog that I am an  idiot. I want you to remove that blog and block the Internet if they  keep writing crap about me.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; “I can’t do that.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “Well, get someone else to do it then. I  want all nasty stuff about me removed from the Internet today. And make  sure no one can write bad things about me again. I want you to control  the Internet.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; “I can’t control it, and neither can  you.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “Well, if you won’t do it, then I’ll find  someone who will.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; “Good luck. Let me know how that goes.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt;&lt;h1&gt;5. The Smart Aleck&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/001fj/3045447097/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/clients_type/smartalec.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The smart aleck thinks he knows it all. This client probably has an  interest in design and has read a couple of books about it. He sticks  his nose in the air and looks down at you from his pedestal. The smart  aleck feels compelled to interfere because he wants his “expert views”  to be taken into consideration.&lt;br /&gt;
&lt;br /&gt;
The truth is: the smart aleck knows very little about design. He is  arrogant, shows blatant disrespect and doesn’t think it beneath him to  order you around and insist that his ideas are better than yours. He  tells you everything without really saying anything. He has particular  ideas about what he wants but never communicates them explicitly. “It’s  so easy even a monkey could do it,” he claims.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “I’ve studied design, so basically I know  what I want.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; “Sure. What do you want exactly?”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “You’re the designer. You come up with the  idea—but it better match mine.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; (in astonished silence).&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt;&lt;h1&gt;6. The Nitpicker&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/andreas_franke/2570668483/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/clients_type/nitpicker.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The nitpicker might seem a tad meticulous during the negotiation  phase, but he appears normal on the whole. When you start production and  show him your progress, though, you’ll see this client’s true colors.&lt;br /&gt;
&lt;br /&gt;
“Hold it right there! I’ve got a bone to pick with you,” says the  nitpicker. There is always something wrong with what you’ve done: the  color is not what he envisioned, the border is a few pixels too wide,  the images are not as exciting as he expected.&lt;br /&gt;
&lt;br /&gt;
The nitpicker scrutinizes your work and never fails to find fault  with it. His grip on the project is tighter than a noose. One could call  him a perfectionist, but the truth is he’s just trying to get his  money’s worth by ensuring that you work doubly hard for the money that  you will wrench from his cold unwilling hands.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “The site looks great, but I need you to do  it again.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; “Um, okay. What for?”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “You know! You made the website on a Mac, so  you need to make another one on a PC for people who don’t use fancy  computers like you.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;h1&gt;7. The Scrooge&lt;/h1&gt;&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/cpingel/3722353132/"&gt;&lt;img alt="" src="http://netdna.webdesignerdepot.com/uploads/clients_type/scrooge.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The scrooge wants everything for nothing. Discounts, freebies and  sales make him happy. Even if he doesn’t need it, he wants to get his  hands on a free item “just in case.” Like &lt;a href="http://en.wikipedia.org/wiki/Ebenezer_Scrooge" title="Ebenezer  Scrooge"&gt;his namesake&lt;/a&gt;, this client is a money-pincher who gives you  all kinds of trouble on payday.&lt;br /&gt;
&lt;br /&gt;
Even prior to payday, expect plenty of issues with payment. And  expect to battle for months with the scrooge over final payment for the  project—you can certainly expect him to want the agreed-upon amount to  be heavily discounted. The scrooge is the ideal person to bring to a  bargaining market, but pray he is on your side and not the other.&lt;br /&gt;
&lt;br /&gt;
When the project is completed and it’s time for the scrooge to cough  up, you’re in for a surprise. He is not afraid to renege on your fees,  and he insists on further discounts, despite your unwillingness. In his  attempt to save money and reduce costs, he suggests a barter system or  offers a monetary equivalent from his belongings. Expect the unexpected.  Once you’ve been paid and are nearly out of earshot, the scrooge  inevitably murmurs, “Bah, humbug!”&lt;br /&gt;
&lt;br /&gt;
The war isn’t over either. Your dealings with the scrooge could be  lifelong. He expects you to fix everything that crops up with his  website, so don’t be surprised if the scope of your job expands over  time.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; “Here’s the invoice for $400.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “Okay, thanks.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Three days pass.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; “I think you made a mistake. You paid  only $300.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “No, I gave myself a discount.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Freelancer:&lt;/b&gt; “I never agreed to a discount.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Client:&lt;/b&gt; “Well, we won’t be using the design anyway.”&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt;&lt;h1&gt;Clients: Devil Incarnate?&lt;/h1&gt;&lt;br /&gt;
Are all clients mean and pushy? Have you encountered clients who  break the above stereotypes and are real gems? If you have, then you’re a  lucky one.&lt;br /&gt;
&lt;br /&gt;
Every client has a different level of knowledge of design and  development. They also have different expectations. Not every client  will appreciate your attempts to educate them on web design. Some will  take the designer or developer for granted and try to bully them.&lt;br /&gt;
&lt;br /&gt;
Still, blaming the clients entirely is not fair. They have been  coddled and spoiled by designers and developers who condoned their  methods and encouraged their outrageous behavior. If we want our  industry to be fair and just, everyone has to do their part to prevent  bullying. We are all responsible for the atmosphere of the industry.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Note: some quotations were extracted from the website &lt;a href="http://clientsfromhell.net/" title="Clients from Hell"&gt;Clients  From Hell&lt;/a&gt;. Thumbnail image courtesy of &lt;a href="http://www.flickr.com/photos/aucoindujour/4084273896/in/set-72157622497355409/" rel="nofollow"&gt;Sébastien Roignant&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Written exclusively for Webdesigner Depot by Aidan Huang, a  freelance developer and designer. He is also an editor at &lt;a href="http://www.onextrapixel.com/" title="Onextrapixel"&gt;Onextrapixel&lt;/a&gt; and is the owner of &lt;a href="http://www.inspiremonkey.com/" title="InspireMonkey"&gt;InspireMonkey&lt;/a&gt;, a creative blog.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Of the clients mentioned above, &lt;b&gt;which do you detest the most?&lt;/b&gt; If  you have a horror story of your own, feel free to vent in the  comments  section below. We are happy to hear about your client woes.&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: H0Oa9C&lt;br /&gt;
&lt;br /&gt;
&lt;img height="1" src="http://feeds.feedburner.com/%7Er/webdesignerdepot/%7E4/bqDMdq24aok" width="1" /&gt;"</description><link>http://dotnetadda.blogspot.com/2010/07/7-personality-types-of-clients-today.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-837248327540291979</guid><pubDate>Fri, 25 Jun 2010 10:51:00 +0000</pubDate><atom:updated>2010-06-25T16:22:56.285+05:30</atom:updated><title>Save and Display YouTube Videos on ASP.NET Website</title><description>&lt;a href="http://weblogs.asp.net/hajan/archive/2010/06/21/save-and-display-youtube-video-links-on-asp-net-website.aspx"&gt;Save and Display YouTube Videos on ASP.NET Website&lt;/a&gt;: " &lt;span class="entry-author-parent"&gt;by &lt;span class="entry-author-name"&gt;hajan ASP.Net Weblogs&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
About two months ago, a member in the asp.net forums asked a question&lt;br /&gt;
regarding similar issue. For this purpose, I have prepared short article that&lt;br /&gt;
shows how you can achieve this using ASP.NET Repeater (or similar) control, a&lt;br /&gt;
database table with three columns and few code-lines to make this work.&lt;br /&gt;
&lt;br /&gt;
As we already know, YouTube shares the HTML &amp;lt;object /&amp;gt; which can be&lt;br /&gt;
embedded in any web site by simple copy/paste of the html for each video&lt;br /&gt;
file.&lt;br /&gt;
&lt;br /&gt;
A sample example of the html for embedding YouTube video is as follows&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #f4f4f4; border: 1px solid silver; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding: 4px; text-align: left; width: 97.5%;"&gt;&lt;br /&gt;
&lt;div style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;object&lt;/span&gt; &lt;span style="color: red;"&gt;width&lt;/span&gt;&lt;span style="color: blue;"&gt;='640'&lt;/span&gt; &lt;span style="color: red;"&gt;height&lt;/span&gt;&lt;span style="color: blue;"&gt;='385'&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: #606060;"&gt;   2:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;param&lt;/span&gt; &lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;='movie'&lt;/span&gt; &lt;span style="color: red;"&gt;value&lt;/span&gt;&lt;span style="color: blue;"&gt;="http://www.youtube.com/v/jpiU5Y8luOQ&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;param&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: #606060;"&gt;   3:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;param&lt;/span&gt; &lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;='allowFullScreen'&lt;/span&gt; &lt;span style="color: red;"&gt;value&lt;/span&gt;&lt;span style="color: blue;"&gt;='true'&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;param&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: #606060;"&gt;   4:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;param&lt;/span&gt; &lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;='allowscriptaccess'&lt;/span&gt; &lt;span style="color: red;"&gt;value&lt;/span&gt;&lt;span style="color: blue;"&gt;='always'&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;param&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: #606060;"&gt;   5:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;embed&lt;/span&gt; &lt;span style="color: red;"&gt;src&lt;/span&gt;&lt;span style="color: blue;"&gt;="http://www.youtube.com/v/jpiU5Y8luOQ&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: #606060;"&gt;   6:&lt;/span&gt;        &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;='application/x-shockwave-flash'&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: #606060;"&gt;   7:&lt;/span&gt;        &lt;span style="color: red;"&gt;allowscriptaccess&lt;/span&gt;&lt;span style="color: blue;"&gt;='always'&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: #606060;"&gt;   8:&lt;/span&gt;        &lt;span style="color: red;"&gt;allowfullscreen&lt;/span&gt;&lt;span style="color: blue;"&gt;='true'&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: #606060;"&gt;   9:&lt;/span&gt;        &lt;span style="color: red;"&gt;width&lt;/span&gt;&lt;span style="color: blue;"&gt;='640'&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: #606060;"&gt;  10:&lt;/span&gt;        &lt;span style="color: red;"&gt;height&lt;/span&gt;&lt;span style="color: blue;"&gt;='385'&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: #606060;"&gt;  11:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;embed&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: #606060;"&gt;  12:&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;object&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
There are three standard &amp;lt;params&amp;gt; and the embed tag which is important&lt;br /&gt;
to make this work properly. Anyway, you should not concern much about this&lt;br /&gt;
because you will use a standard format of this HTML object example that will be&lt;br /&gt;
generated automatically in your website. You should pay attention a bit more on&lt;br /&gt;
the format of the YouTube URL link, which is as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;http://www.youtube.com/v/&amp;lt;video-file-id&amp;gt;&amp;amp;hl=en_US&amp;amp;fs=1&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;b&gt;hl&lt;/b&gt; is the &lt;b&gt;hosted language&lt;/b&gt; and&lt;br /&gt;
&lt;b&gt;fs&lt;/b&gt; if is &lt;b&gt;1&lt;/b&gt; will allow the full screen button&lt;br /&gt;
to shows up, 0 will disallow.&lt;br /&gt;
&lt;br /&gt;
We can leave the &lt;b&gt;hl&lt;/b&gt; and &lt;b&gt;fs&lt;/b&gt; query string&lt;br /&gt;
parameters by default. The only part in the url string we should care about is&lt;br /&gt;
the &lt;b&gt;&amp;lt;video-file-id&amp;gt;&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Someone would ask, why paying attention to the ID of the video, when user can&lt;br /&gt;
simply paste the link in a ASP.NET text box and just display it as it is. Well,&lt;br /&gt;
the problem is that user can enter url while he/she was searching in related&lt;br /&gt;
items or even in different cases when the youtube link does not have the same&lt;br /&gt;
format, which cannot be embedded as it is, so we need to get the video id and&lt;br /&gt;
put it in a url link with standard format. Usually, the URLs instead of showing&lt;br /&gt;
/v/&amp;lt;video-id&amp;gt;, these are shown as v=&amp;lt;video-id&amp;gt; which does not show&lt;br /&gt;
correctly the video link when embedded to the html object shown previously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Let’s start with the ASP.NET part.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
First of all, drag and drop ASP.NET Repeater control from the Data Controls.&lt;br /&gt;
Also you will need SqlDataSource, but of course, you may use any other data&lt;br /&gt;
sources or even bind the data control even programmatically in code-behind.&lt;br /&gt;
&lt;br /&gt;
Here is the sample ASPX code I have created so far:&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;html &lt;/span&gt;&lt;span style="color: red;"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue;"&gt;="http://www.w3.org/1999/xhtml" &amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;head &lt;/span&gt;&lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;='Head1' &lt;/span&gt;&lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;title&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;title&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;head&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;body&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&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;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: #a31515;"&gt;TextBox &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;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;='server' &lt;/span&gt;&lt;span style="color: red;"&gt;Width&lt;/span&gt;&lt;span style="color: blue;"&gt;="461px"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: #a31515;"&gt;TextBox&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Button &lt;/span&gt;&lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;='btnAddLink'
&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;Text&lt;/span&gt;&lt;span style="color: blue;"&gt;='Add Link' &lt;/span&gt;&lt;span style="color: red;"&gt;onclick&lt;/span&gt;&lt;span style="color: blue;"&gt;="btnAddLink_Click" /&amp;gt;           
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Repeater &lt;/span&gt;&lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;='Repeater1' &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;DataSourceID&lt;/span&gt;&lt;span style="color: blue;"&gt;="SqlDataSource1"&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;ItemTemplate&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;object &lt;/span&gt;&lt;span style="color: red;"&gt;width&lt;/span&gt;&lt;span style="color: blue;"&gt;='480' &lt;/span&gt;&lt;span style="color: red;"&gt;height&lt;/span&gt;&lt;span style="color: blue;"&gt;="385"&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;param &lt;/span&gt;&lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;='movie'&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;value&lt;/span&gt;&lt;span style="color: blue;"&gt;='&lt;/span&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(255, 238, 98);"&gt;&amp;lt;%&lt;/span&gt;#DataBinder.Eval(Container.DataItem, 'url') &lt;span style="background: none repeat scroll 0% 0% rgb(255, 238, 98);"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;'&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;param&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;param &lt;/span&gt;&lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;='allowFullScreen' &lt;/span&gt;&lt;span style="color: red;"&gt;value&lt;/span&gt;&lt;span style="color: blue;"&gt;="true"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;param&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;param &lt;/span&gt;&lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;='allowscriptaccess' &lt;/span&gt;&lt;span style="color: red;"&gt;value&lt;/span&gt;&lt;span style="color: blue;"&gt;="always"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;param&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;embed &lt;/span&gt;&lt;span style="color: red;"&gt;src&lt;/span&gt;&lt;span style="color: blue;"&gt;='&lt;/span&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(255, 238, 98);"&gt;&amp;lt;%&lt;/span&gt;#DataBinder.Eval(Container.DataItem, 'url') &lt;span style="background: none repeat scroll 0% 0% rgb(255, 238, 98);"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;' &lt;/span&gt;&lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;='application/x-shockwave-flash'&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: red;"&gt;allowscriptaccess&lt;/span&gt;&lt;span style="color: blue;"&gt;='always' &lt;/span&gt;&lt;span style="color: red;"&gt;allowfullscreen&lt;/span&gt;&lt;span style="color: blue;"&gt;='true' &lt;/span&gt;&lt;span style="color: red;"&gt;width&lt;/span&gt;&lt;span style="color: blue;"&gt;='480' &lt;/span&gt;&lt;span style="color: red;"&gt;height&lt;/span&gt;&lt;span style="color: blue;"&gt;="385"&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;embed&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;object&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;br &lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;   
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;ItemTemplate&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Repeater&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: #a31515;"&gt;SqlDataSource &lt;/span&gt;&lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;='SqlDataSource1' &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;ConnectionString&lt;/span&gt;&lt;span style="color: blue;"&gt;='&lt;/span&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(255, 238, 98);"&gt;&amp;lt;%&lt;/span&gt;$ ConnectionStrings:MySampleDBConnectionString &lt;span style="background: none repeat scroll 0% 0% rgb(255, 238, 98);"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;'
&lt;/span&gt;&lt;span style="color: red;"&gt;SelectCommand&lt;/span&gt;&lt;span style="color: blue;"&gt;="SELECT [url], [description], [id] FROM [YouTubeVideos]"&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: #a31515;"&gt;SqlDataSource&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;form&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;body&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;html&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Short explanation:&lt;br /&gt;
&lt;br /&gt;
1. I have created one TextBox which will be used to enter the YouTube URL&lt;br /&gt;
link (in any format which comes from the YouTube video service)&lt;br /&gt;
2. Button&lt;br /&gt;
which will be used for inserting the link into database.&lt;br /&gt;
3. There is&lt;br /&gt;
Repeater control with ItemTemplate containing the HTML tags for embedding the&lt;br /&gt;
video with &amp;lt;%# DataBinder.Eval(Container.DataItem, “url”) %&amp;gt; which will&lt;br /&gt;
contain the URL tag retrieved from database.&lt;br /&gt;
4. SqlDataSource with&lt;br /&gt;
ConnectionString pointing to MS SQL Server database where connection string is&lt;br /&gt;
in the Web.config file. You can create new connection string using the&lt;br /&gt;
SqlDataSource Wizards or by typing it manually (if you are experienced to do&lt;br /&gt;
that so).&lt;br /&gt;
&lt;br /&gt;
If you have noticed in the SqlDataSource, there is a SelectCommand which&lt;br /&gt;
selects three columns ([url], [description] and [id]) from table with name&lt;br /&gt;
[YouTubeVideos]. Here is the SQL Script to create the sample database table&lt;br /&gt;
which I am using in this article:&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;CREATE TABLE &lt;/span&gt;YouTubeVideos &lt;span style="color: green;"&gt;--creates table where we will save YouTube Videos
&lt;/span&gt;&lt;span style="color: grey;"&gt;(
&lt;/span&gt;id &lt;span style="color: blue;"&gt;int &lt;/span&gt;&lt;span style="color: grey;"&gt;not null &lt;/span&gt;&lt;span style="color: blue;"&gt;primary key identity&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;1&lt;span style="color: grey;"&gt;,&lt;/span&gt;1&lt;span style="color: grey;"&gt;),
&lt;/span&gt;url &lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;1000&lt;span style="color: grey;"&gt;) not null,
&lt;/span&gt;[description] &lt;span style="color: blue;"&gt;text
&lt;/span&gt;&lt;span style="color: grey;"&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;The last thing, which we always leave it for the end, is the C#.NET /&lt;br /&gt;
VB.NET code.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;&lt;br /&gt;
Here we have the code behind the Add Link Button click event, method to&lt;br /&gt;
extract the ID of the video using Regular Expression and method to check for&lt;br /&gt;
Duplicate videos in DB.&lt;br /&gt;
&lt;br /&gt;
First, do not forget to add the following directives&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;using &lt;/span&gt;System.Data;
&lt;span style="color: blue;"&gt;using &lt;/span&gt;System.Data.SqlClient;
&lt;span style="color: blue;"&gt;using &lt;/span&gt;System.Configuration;
&lt;span style="color: blue;"&gt;using &lt;/span&gt;System.Text.RegularExpressions;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
- Function to get the YouTube Video ID&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;private string &lt;/span&gt;GetYouTubeID(&lt;span style="color: blue;"&gt;string &lt;/span&gt;youTubeUrl)
{
&lt;span style="color: green;"&gt;//RegEx to Find YouTube ID
&lt;/span&gt;&lt;span style="color: #2b91af;"&gt;Match &lt;/span&gt;regexMatch = &lt;span style="color: #2b91af;"&gt;Regex&lt;/span&gt;.Match(youTubeUrl, &lt;span style="color: #a31515;"&gt;'^[^v]+v=(.{11}).*'&lt;/span&gt;,
&lt;span style="color: #2b91af;"&gt;RegexOptions&lt;/span&gt;.IgnoreCase);
&lt;span style="color: blue;"&gt;if &lt;/span&gt;(regexMatch.Success)
{
&lt;span style="color: blue;"&gt;return &lt;/span&gt;&lt;span style="color: #a31515;"&gt;'http://www.youtube.com/v/' &lt;/span&gt;+ regexMatch.Groups[1].Value +
&lt;span style="color: #a31515;"&gt;"&amp;amp;hl=en&amp;amp;fs=1"&lt;/span&gt;;
}
&lt;span style="color: blue;"&gt;return &lt;/span&gt;youTubeUrl;
}&lt;/pre&gt;&lt;br /&gt;
I have found this method on the following website: &lt;a href="http://www.diaryofaninja.com/blog/2009/09/14/regular-expression-to-find-the-youtube-video-id-from-a-string" title=""&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The code behind the Add Link button click event is as follows:&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;protected void &lt;/span&gt;btnAddLink_Click(&lt;span style="color: blue;"&gt;object &lt;/span&gt;sender, &lt;span style="color: #2b91af;"&gt;EventArgs &lt;/span&gt;e)
{
&lt;span style="color: #2b91af;"&gt;SqlConnection &lt;/span&gt;con = &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af;"&gt;SqlConnection&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;ConfigurationManager&lt;/span&gt;.ConnectionStrings[&lt;span style="color: #a31515;"&gt;'MySampleDBConnectionString'&lt;/span&gt;].ToString());
&lt;span style="color: blue;"&gt;string &lt;/span&gt;url = TextBox1.Text;
&lt;span style="color: blue;"&gt;if &lt;/span&gt;(url.Contains(&lt;span style="color: #a31515;"&gt;'youtube.com'&lt;/span&gt;))
{
&lt;span style="color: blue;"&gt;string &lt;/span&gt;ytFormattedUrl = GetYouTubeID(url);

&lt;span style="color: blue;"&gt;if &lt;/span&gt;(!CheckDuplicate(ytFormattedUrl))
{
&lt;span style="color: #2b91af;"&gt;SqlCommand &lt;/span&gt;cmd = &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af;"&gt;SqlCommand&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;'INSERT INTO YouTubeVideos ([url]) VALUES ('' &lt;/span&gt;+ ytFormattedUrl + &lt;span style="color: #a31515;"&gt;'')'&lt;/span&gt;, con);
&lt;span style="color: blue;"&gt;using &lt;/span&gt;(con)
{
con.Open();
&lt;span style="color: blue;"&gt;int &lt;/span&gt;result = cmd.ExecuteNonQuery();
&lt;span style="color: blue;"&gt;if &lt;/span&gt;(result != -1)
{
Repeater1.DataBind();
}
&lt;span style="color: blue;"&gt;else &lt;/span&gt;{ Response.Write(&lt;span style="color: #a31515;"&gt;'Error inserting new url!'&lt;/span&gt;); }
}
}
&lt;span style="color: blue;"&gt;else &lt;/span&gt;{ Response.Write(&lt;span style="color: #a31515;"&gt;'This video already exists in our database!'&lt;/span&gt;); }
}
&lt;span style="color: blue;"&gt;else
&lt;/span&gt;{
Response.Write(&lt;span style="color: #a31515;"&gt;'This URL is not a valid YOUTUBE video link because it does not contain youtube.com in it'&lt;/span&gt;);
}
}&lt;/pre&gt;&lt;br /&gt;
and at end, I have created method to check whether the video exists or&lt;br /&gt;
not&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;public bool &lt;/span&gt;CheckDuplicate(&lt;span style="color: blue;"&gt;string &lt;/span&gt;youTubeUrl)
{
&lt;span style="color: blue;"&gt;bool &lt;/span&gt;exists = &lt;span style="color: blue;"&gt;false&lt;/span&gt;;
&lt;span style="color: #2b91af;"&gt;SqlConnection &lt;/span&gt;con = &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af;"&gt;SqlConnection&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;ConfigurationManager&lt;/span&gt;.ConnectionStrings[&lt;span style="color: #a31515;"&gt;'MySampleDBConnectionString'&lt;/span&gt;].ToString());           
&lt;span style="color: #2b91af;"&gt;SqlCommand &lt;/span&gt;cmd = &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af;"&gt;SqlCommand&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;String&lt;/span&gt;.Format(&lt;span style="color: #a31515;"&gt;'select * from YouTubeVideos where url='{0}''&lt;/span&gt;,youTubeUrl), con);

&lt;span style="color: blue;"&gt;using &lt;/span&gt;(con)
{
con.Open();
&lt;span style="color: #2b91af;"&gt;SqlDataReader &lt;/span&gt;dr = cmd.ExecuteReader();
dr.Read();
exists = (dr.HasRows) ? &lt;span style="color: blue;"&gt;true &lt;/span&gt;: &lt;span style="color: blue;"&gt;false&lt;/span&gt;;               
}

&lt;span style="color: blue;"&gt;return &lt;/span&gt;exists;
}&lt;/pre&gt;&lt;br /&gt;
Mainly, thats it.&lt;br /&gt;
&lt;br /&gt;
You can format the apperance of the html inside the Repeater control, which&lt;br /&gt;
is very flexible for customized HTML.&lt;br /&gt;
Download the complete source code:&lt;br /&gt;
&lt;a href="https://www.box.net/shared/4xzdv1133f"&gt;C#.NET&lt;/a&gt; or &lt;a href="https://www.box.net/shared/vxio29sfnl"&gt;VB.NET&lt;/a&gt;</description><link>http://dotnetadda.blogspot.com/2010/06/save-and-display-youtube-videos-on.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-8393982808125749506</guid><pubDate>Fri, 25 Jun 2010 10:45:00 +0000</pubDate><atom:updated>2010-06-25T16:21:30.501+05:30</atom:updated><title>[Cool Tool] Assembly minifier tool</title><description>&lt;a href="http://weblogs.asp.net/lduveau/archive/2010/06/24/cool-tool-assembly-minifier-tool.aspx"&gt;[Cool Tool] Assembly minifier tool&lt;/a&gt;: "&lt;span class="entry-author-parent"&gt;by &lt;span class="entry-author-name"&gt;pluginbaby&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
If you are using Silverlight controls from the Telerik suite, you’re going to love this.&lt;br /&gt;
&lt;a href="http://www.telerik.com/" rel="nofollow"&gt;Telerik&lt;/a&gt; provide a new free tool to help reduce the size of your Silverlight xap. The Telerik &lt;b&gt;Assembly Minifier&lt;/b&gt; can be found here:    &lt;br /&gt;
&lt;a href="http://minifier.telerik.com/" title="http://minifier.telerik.com/"&gt;http://minifier.telerik.com/&lt;/a&gt;&lt;br /&gt;
From the website: “Telerik Assembly Minifier is a tool that lets you extract only the controls’ classes and resources you need to use in your application development, thus significantly reducing the size of the assemblies. Using the Assembly Minifier you will achieve significantly better loading time when the Silverlight XAP files containing the minified (optimized) assemblies are to be loaded on the client side.”&lt;br /&gt;
&lt;i&gt;Note: this apply to Telerik assemblies only (for now).&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
I decided to give it a try and create a fresh new Silverlight 4 app then insert a Telerik &lt;b&gt;GridView&lt;/b&gt; in a page. VS automatically adds reference to these assemblies:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Telerik.Windows.Data.dll &lt;/li&gt;
&lt;li&gt;Telerik.Windows.Controls.Input.dll &lt;/li&gt;
&lt;li&gt;Telerik.Windows.Controls.GridView.dll &lt;/li&gt;
&lt;li&gt;Telerik.Windows.Controls.dll &lt;/li&gt;
&lt;/ul&gt;&lt;img alt="" border="0" height="100" src="http://weblogs.asp.net/blogs/lduveau/image_5B4AC223.png" style="border-width: 0px; display: inline;" title="" width="374" /&gt; &lt;br /&gt;
That’s &lt;b&gt;645KB &lt;/b&gt;(compressed) added in your xap file, ouch!    &lt;br /&gt;
&lt;br /&gt;
Now let’s add a &lt;b&gt;CoverFlow&lt;/b&gt; and a &lt;b&gt;Scheduler&lt;/b&gt; controls in my app. This adds 2 more assemblies in the resulting xap:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Telerik.Windows.Controls.Scheduler.dll &lt;/li&gt;
&lt;li&gt;Telerik.Windows.Controls.Navigation.dll &lt;/li&gt;
&lt;/ul&gt;&lt;img alt="" border="0" height="63" src="http://weblogs.asp.net/blogs/lduveau/image_56680E67.png" style="border-width: 0px; display: inline;" title="" width="386" /&gt;   &lt;br /&gt;
That’s an additional &lt;b&gt;413KB &lt;/b&gt;in the xap.&lt;br /&gt;
&lt;br /&gt;
At that point my &lt;b&gt;xap file is 1.2MB&lt;/b&gt;, and my app is quite empty, most of the size is coming from the Telerik assemblies. Great features comes with a price, right ?    &lt;br /&gt;
&lt;br /&gt;
Now let’s try the &lt;b&gt;Assembly Minifier&lt;/b&gt; tool.    &lt;br /&gt;
Go to &lt;a href="http://minifier.telerik.com/" rel="nofollow"&gt;http://minifier.telerik.com/&lt;/a&gt; and upload the Telerik assemblies used in your app.&lt;br /&gt;
&lt;img alt="" border="0" height="355" src="http://weblogs.asp.net/blogs/lduveau/image_4EDC9EFA.png" style="border-width: 0px; display: inline;" title="" width="455" /&gt;&lt;br /&gt;
Then I select the controls to be extracted (GridView, CoverFlow and Scheduler here):&lt;br /&gt;
&lt;img alt="" border="0" height="271" src="http://weblogs.asp.net/blogs/lduveau/image_4031F315.png" style="border-width: 0px; display: inline;" title="" width="329" /&gt;  &lt;br /&gt;
Now I can click on the “Extract” button to download the compressed assemblies and reference them in my app (I removed the originals first).&lt;br /&gt;
After recompiling my xap is now &lt;b&gt;845KB&lt;/b&gt;, that’s &lt;b&gt;32% off&lt;/b&gt;.&lt;br /&gt;
So finally for my very specific test (empty Silverlight 4 app with 3 Telerik controls: GridView, CoverFlow and Scheduler) I get this result:&lt;br /&gt;
&lt;table border="1" cellpadding="2" cellspacing="0" style="background-color: white; width: 400px;"&gt;&lt;tbody&gt;
&lt;tr&gt;       &lt;td colspan="2" valign="top"&gt;&lt;div align="center"&gt;&lt;b&gt;&lt;span style="font-size: 130%;"&gt;xap file size&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;div align="center"&gt;&lt;span style="font-size: 130%;"&gt;Before&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;div align="center"&gt;&lt;span style="font-size: 130%;"&gt;After&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;div align="center"&gt;&lt;span style="font-size: 130%;"&gt;1.2MB&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;div align="center"&gt;&lt;span style="font-size: 130%;"&gt;845KB&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;div align="center"&gt;&lt;span style="font-size: 130%;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;div align="center"&gt;&lt;span style="font-size: 130%;"&gt;[32% gain]&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;     &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Overall this is good, as always Telerik innovate in new tools and it’s nice to see them answering concern like xap files size. But to me the whole process to manually choose your controls and manually upload and manually replace dll is totally inefficient for now. The tool is still beta (and free!) so I do not complain, I just hope to see more features and a better integration in VS later. &lt;b&gt;In a perfect world a VS add-in would do the job automatically when I build in release mode.&lt;/b&gt;&lt;br /&gt;
&lt;div style="background-color: #fffbef; border: 1px solid red; padding: 2px 5px;"&gt;Note the tool is working properly, but the way to replace your dll in VS is not (always grab the old replaced dll). You can find some tips to fix it but it is definitely painful for now. Hope VS will provide an easier way to handle this in the future, or maybe Telerik to create a VS addin or something... &lt;br /&gt;
Waiting for that you’ll find great help here:      &lt;br /&gt;
&lt;a href="http://www.telerik.com/community/forums/silverlight/assembly-minifier.aspx" rel="nofollow"&gt;http://www.telerik.com/community/forums/silverlight/assembly-minifier.aspx&lt;/a&gt;&lt;/div&gt;&lt;div style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;&lt;a href="http://technorati.com/tags/Telerik" rel="tag"&gt;&lt;/a&gt;&lt;/div&gt;&lt;img height="1" src="http://weblogs.asp.net/aggbug.aspx?PostID=7542143" width="1" /&gt;"</description><link>http://dotnetadda.blogspot.com/2010/06/cool-tool-assembly-minifier-tool.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-6950057323046350777</guid><pubDate>Thu, 24 Jun 2010 13:09:00 +0000</pubDate><atom:updated>2010-06-24T18:39:42.248+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C# 4.0</category><category domain="http://www.blogger.com/atom/ns#">VS 2008</category><category domain="http://www.blogger.com/atom/ns#">VS 2010</category><title>Testing Email Sending</title><description>&lt;a href="http://www.pheedcontent.com/click.phdo?i=9c43c9fda5c35ccfafbafc667bfbdf50"&gt;Testing Email Sending&lt;/a&gt;: "&lt;span class="entry-author-parent"&gt;by &lt;span class="entry-author-name"&gt;Steven  Smith&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Recently I learned a couple of interesting things related to sending emails.  One doesnt relate to .NET at all, so if youre a developer and you want to easily be able to test whether or not emails are working correctly in your application without actually sending them and/or installing a real SMTP server on your machine, pay attention.  You can grab the &lt;a href="http://smtp4dev.codeplex.com/" rel="nofollow"&gt;smtp4dev application from codeplex&lt;/a&gt;, which will listen for SMTP emails and log them for you (and will even pop-up from the system tray to notify you when it receives them)  but it will never send them.  Heres what the notification looks like:&lt;br /&gt;
&lt;img alt="image" border="0" height="113" src="http://stevesmithblog.com/files/media/image/WindowsLiveWriter/TestingEmailSending_C42C/image_3.png" style="border: 0px none; display: inline;" title="image" width="261" /&gt; &lt;br /&gt;
The other interesting tidbit about emails that is specific to .NET is that the MailMessage class is IDisposable.  I never realized that before, but I noticed it while reading through the &lt;a href="http://www.amazon.com/gp/product/0672330636?ie=UTF8&amp;amp;tag=aspalliancecom&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0672330636" rel="nofollow" title="C# 4 How To"&gt;Ben Watsons C# 4 How To book&lt;/a&gt; I picked up at TechEd last week (which is done cookbook style and has a ton of useful info in it).  Looking at the MailMessages Dispose() method in Reflector reveals that it only really matters if youre working with AlternateViews or Attachments (this.bodyView is also of type AlternateView):&lt;br /&gt;
&lt;img alt="image" border="0" height="321" src="http://stevesmithblog.com/files/media/image/WindowsLiveWriter/TestingEmailSending_C42C/image_6.png" style="border: 0px none; display: inline;" title="image" width="288" /&gt; &lt;br /&gt;
All the same, you should get in the habit of wrapping your calls to MailMessage in a using() {  } block.  Heres some sample code showing how I would typically work with MailMessage:&lt;br /&gt;
&lt;b&gt;Bad Example (dont cut and paste and use):&lt;/b&gt;&lt;br /&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;string fromAddress = "nobody@somewhere.com";&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;string toAddress = "somebody@somewhere.com";&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;string subject = "Test Message from IDisposable";&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;string body = "This is the body.";&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;var myMessage = new MailMessage(fromAddress, toAddress, subject, body);&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;var myClient = new SmtpClient("localhost");&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;myClient.Send(myMessage);&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And heres how that code would look once its properly set up using IDisposable / using:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Good Example (use this one!):&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;string fromAddress = "nobody@somewhere.com";&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;string toAddress = "somebody@somewhere.com";&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;string subject = "Test Message from IDisposable";&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;string body = "This is the body.";&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;using(var myMessage = new MailMessage(fromAddress, toAddress, subject, body))&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;using(var myClient = new SmtpClient("localhost"))&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;{&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;myClient.Send(myMessage);                &lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note also that SmtpClient is also IDisposable, and that you can stack your using() statements without introducing extra {  } when you have instances where you need to work with several Disposable objects (like in this case).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that if you run Code Analysis in VS2010 (not sure which version you have to have  right click on a project in your solution explorer and look for Analyze Code) you will get warnings for any IDisposable classes youre using outside of using statements, like these:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://stevesmithblog.com/files/media/image/WindowsLiveWriter/TestingEmailSending_C42C/image_8.png" rel="nofollow"&gt;&lt;img alt="image" border="0" height="184" src="http://stevesmithblog.com/files/media/image/WindowsLiveWriter/TestingEmailSending_C42C/image_thumb_2.png" style="border: 0px none; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Summary&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sometimes things you dont expect to be Disposable are.  Its good to run some code analysis tools from time to time to help find things like this.  Visual studio has some nice static analysis built into some versions, or you can use less expensive tools like &lt;a href="http://msdn.microsoft.com/en-us/library/bb429476%28VS.80%29.aspx" rel="nofollow"&gt;Fx Cop&lt;/a&gt; or &lt;a href="http://nitriq.com/" rel="nofollow"&gt;Nitriq&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://feedads.g.doubleclick.net/%7Ea/EuIDE_DVv3uoHIp8-CdCVQaF_FM/0/da" rel="nofollow"&gt;&lt;img border="0" ismap="ismap" src="http://feedads.g.doubleclick.net/%7Ea/EuIDE_DVv3uoHIp8-CdCVQaF_FM/0/di" /&gt;&lt;/a&gt;</description><link>http://dotnetadda.blogspot.com/2010/06/testing-email-sending.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-4999644804568277251</guid><pubDate>Wed, 16 Jun 2010 09:34:00 +0000</pubDate><atom:updated>2010-06-16T15:04:20.293+05:30</atom:updated><title>How to Answer a Stupid Interview Question the Right Way</title><description>&lt;a href="http://feedproxy.google.com/%7Er/SqlteamcomWeblogs/%7E3/EbMHCUSSQ0Y/How-to-Answer-a-Stupid-Interview-Question-the-Right-Way.aspx"&gt;How to Answer a Stupid Interview Question the Right Way&lt;/a&gt;: " By &lt;span class="entry-author-parent"&gt;&lt;span class="entry-author-name"&gt;AjarnMark&lt;/span&gt;&lt;/span&gt;&lt;p&gt;Have you ever been asked a stupid question during an interview; one that seemed to have no relation to the job responsibilities &lt;strong&gt;at all&lt;/strong&gt;?  Tech people are often caught off-guard by these apparently irrelevant questions, but there is a way you can turn these to your favor.  Here is one idea.&lt;/p&gt;  &lt;p&gt;While chatting with a couple of folks between sessions at &lt;a href="http://www.sqlsaturday.com/"&gt;SQLSaturday&lt;/a&gt; 43 last weekend, one of them expressed frustration over a seemingly ridiculous and trivial question that she was asked during an interview, and she believes it cost her the job opportunity.  The question, as I remember it being described was, “What is the largest byte measurement?”.  The candidate made up a guess (“zetabyte”) during the interview, which is actually closer than she may have realized.  According to Wikipedia, there is a measurement known as zettabyte which is 10^21, and the largest one listed there is &lt;a href="http://en.wikipedia.org/wiki/Yottabyte"&gt;yottabyte&lt;/a&gt; at 10^24.&lt;/p&gt;  &lt;p&gt;My first reaction to this question was, “That’s just a hiring manager that doesn’t really know what they’re looking for in a candidate.  Furthermore, this tells me that this manager really does not understand how to build a &lt;strong&gt;team&lt;/strong&gt;.”  In most companies, team interaction is more important than uber-knowledge.  I didn’t ask, but this could also be another geek on the team trying to establish their Alpha-Geek stature.  I suppose that there are a few, very few, companies that can build their businesses on hiring only the extreme alpha-geeks, but that certainly does not represent the majority of businesses in America.&lt;/p&gt;  &lt;p&gt;My friend who was there suggested that the appropriate response to this silly question would be, “And how does this apply to the work I will be doing?” Of course this is an understandable response when you’re frustrated because you know you can handle the technical aspects of the job, and it seems like the interviewer is just being silly.  But it is also a direct challenge, which may not be the best approach in interviewing.  I do have to admit, though, that there are those folks who just won’t respect you until you do challenge them, but again, I don’t think that is the majority.&lt;/p&gt;  &lt;p&gt;So after some thought, here is my suggestion: “Well, I know that there are petabytes and exabytes and things even larger than that, but I haven’t been keeping up on my list of Greek prefixes that have not yet been used, so I would have to look up the exact answer if you need it.  However, I have worked with databases as large as 30 Terabytes.  How big are the largest databases here at X Corporation?”  Perhaps with a follow-up of, “Typically, what I have seen in companies that have databases of your size, is that the three biggest challenges they face are: A, B, and C.  What would you say are the top 3 concerns that you would like the person you hire to be able to address?…Here is how I have dealt with those concerns in the past (or ‘Here is how I would tackle those issues for you…’).”&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Wait! What just happened?!&lt;/strong&gt;  We took a seemingly irrelevant and frustrating question and turned it around into an opportunity to highlight our relevant skills and guide the conversation back in a direction more to our liking and benefit.  In more generic terms, here is what we did:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Admit that you don’t know the specific answer off the top of your head, but can get it if it’s truly important to the company. Maybe for some reason it really is important to them.&lt;/li&gt;    &lt;li&gt;Mention something similar or related that you do know, reassuring them that you do have some knowledge in that subject area.&lt;/li&gt;    &lt;li&gt;Draw a parallel to your past work experience. &lt;/li&gt;    &lt;li&gt;Ask follow-up questions about the company’s specific needs and discuss how you can fulfill those. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;This type of thing requires practice and some forethought.  I didn’t come up with this answer until a day later, which is too late when you’re interviewing.  I still think it is silly for an interviewer to ask something like that, but at least this is one way to spin it to your advantage while you consider whether you really want to work for someone who would ask a thing like that.  Remember, interviewing is a two-way process.  You’re deciding whether you want to work there just as much as they are deciding whether they want you.&lt;/p&gt;  &lt;p&gt;There is always the possibility that this was a calculated maneuver on the part of the hiring manager just to see how quickly you think on your feet and how you handle stupid questions.  Maybe he knows something about the work environment and he’s trying to gauge whether you’ll actually fit in okay.  And if that’s the case, then the above response still works quite well.&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/markc/aggbug/61152.aspx" width="1" height="1" /&gt;&lt;img src="http://feeds.feedburner.com/%7Er/SqlteamcomWeblogs/%7E4/EbMHCUSSQ0Y" width="1" height="1" /&gt;</description><link>http://dotnetadda.blogspot.com/2010/06/how-to-answer-stupid-interview-question.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-2755161260108962988</guid><pubDate>Mon, 14 Jun 2010 06:27:00 +0000</pubDate><atom:updated>2010-06-14T12:19:12.989+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Globalization</category><category domain="http://www.blogger.com/atom/ns#">Jquery</category><category domain="http://www.blogger.com/atom/ns#">Localisation</category><title>jQuery Globalization Plugin from Microsoft</title><description>&lt;a href="http://weblogs.asp.net/scottgu/archive/2010/06/10/jquery-globalization-plugin-from-microsoft.aspx"&gt;jQuery Globalization Plugin from Microsoft&lt;/a&gt;: " &lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;By Scott from ASP.Net Weblogs&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;Last month Scott blogged about how Microsoft is starting to &lt;a href="http://weblogs.asp.net/scottgu/archive/2010/05/07/jquery-templates-and-data-linking-and-microsoft-contributing-to-jquery.aspx"&gt;make code contributions to jQuery&lt;/a&gt;, and about some of the first code contributions Microsoft working on: &lt;a href="http://weblogs.asp.net/scottgu/archive/2010/05/07/jquery-templates-and-data-linking-and-microsoft-contributing-to-jquery.aspx"&gt;jQuery Templates and Data Linking support&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;On June 11, Microsoft released a prototype of a new jQuery Globalization Plugin that enables you to add globalization support to your JavaScript applications. This plugin includes globalization information for over 350 cultures ranging from Scottish Gaelic, Frisian, Hungarian, Japanese, to Canadian English.&amp;nbsp; We will be releasing this plugin to the community as open-source.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;You can download our prototype for the jQuery Globalization plugin from our Github repository: &lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://github.com/nje/jquery-glob"&gt;http://github.com/nje/jquery-glob&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;You can also download a set of samples that demonstrate some simple use-cases with it &lt;a href="http://www.scottgu.com/blogposts/jQueryGlobalizationDemos.zip"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;u&gt;Understanding Globalization&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;The jQuery Globalization plugin enables you to easily parse and format numbers, currencies, and dates for different cultures in JavaScript. For example, you can use the Globalization plugin to display the proper currency symbol for a culture:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_1DAC1393.png"&gt;&lt;img alt="image" border="0" height="151" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_43A1C3E9.png" style="border-width: 0px; display: inline;" title="image" width="300" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;You also can use the Globalization plugin to format dates so that the day and month appear in the right order and the day and month names are correctly translated:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_7BE03B01.png"&gt;&lt;img alt="image" border="0" height="222" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_02271190.png" style="border-width: 0px; display: inline;" title="image" width="367" /&gt;&lt;/a&gt;     &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;Notice above how the Arabic year is displayed as 1431. This is because the year has been converted to use the Arabic calendar.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;Some cultural differences, such as different currency or different month names, are obvious. Other cultural differences are surprising and subtle. For example, in some cultures, the grouping of numbers is done unevenly. In the "te-IN" culture (Telugu in India), groups have 3 digits and then 2 digits. The number 1000000 (one million) is written as "10,00,000". Some cultures do not group numbers at all. All of these subtle cultural differences are handled by the jQuery Globalization plugin automatically.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;Getting dates right can be especially tricky. Different cultures have different calendars such as the Gregorian and UmAlQura calendars. A single culture can even have multiple calendars. For example, the Japanese culture uses both the Gregorian calendar and a Japanese calendar that has eras named after Japanese emperors. The Globalization Plugin includes methods for converting dates between all of these different calendars.&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;u&gt;Using Language Tags&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;The jQuery Globalization plugin uses the language tags defined in the RFC 4646 and RFC 5646 standards to identity cultures (see &lt;a href="http://tools.ietf.org/html/rfc5646"&gt;http://tools.ietf.org/html/rfc5646&lt;/a&gt;). A language tag is composed out of one or more subtags separated by hyphens. For example:&lt;/span&gt;&lt;br /&gt;
&lt;table border="0" cellpadding="0" cellspacing="0" style="width: 400px;"&gt;&lt;tbody&gt;
&lt;tr&gt;         &lt;td valign="top" width="200"&gt;&lt;b&gt;Language Tag&lt;/b&gt;&lt;/td&gt;          &lt;td valign="top" width="200"&gt;&lt;b&gt;Language Name (in English)&lt;/b&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td valign="top" width="200"&gt;en-AU&lt;/td&gt;          &lt;td valign="top" width="200"&gt;English (Australia)&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td valign="top" width="200"&gt;en-BZ&lt;/td&gt;          &lt;td valign="top" width="200"&gt;English (Belize)&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td valign="top" width="200"&gt;en-CA&lt;/td&gt;          &lt;td valign="top" width="200"&gt;English (Canada)&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td valign="top" width="200"&gt;Id&lt;/td&gt;          &lt;td valign="top" width="200"&gt;Indonesian&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td valign="top" width="200"&gt;zh-CHS&lt;/td&gt;          &lt;td valign="top" width="200"&gt;Chinese (Simplified) Legacy&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td valign="top" width="200"&gt;Zu&lt;/td&gt;          &lt;td valign="top" width="200"&gt;isiZulu&lt;/td&gt;       &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;Notice that a single language, such as English, can have several language tags. Speakers of English in Canada format numbers, currencies, and dates using different conventions than speakers of English in Australia or the United States.&amp;nbsp; You can find the language tag for a particular culture by using the &lt;b&gt;Language Subtag Lookup&lt;/b&gt; tool located here:&amp;nbsp; &lt;a href="http://rishida.net/utils/subtags/"&gt;http://rishida.net/utils/subtags/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;The jQuery Globalization plugin download includes a folder named &lt;b&gt;globinfo&lt;/b&gt; that contains the information for each of the 350 cultures. Actually, this folder contains more than 700 files because the folder includes both minified and un-minified versions of each file.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;For example, the &lt;b&gt;globinfo&lt;/b&gt; folder includes JavaScript files named jQuery.glob.en-AU.js for English Australia, jQuery.glob.id.js for Indonesia, and jQuery.glob.zh-CHS for Chinese (Simplified) Legacy.&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;u&gt;Example: Setting a Particular Culture&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;Imagine that you have been asked to create a German website and want to format all of the dates, currencies, and numbers using German formatting conventions correctly in JavaScript on the client. The HTML for the page might look like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_737C65AA.png"&gt;&lt;img alt="image" border="0" height="384" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_79C33C38.png" style="border-width: 0px; display: inline;" title="image" width="586" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;Notice the span tags above. They mark the areas of the page that we want to format with the Globalization plugin. We want to format the product price, the date the product is available, and the units of the product in stock.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;To use the jQuery Globalization plugin, we’ll add three JavaScript files to the page: the jQuery library, the jQuery Globalization plugin, and the culture information for a particular language:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_46F335C4.png"&gt;&lt;img alt="image" border="0" height="71" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_461ACFDA.png" style="border-width: 0px; display: inline;" title="image" width="628" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;In this case, I’ve statically added the jQuery.glob.de-DE.js JavaScript file that contains the culture information for German. The language tag “de-DE” is used for German as spoken in Germany.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;Now that I have all of the necessary scripts, I can use the Globalization plugin to format the &lt;i&gt;product price&lt;/i&gt;,&lt;i&gt; date available&lt;/i&gt;, and &lt;i&gt;units in stock&lt;/i&gt; values using the following client-side JavaScript:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_454269F0.png"&gt;&lt;img alt="image" border="0" height="396" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_7D80E108.png" style="border-width: 0px; display: inline;" title="image" width="561" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;The jQuery Globalization plugin extends the jQuery library with new methods - including new methods named &lt;b&gt;preferCulture()&lt;/b&gt; and &lt;b&gt;format().&lt;/b&gt; The &lt;b&gt;preferCulture()&lt;/b&gt; method enables you to set the default culture used by the jQuery Globalization plugin methods. Notice that the &lt;b&gt;preferCulture()&lt;/b&gt; method accepts a language tag. The method will find the closest culture that matches the language tag. &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;The &lt;b&gt;$.format()&lt;/b&gt; method is used to actually format the currencies, dates, and numbers. The second parameter passed to the &lt;b&gt;$.format()&lt;/b&gt; method is a format specifier. For example, passing “c” causes the value to be formatted as a currency. The ReadMe file at github details the meaning of all of the various format specifiers: &lt;a href="http://github.com/nje/jquery-glob"&gt;http://github.com/nje/jquery-glob&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;When we open the page in a browser, everything is formatted correctly according to German language conventions. A euro symbol is used for the currency symbol. The date is formatted using German day and month names. Finally, a period instead of a comma is used a number separator:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_63ACAAD9.png"&gt;&lt;img alt="image" border="0" height="342" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_74B0D8BC.png" style="border-width: 0px; display: inline;" title="image" width="413" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;You can see a running example of the above approach with the 3_GermanSite.htm file in this &lt;a href="http://www.scottgu.com/blogposts/jQueryGlobalizationDemos.zip"&gt;samples download&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;u&gt;Example: &lt;/u&gt;&lt;u&gt;Enabling a User to Dynamically Select a Culture&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;In the previous example we explicitly said that we wanted to globalize in German (by referencing the jQuery.glob.de-DE.js file). Let’s now look at the first of a few examples that demonstrate how to dynamically set the globalization culture to use.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;Imagine that you want to display a dropdown list of all of the 350 cultures in a page. When someone selects a culture from the dropdown list, you want all of the dates in the page to be formatted using the selected culture.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_01AAB8CE.png"&gt;&lt;img alt="image" border="0" height="300" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_19CE2329.png" style="border-width: 0px; display: inline;" title="image" width="413" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;Here’s the HTML for the page:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_31F18D84.png"&gt;&lt;img alt="image" border="0" height="120" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_5F067A52.png" style="border-width: 0px; display: inline;" title="image" width="628" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;Notice that all of the dates are contained in a &amp;lt;span&amp;gt; tag with a data-date attribute (data-* attributes are a new feature of HTML 5 that conveniently also still work with older browsers). We’ll format the date represented by the data-date attribute when a user selects a culture from the dropdown list.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;In order to display dates for any possible culture, we’ll include the jQuery.glob.all.js file like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_6238623A.png"&gt;&lt;img alt="image" border="0" height="64" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_4144EF93.png" style="border-width: 0px; display: inline;" title="image" width="628" /&gt;&lt;/a&gt;     &lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;i&gt;The jQuery Globalization plugin includes a JavaScript file named jQuery.glob.all.js. This file contains globalization information for all of the more than 350 cultures supported by the Globalization plugin.&lt;/i&gt;&amp;nbsp; &lt;i&gt;At 367KB minified, this file is not small. Because of the size of this file, unless you really need to use all of these cultures at the same time, we recommend that you add the individual JavaScript files for particular cultures that you intend to support instead of the combined jQuery.glob.all.js to a page. In the next sample I’ll show how to dynamically load just the language files you need.&lt;/i&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;Next, we’ll populate the dropdown list with all of the available cultures. We can use the $.cultures property to get all of the loaded cultures:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_750CE5E4.png"&gt;&lt;img alt="image" border="0" height="119" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_6D154382.png" style="border-width: 0px; display: inline;" title="image" width="628" /&gt;&lt;/a&gt;     &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;Finally, we’ll write jQuery code that grabs every span element with a data-date attribute and format the date:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_45029463.png"&gt;&lt;img alt="image" border="0" height="245" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_11C65AFA.png" style="border-width: 0px; display: inline;" title="image" width="628" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;The jQuery Globalization plugin’s &lt;b&gt;parseDate()&lt;/b&gt; method is used to convert a string representation of a date into a JavaScript date. The plugin’s &lt;b&gt;format()&lt;/b&gt; method is used to format the date. The “D” format specifier causes the date to be formatted using the long date format.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;And now the content will be globalized correctly regardless of which of the 350 languages a user visiting the page selects.&amp;nbsp; You can see a running example of the above approach with the 4_SelectCulture.htm file in this &lt;a href="http://www.scottgu.com/blogposts/jQueryGlobalizationDemos.zip"&gt;samples download&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;u&gt;Example: Loading Globalization Files Dynamically&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;As mentioned in the previous section, you should avoid adding the jQuery.glob.all.js file to a page whenever possible because the file is so large. A better alternative is to load the globalization information that you need dynamically.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;For example, imagine that you have created a dropdown list that displays a list of languages:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_17A0FE93.png"&gt;&lt;img alt="image" border="0" height="131" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_10158F26.png" style="border-width: 0px; display: inline;" title="image" width="445" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;The following jQuery code executes whenever a user selects a new language from the dropdown list. The code checks whether the globalization file associated with the selected language has already been loaded. If the globalization file has not been loaded then the globalization file is loaded dynamically by taking advantage of the jQuery &lt;b&gt;$.getScript()&lt;/b&gt; method.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_2185EFFE.png"&gt;&lt;img alt="image" border="0" height="333" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_55BA1944.png" style="border-width: 0px; display: inline;" title="image" width="597" /&gt;&lt;/a&gt;     &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;The globalizePage() method is called after the requested globalization file has been loaded, and contains the client-side code to perform the globalization. &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;The advantage of this approach is that it enables you to avoid loading the entire jQuery.glob.all.js file. Instead you only need to load the files that you need and you don’t need to load the files more than once. &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;The 5_Dynamic.htm file in this &lt;a href="http://www.scottgu.com/blogposts/jQueryGlobalizationDemos.zip"&gt;samples download&lt;/a&gt; demonstrates how to implement this approach.&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;u&gt;Example: Setting the User Preferred Language Automatically&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;Many websites detect a user’s preferred language from their browser settings and automatically use it when globalizing content. A user can set a preferred language for their browser. Then, whenever the user requests a page, this language preference is included in the request in the Accept-Language header. &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;When using Microsoft Internet Explorer, you can set your preferred language by following these steps:&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;
&lt;li&gt;Select the menu option &lt;b&gt;Tools, Internet Options&lt;/b&gt;. &lt;/li&gt;
&lt;li&gt;Select the &lt;b&gt;General&lt;/b&gt; tab. &lt;/li&gt;
&lt;li&gt;Click the &lt;b&gt;Languages&lt;/b&gt; button in the &lt;b&gt;Appearance&lt;/b&gt; section. &lt;/li&gt;
&lt;li&gt;Click the &lt;b&gt;Add&lt;/b&gt; button to add a new language to the list of languages. &lt;/li&gt;
&lt;li&gt;Move your preferred language to the top of the list. &lt;/li&gt;
&lt;/span&gt;&lt;/ol&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_74FCC017.png"&gt;&lt;img alt="image" border="0" height="401" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_74245A2D.png" style="border-width: 0px; display: inline;" title="image" width="369" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;Notice that you can list multiple languages in the Language Preference dialog. All of these languages are sent in the order that you listed them in the Accept-Language header: &lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;Accept-Language: fr-FR,id-ID;q=0.7,en-US;q=0.3&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;Strangely, you cannot retrieve the value of the Accept-Language header from client JavaScript. Microsoft Internet Explorer and Mozilla Firefox support a bevy of language related properties exposed by the window.navigator object, such as windows.navigator.browserLanguage and window.navigator.language, but these properties represent either the language set for the operating system or the language edition of the browser. These properties don’t enable you to retrieve the language that the user set as his or her preferred language.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;The only reliable way to get a user’s preferred language (the value of the Accept-Language header) is to write server code. For example, the following ASP.NET page takes advantage of the server Request.UserLanguages property to assign the user’s preferred language to a client JavaScript variable named &lt;i&gt;acceptLanguage &lt;/i&gt;(which then allows you to access the value using client-side JavaScript):&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_77564215.png"&gt;&lt;img alt="image" border="0" height="106" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_4BA57819.png" style="border-width: 0px; display: inline;" title="image" width="587" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;In order for this code to work, the culture information associated with the value of acceptLanguage must be included in the page. For example, if someone’s preferred culture is fr-FR (French in France) then you need to include either the jQuery.glob.fr-FR.js or the jQuery.glob.all.js JavaScript file in the page or the culture information won’t be available.&amp;nbsp; The “6_AcceptLanguages.aspx” sample in this &lt;a href="http://www.scottgu.com/blogposts/jQueryGlobalizationDemos.zip"&gt;samples download&lt;/a&gt; demonstrates how to implement this approach.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;If the culture information for the user’s preferred language is not included in the page then the &lt;b&gt;$.preferCulture()&lt;/b&gt; method will fall back to using the neutral culture (for example, using jQuery.glob.fr.js instead of jQuery.glob.fr-FR.js). If the neutral culture information is not available then the &lt;b&gt;$.preferCulture()&lt;/b&gt; method falls back to the default culture (English).&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;u&gt;Example: Using the Globalization Plugin with the jQuery UI DatePicker&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial; font-size: x-small;"&gt;One of the goals of the Globalization plugin is to make it easier to build jQuery widgets that can be used with different cultures.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;We wanted to make sure that the jQuery Globalization plugin could work with existing jQuery UI plugins such as the DatePicker plugin. To that end, we created a patched version of the DatePicker plugin that can take advantage of the Globalization plugin when rendering a calendar. The following image illustrates what happens when you add the jQuery Globalization and the patched jQuery UI DatePicker plugin to a page and select Indonesian as the preferred culture:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgu/image_5D15D8F1.png"&gt;&lt;img alt="image" border="0" height="622" src="http://weblogs.asp.net/blogs/scottgu/image_thumb_62F07C8A.png" style="border-width: 0px; display: inline;" title="image" width="577" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;Notice that the headers for the days of the week are displayed using Indonesian day name abbreviations. Furthermore, the month names are displayed in Indonesian.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial; font-size: x-small;"&gt;You can download the patched version of the jQuery UI DatePicker from our github website. Or you can use the version included in this &lt;a href="http://www.scottgu.com/blogposts/jQueryGlobalizationDemos.zip"&gt;samples download&lt;/a&gt; and used by the 7_DatePicker.htm sample file.&lt;/span&gt;</description><link>http://dotnetadda.blogspot.com/2010/06/jquery-globalization-plugin-from.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-2805043454362088522</guid><pubDate>Mon, 31 May 2010 09:10:00 +0000</pubDate><atom:updated>2010-05-31T14:40:14.379+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Pickup Directory</category><category domain="http://www.blogger.com/atom/ns#">System.Net.Mail</category><category domain="http://www.blogger.com/atom/ns#">VS 2008</category><category domain="http://www.blogger.com/atom/ns#">VS 2010</category><title>ASP.NET: Using pickup directory for outgoing e-mails</title><description>&lt;a href="http://weblogs.asp.net/gunnarpeipman/archive/2010/05/27/asp-net-using-pickup-directory-for-outgoing-e-mails.aspx"&gt;ASP.NET: Using pickup directory for outgoing e-mails&lt;/a&gt;: "&lt;br /&gt;
Sending e-mails out from web applications is very common task. When we are working on or test our systems with real e-mail addresses we don’t want recipients to receive e-mails (specially if we are using some subset of real data9. In this posting I will show you how to make ASP.NET SMTP client to write e-mails to disc instead of sending them out.&lt;br /&gt;
&lt;h3&gt;SMTP settings for web application&lt;/h3&gt;I have seen many times the code where all SMTP information is kept in app settings just to read them in code and give to SMTP client. It is not necessary because we can define all these settings under system.web =&amp;gt; mailsettings node.&lt;br /&gt;
If you are using web.config to keep SMTP settings then all you have to do in your code is just to create &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx"&gt;SmtpClient&lt;/a&gt; with empty constructor.&lt;br /&gt;
&lt;hr style="font-size: 78%;" /&gt;&lt;div style="background: none repeat scroll 0% 0% white; color: black; font-family: courier new; font-size: 10pt;"&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;var&lt;/span&gt; smtpClient = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;SmtpClient&lt;/span&gt;();&lt;/div&gt;&lt;hr style="font-size: 78%;" /&gt;&lt;/div&gt;Empty constructor means that all settings are read from web.config file. &lt;br /&gt;
&lt;h3&gt;What is pickup directory?&lt;/h3&gt;If you want drastically raise e-mail throughput of your SMTP server then it is not very wise plan to communicate with it using SMTP protocol. it adds only additional overhead to your network and SMTP server. Okay, clients make connections, send messages out and it is also overhead we can avoid.&lt;br /&gt;
If clients write their e-mails to some folder that SMTP server can access then SMTP server has e-mail forwarding as only resource-eager task to do. File operations are way faster than communication over SMTP protocol. The directory where clients write their e-mails as files is called &lt;b&gt;pickup directory&lt;/b&gt;. &lt;br /&gt;
By example, Exchange server has support for pickup directories. And as there are applications with a lot of users who want e-mail notifications then .NET SMTP client supports writing e-mails to pickup directory instead of sending them out.&lt;br /&gt;
&lt;h3&gt;How to configure ASP.NET SMTP to use pickup directory?&lt;/h3&gt;Let’s say, it is more than easy. It is very easy. This is all you need.&lt;br /&gt;
&lt;div style="background: none repeat scroll 0% 0% white; color: black; font-family: courier new; font-size: 10pt;"&gt;&lt;hr style="font-size: 78%;" /&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;system.net&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;mailSettings&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;smtp&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;deliveryMethod&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;SpecifiedPickupDirectory&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;specifiedPickupDirectory&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;pickupDirectoryLocation&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;c:\temp\maildrop\&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;smtp&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;mailSettings&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;system.net&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;hr style="font-size: 78%;" /&gt;&lt;/div&gt;Now make sure you don’t miss come points:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Pickup directory must physically exist because it is not created automatically. &lt;/li&gt;
&lt;li&gt;IIS (or Cassini) must have write permissions to pickup directory. &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Go through your code and look for hardcoded SMTP settings. Also take a look at all places in your code where you send out e-mails that there are not some custom settings used for SMTP!&lt;/b&gt; &lt;/li&gt;
&lt;/ol&gt;Also don’t forget that your mails will be written now to pickup directory and they are not sent out to recipients anymore.&lt;br /&gt;
&lt;h3&gt;Advanced scenario: configuring SMTP client in code&lt;/h3&gt;In some advanced scenarios you may need to support multiple SMTP servers. If configuration is dynamic or it is not kept in web.config you need to initialize your SmtpClient in code. This is all you need to do.&lt;br /&gt;
&lt;div style="background: none repeat scroll 0% 0% white; color: black; font-family: courier new; font-size: 10pt;"&gt;&lt;hr style="font-size: 78%;" /&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;var&lt;/span&gt; smtpClient = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;SmtpClient&lt;/span&gt;();&lt;/div&gt;&lt;div style="margin: 0px;"&gt;smtpClient.DeliveryMethod = &lt;span style="color: #2b91af;"&gt;SmtpDeliveryMethod&lt;/span&gt;.SpecifiedPickupDirectory;&lt;/div&gt;&lt;div style="margin: 0px;"&gt;smtpClient.PickupDirectoryLocation = pickupFolder;&lt;/div&gt;&lt;hr size="1" /&gt;&lt;/div&gt;Easy, isn’t it? i like when advanced scenarios end up with simple and elegant solutions but not with rocket science. &lt;br /&gt;
&lt;h3&gt;Note for IIS SMTP service&lt;/h3&gt;SMTP service of IIS is also able to use pickup directory. If you have set up IIS with SMTP service you can configure your ASP.NET application to use IIS pickup folder. In this case you have to use the following setting for delivery method.&lt;br /&gt;
&lt;div style="background: none repeat scroll 0% 0% white; color: black; font-family: courier new; font-size: 10pt;"&gt;&lt;hr size="1" /&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;SmtpDeliveryMethod&lt;/span&gt;.PickupDirectoryFromIis&lt;/div&gt;&lt;hr size="1" /&gt;&lt;/div&gt;You can set this setting also in web.config file.&lt;br /&gt;
&lt;div style="background: none repeat scroll 0% 0% white; color: black; font-family: courier new; font-size: 10pt;"&gt;&lt;hr size="1" /&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;system.net&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;mailSettings&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;smtp&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;deliveryMethod&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;PickupDirectoryFromIis&lt;/span&gt;"&lt;span style="color: blue;"&gt; /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;mailSettings&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;system.net&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;hr size="1" /&gt;&lt;/div&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;Who was still using different methods to avoid sending e-mails out in development or testing environment can now remove all the bad code from application and live on mail settings of ASP.NET. It is easy to configure and you have less code to support e-mails when you use built-in e-mail features wisely.&lt;br /&gt;
&lt;img height="1" src="http://weblogs.asp.net/aggbug.aspx?PostID=7508255" width="1" /&gt;</description><link>http://dotnetadda.blogspot.com/2010/05/aspnet-using-pickup-directory-for.html</link><author>noreply@blogger.com (xyz)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-8440056479984791068</guid><pubDate>Mon, 31 May 2010 06:00:00 +0000</pubDate><atom:updated>2010-05-31T11:31:21.356+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>List of Database Engine Error Messages</title><description>&lt;a href="http://feedproxy.google.com/%7Er/sqlservercurry/blog/%7E3/bgYqQlXSlaQ/list-of-database-engine-error-messages.html"&gt;List of Database Engine Error Messages&lt;/a&gt;: "&lt;br /&gt;
&lt;div align="justify"&gt;All system and user-defined error messages in an instance of the Database Engine are contained in the &lt;b&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms187382%28v=SQL.90%29.aspx"&gt;sys.messages&lt;/a&gt;&lt;/b&gt; catalog view.&lt;/div&gt;&lt;div align="justify"&gt;Here’s how to query this catalog view to list the Error Messages based on their severity&lt;/div&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt;SELECT &lt;/span&gt;&lt;span style="color: grey;"&gt;* &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM &lt;/span&gt;&lt;span style="color: green;"&gt;sys&lt;/span&gt;&lt;span style="color: grey;"&gt;.&lt;/span&gt;&lt;span style="color: green;"&gt;messages 
&lt;/span&gt;&lt;span style="color: blue;"&gt;WHERE &lt;/span&gt;language_id &lt;span style="color: grey;"&gt;= &lt;/span&gt;1033
&lt;span style="color: blue;"&gt;ORDER BY &lt;/span&gt;severity &lt;span style="color: blue;"&gt;desc&lt;/span&gt;&lt;/pre&gt;OUTPUT&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLPJ7DFQGLfPHlFnung0_zhdUjHcnV9jvQuHfu6y6IwUFg1eEEYIJoZJIPm6hm-RxA5_NOfjEkYu-hvoNgTpm9NQ4vdceSklfDfEg3doP8oA-7DrnktkJZPDp1g8hB5M4rjw9Psawn0FQk/s1600-h/image%5B4%5D.png"&gt;&lt;img alt="Error Messages SQL Server" border="0" height="162" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhboZHmIjBucZ4Dh2eHQFlVX2zAENsxRCEOs6RhmTBeH1qE3F89ZxB7tJBS5Bhmo0KpRQhHw2aZA2xwFazD6f1iuaXwbcGp7YqpbDI0ZgT9VMYo1NssPsG51lPrjkrs5hWScRxqopJbMTtO/?imgmax=800" style="border: 0px none; display: inline;" title="Error Messages SQL Server" width="544" /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;div align="justify"&gt;The error message describes the cause of the error whereas the severity indicates how serious the error is.You can read more on the different Level of Severities over here &lt;a href="http://msdn.microsoft.com/en-us/library/ms164086%28v=SQL.90%29.aspx"&gt;Database Engine Error Severities&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;img alt="" height="1" src="https://blogger.googleusercontent.com/tracker/495177919198719500-1148088117539899976?l=www.sqlservercurry.com" width="1" /&gt;&lt;/div&gt;&lt;img height="1" src="http://feeds.feedburner.com/%7Er/sqlservercurry/blog/%7E4/bgYqQlXSlaQ" width="1" /&gt;"</description><link>http://dotnetadda.blogspot.com/2010/05/list-of-database-engine-error-messages.html</link><author>noreply@blogger.com (xyz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhboZHmIjBucZ4Dh2eHQFlVX2zAENsxRCEOs6RhmTBeH1qE3F89ZxB7tJBS5Bhmo0KpRQhHw2aZA2xwFazD6f1iuaXwbcGp7YqpbDI0ZgT9VMYo1NssPsG51lPrjkrs5hWScRxqopJbMTtO/s72-c?imgmax=800" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2766646214085653731.post-374778908039391113</guid><pubDate>Mon, 31 May 2010 05:57:00 +0000</pubDate><atom:updated>2010-05-31T11:32:31.947+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><category domain="http://www.blogger.com/atom/ns#">SQL SERVER Unique ID</category><title>Auto Generate AlphaNumeric ID’s in a SQL Server Table</title><description>&lt;a href="http://feedproxy.google.com/%7Er/sqlservercurry/blog/%7E3/w8iWraiAj64/auto-generate-alphanumeric-ids-in-sql.html"&gt;Auto Generate AlphaNumeric ID’s in a SQL Server Table&lt;/a&gt;: "&lt;br /&gt;
&lt;div align="justify"&gt;I was recently working on a query to auto generate a Column ID based on an IDENTITY column. I used computed columns to achieve this. If you too have a similar requirement, then here’s the query.&lt;/div&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt;DECLARE &lt;/span&gt;@TT &lt;span style="color: blue;"&gt;TABLE &lt;/span&gt;&lt;span style="color: grey;"&gt;(
&lt;/span&gt;CandID &lt;span style="color: blue;"&gt;as &lt;/span&gt;&lt;span style="color: red;"&gt;'C-' &lt;/span&gt;&lt;span style="color: grey;"&gt;+ RIGHT(&lt;/span&gt;&lt;span style="color: red;"&gt;'000' &lt;/span&gt;&lt;span style="color: grey;"&gt;+ &lt;/span&gt;&lt;span style="color: magenta;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: grey;"&gt;, &lt;/span&gt;CourseID&lt;span style="color: grey;"&gt;),&lt;/span&gt;5&lt;span style="color: grey;"&gt;),
&lt;/span&gt;CourseID &lt;span style="color: blue;"&gt;int IDENTITY&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;1&lt;span style="color: grey;"&gt;,&lt;/span&gt;1&lt;span style="color: grey;"&gt;),
&lt;/span&gt;ReferrerName &lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;10&lt;span style="color: grey;"&gt;)
)

&lt;/span&gt;&lt;span style="color: blue;"&gt;INSERT INTO &lt;/span&gt;@TT &lt;span style="color: blue;"&gt;VALUES &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;'Dhiraj'&lt;/span&gt;&lt;span style="color: grey;"&gt;)
&lt;/span&gt;&lt;span style="color: blue;"&gt;INSERT INTO &lt;/span&gt;@TT &lt;span style="color: blue;"&gt;VALUES &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;'Jack'&lt;/span&gt;&lt;span style="color: grey;"&gt;)
&lt;/span&gt;&lt;span style="color: blue;"&gt;INSERT INTO &lt;/span&gt;@TT &lt;span style="color: blue;"&gt;VALUES &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;'Kelly'&lt;/span&gt;&lt;span style="color: grey;"&gt;)
&lt;/span&gt;&lt;span style="color: blue;"&gt;INSERT INTO &lt;/span&gt;@TT &lt;span style="color: blue;"&gt;VALUES &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;'Kelly'&lt;/span&gt;&lt;span style="color: grey;"&gt;)
&lt;/span&gt;&lt;span style="color: blue;"&gt;INSERT INTO &lt;/span&gt;@TT &lt;span style="color: blue;"&gt;VALUES &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;'Jack'&lt;/span&gt;&lt;span style="color: grey;"&gt;)
&lt;/span&gt;&lt;span style="color: blue;"&gt;INSERT INTO &lt;/span&gt;@TT &lt;span style="color: blue;"&gt;VALUES &lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;'Dhiraj'&lt;/span&gt;&lt;span style="color: grey;"&gt;)

&lt;/span&gt;&lt;span style="color: blue;"&gt;SELECT &lt;/span&gt;&lt;span style="color: grey;"&gt;* &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM &lt;/span&gt;@TT&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8gHDaYX7yd8HyC8J1RH8e5vh0EtExGUsFSej9PcP5hqCmyyNmLvTRmGUS9udzo8QUXQK_jNfNOGjac3NXfKxTS2MQJKf6v1XwTaAkI7KrjILqoXLUJkfljzwPJC7aChD41otehcsCT2rw/s1600-h/image%5B4%5D.png"&gt;&lt;img alt="Auto Generate SQL Server Column" border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieCN2fpU2Ky-Fz7a8iBws45PSxfX5M862DXnF9z8rgBXN0vUH6qTKCRRNJIaSLEcD1LNzVARw1iq4yjOmorgd0ZhHeq2qQ918bEEdqCjkiKybl1MR43PckQ29-2xlbU22dAHvAf5ABiDbt/?imgmax=800" style="border: 0px none; display: inline;" title="Auto Generate SQL Server Column" width="266" /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;div align="justify"&gt;Observe how the values of the  CandID column are autogenerated based on the values if the CourseID column.&lt;/div&gt;</description><link>http://dotnetadda.blogspot.com/2010/05/auto-generate-alphanumeric-ids-in-sql.html</link><author>noreply@blogger.com (xyz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieCN2fpU2Ky-Fz7a8iBws45PSxfX5M862DXnF9z8rgBXN0vUH6qTKCRRNJIaSLEcD1LNzVARw1iq4yjOmorgd0ZhHeq2qQ918bEEdqCjkiKybl1MR43PckQ29-2xlbU22dAHvAf5ABiDbt/s72-c?imgmax=800" width="72"/><thr:total>1</thr:total></item></channel></rss>