<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>C#</title>
        <link>http://geekswithblogs.net/Saqib/category/7527.aspx</link>
        <description>C#</description>
        <language>en</language>
        <copyright>Tanzim Saqib</copyright>
        <managingEditor>me@tanzimsaqib.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Simple Form Validation - A Reflection based approach</title>
            <link>http://geekswithblogs.net/Saqib/archive/2008/03/28/simple-form-validation---a-reflection-based-approach.aspx</link>
            <description>&lt;p&gt;Are you tired of placing multiple Validation controls on Form? If you are bored of following scenario like me, keep on reading the post:&lt;/p&gt; &lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/Saqib/WindowsLiveWriter/53522d6d07ce_13B51/Validators_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="82" alt="Validators" src="http://geekswithblogs.net/images/geekswithblogs_net/Saqib/WindowsLiveWriter/53522d6d07ce_13B51/Validators_thumb.png" width="365" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;A simple Email address validation can consist of whether&lt;/p&gt; &lt;ul&gt; &lt;li&gt;The field is empty  &lt;/li&gt;&lt;li&gt;Longer than limit  &lt;/li&gt;&lt;li&gt;Email address format is invalid  &lt;/li&gt;&lt;li&gt;Already in use&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Ordinary solution to this problem is placing multiple validation controls for a single TextBox. You can simply it by replacing all with a single Custom Validator. Our goal is to reduce amount of controls on the form to keep it simple. To do that, we would have to write code for Custom Validator that does it all. We also would like to write minimum code to validate the control without compromising manageability. Let us assume we would write the following code inside the ServerValidate of that control:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;protected void &lt;/span&gt;cvEmailAddress_ServerValidate(&lt;span style="color: blue"&gt;object &lt;/span&gt;source, &lt;span style="color: #2b91af"&gt;ServerValidateEventArgs &lt;/span&gt;args)
{
    &lt;span style="color: #2b91af"&gt;ValidationController&lt;/span&gt;.ValidateControl&amp;lt;&lt;span style="color: #2b91af"&gt;ProfileValidator&lt;/span&gt;&amp;gt;(cvEmailAddress, &lt;span style="color: #2b91af"&gt;ProfileValidator&lt;/span&gt;.&lt;span style="color: #2b91af"&gt;Fields&lt;/span&gt;.EmailAddress.ToString(), args);
}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Let us declare a ValidationErrorResult object that contains error messages and text to display in the UI:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public sealed class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ValidationErrorResult
&lt;/span&gt;{
    &lt;span style="color: blue"&gt;public string &lt;/span&gt;ErrorMessage { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
    &lt;span style="color: blue"&gt;public string &lt;/span&gt;Text { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;And an Attribute which would be used to tag a specific method which would be responsible for validation of particular control:&lt;/p&gt;&lt;pre class="code"&gt;[&lt;span style="color: #2b91af"&gt;AttributeUsage&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;AttributeTargets&lt;/span&gt;.Method, Inherited = &lt;span style="color: blue"&gt;false&lt;/span&gt;, AllowMultiple = &lt;span style="color: blue"&gt;true&lt;/span&gt;)]
&lt;span style="color: blue"&gt;public sealed class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ValidationMethodAttribute &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;Attribute
&lt;/span&gt;{
    &lt;span style="color: blue"&gt;public &lt;/span&gt;ValidationMethodAttribute(&lt;span style="color: blue"&gt;string &lt;/span&gt;fieldName)
    {
        &lt;span style="color: blue"&gt;this&lt;/span&gt;.FieldName = fieldName;
    }

    &lt;span style="color: blue"&gt;public string &lt;/span&gt;FieldName { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;private set&lt;/span&gt;; }
}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;If you are already familiar with Attirbute based programming, I hope you know the attribute of this piece of code is in fact &lt;span style="color: #2b91af"&gt;ValidationMethod&lt;/span&gt;. We will soon see how to use this. The following is the method that checks the value and make a list of &lt;span style="color: #2b91af"&gt;ValidationErrorResult &lt;/span&gt;that consists of which rules got failed. Notice that the &lt;span style="color: #2b91af"&gt;ValidationMethod&lt;/span&gt; attribute contains the field name of the object which determines no matter whatever your method name is, that field name helps Validation controller to find this method out for validation.&lt;/p&gt;&lt;pre class="code"&gt;[&lt;span style="color: #2b91af"&gt;ValidationMethod&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Email"&lt;/span&gt;)]
&lt;span style="color: blue"&gt;public static &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;ValidationErrorResult&lt;/span&gt;&amp;gt; ValidateEmail(&lt;span style="color: blue"&gt;object &lt;/span&gt;value)
{
    &lt;span style="color: blue"&gt;var &lt;/span&gt;email = value &lt;span style="color: blue"&gt;as string&lt;/span&gt;;
    &lt;span style="color: blue"&gt;var &lt;/span&gt;results = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;ValidationErrorResult&lt;/span&gt;&amp;gt;();

    &lt;span style="color: green"&gt;// Blank
    &lt;/span&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(email))
        results.Add(&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ValidationErrorResult&lt;/span&gt;()
        {
            ErrorMessage = &lt;span style="color: #a31515"&gt;"You did not provide an Email Address."&lt;/span&gt;,
            Text = &lt;span style="color: #a31515"&gt;"Cannot be left blank"
        &lt;/span&gt;});

    &lt;span style="color: green"&gt;// Length 128
    &lt;/span&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;(email.Length &amp;gt; 128)
        results.Add(&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ValidationErrorResult&lt;/span&gt;()
        {
            ErrorMessage = &lt;span style="color: #a31515"&gt;"You exceeded length limit."&lt;/span&gt;,
            Text = &lt;span style="color: #a31515"&gt;"Keep it less than 129 characters"
        &lt;/span&gt;});

    &lt;span style="color: green"&gt;// Valid Email Address
    &lt;/span&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;(!&lt;span style="color: #2b91af"&gt;Regex&lt;/span&gt;.IsMatch(email, &lt;span style="color: #a31515"&gt;"^[\\w\\.\\-]+@[a-zA-Z0-9\\-]+(\\.[a-zA-Z0-9\\-]{1,})*(\\.[a-zA-Z]{2,3}){1,2}$"&lt;/span&gt;))
        results.Add(&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ValidationErrorResult&lt;/span&gt;()
        {
            ErrorMessage = &lt;span style="color: #a31515"&gt;"You provided an invalid Email Address."&lt;/span&gt;,
            Text = &lt;span style="color: #a31515"&gt;"Invalid Email Address"
        &lt;/span&gt;});

    &lt;span style="color: green"&gt;// Is Already In Use
    &lt;/span&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;(IsAlreadyInUse(email))
        results.Add(&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ValidationErrorResult&lt;/span&gt;()
        {
            ErrorMessage = &lt;span style="color: #a31515"&gt;"You provided an invalid Email Address."&lt;/span&gt;,
            Text = &lt;span style="color: #a31515"&gt;"Invalid Email Address"
        &lt;/span&gt;});

    &lt;span style="color: blue"&gt;return &lt;/span&gt;results;
}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Here is the ValidationController which goes through the Validation class and looks for the method that has the attribute which validates the control's value.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ValidationController
&lt;/span&gt;{
    &lt;span style="color: blue"&gt;public static &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;ValidationErrorResult&lt;/span&gt;&amp;gt; Validate&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;string &lt;/span&gt;fieldName, &lt;span style="color: blue"&gt;object &lt;/span&gt;value)
    {
        &lt;span style="color: blue"&gt;var &lt;/span&gt;results = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;ValidationErrorResult&lt;/span&gt;&amp;gt;();
        &lt;span style="color: blue"&gt;var &lt;/span&gt;type = &lt;span style="color: blue"&gt;typeof&lt;/span&gt;(T);
        &lt;span style="color: blue"&gt;var &lt;/span&gt;methods = type.GetMethods(BindingFlags.Static | BindingFlags.Public);

        &lt;span style="color: blue"&gt;var &lt;/span&gt;method = methods.Single&amp;lt;MethodInfo&amp;gt;(&lt;span style="color: blue"&gt;delegate&lt;/span&gt;(MethodInfo m)
        {
            &lt;span style="color: blue"&gt;return &lt;/span&gt;((&lt;span style="color: #2b91af"&gt;ValidationMethodAttribute&lt;/span&gt;[])m.GetCustomAttributes(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ValidationMethodAttribute&lt;/span&gt;), &lt;span style="color: blue"&gt;false&lt;/span&gt;))[0].FieldName == fieldName;
        });

        &lt;span style="color: blue"&gt;return &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;ValidationErrorResult&lt;/span&gt;&amp;gt;)method.Invoke(&lt;span style="color: blue"&gt;null&lt;/span&gt;, &lt;span style="color: blue"&gt;new object&lt;/span&gt;[] { value });
    }

    &lt;span style="color: blue"&gt;public static void &lt;/span&gt;ValidateControl&amp;lt;T&amp;gt;(&lt;span style="color: #2b91af"&gt;CustomValidator &lt;/span&gt;validator, &lt;span style="color: blue"&gt;string &lt;/span&gt;fieldName, &lt;span style="color: #2b91af"&gt;ServerValidateEventArgs &lt;/span&gt;args)
    {
        &lt;span style="color: blue"&gt;var &lt;/span&gt;results = Validate&amp;lt;T&amp;gt;(fieldName, args.Value);

        &lt;span style="color: blue"&gt;if &lt;/span&gt;(!(args.IsValid = !(results.Count &amp;gt; 0)))
        {
            validator.ErrorMessage = results[0].ErrorMessage;
            validator.Text = results[0].Text;
        }
    }
}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120892"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120892" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Saqib/aggbug/120892.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tanzim Saqib</dc:creator>
            <guid>http://geekswithblogs.net/Saqib/archive/2008/03/28/simple-form-validation---a-reflection-based-approach.aspx</guid>
            <pubDate>Fri, 28 Mar 2008 11:02:24 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Saqib/comments/120892.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Saqib/archive/2008/03/28/simple-form-validation---a-reflection-based-approach.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Saqib/comments/commentRss/120892.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Saqib/services/trackbacks/120892.aspx</trackback:ping>
        </item>
        <item>
            <title>LINQ to Flickr</title>
            <link>http://geekswithblogs.net/Saqib/archive/2008/03/01/linq-to-flickr.aspx</link>
            <description>&lt;p&gt;One of my colleagues &lt;a href="http://weblogs.asp.net/mehfuzh"&gt;Mehfuz Hossain&lt;/a&gt; developed a wonderful open source project which allows you to query Flickr photos by LINQ, also lets you insert, delete photos directly to/from Flickr. You wonder how to extend LINQ in such an amazing way? It’s easy by writing your own custom LINQ provider, which was not-so-easy until he came up with another handy open source project named &lt;a href="http://www.codeplex.com/linqextender"&gt;LINQ Extender&lt;/a&gt;&lt;a href="http://www.codeplex.com/linqextender"&gt;&lt;/a&gt;. He did all the expression parsing stuff to ease our pain. Now you can make your own LINQ to Anything using this so easily.&lt;/p&gt; &lt;p&gt;For your heads up on LINQ extenders, here &lt;a href="http://dotnetslackers.com/articles/csharp/CreatingCustomLINQProviderUsingLinqExtender.aspx"&gt;he wrote an article&lt;/a&gt; and &lt;a href="http://www.codeplex.com/LINQFlickr"&gt;LINQ to Flickr&lt;/a&gt;, open source project is hosted at Codeplex.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120119"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120119" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Saqib/aggbug/120119.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tanzim Saqib</dc:creator>
            <guid>http://geekswithblogs.net/Saqib/archive/2008/03/01/linq-to-flickr.aspx</guid>
            <pubDate>Sat, 01 Mar 2008 16:08:11 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Saqib/comments/120119.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Saqib/archive/2008/03/01/linq-to-flickr.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Saqib/comments/commentRss/120119.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Saqib/services/trackbacks/120119.aspx</trackback:ping>
        </item>
        <item>
            <title>A &amp;quot;transactional&amp;quot; generic DbHelper for LINQ to SQL</title>
            <link>http://geekswithblogs.net/Saqib/archive/2008/02/29/a-quottransactionalquot-generic-dbhelper-for-linq-to-sql.aspx</link>
            <description>&lt;p&gt;In LINQ to SQL, the data model of a relational database is mapped to an object model expressed in the programming language of the developer. When the application runs, LINQ to SQL translates into SQL the language-integrated queries in the object model and sends them to the database for execution. When the database returns the results, LINQ to SQL translates them back to objects that you can work with in your own programming language. You may want to make a data access layer that separates the data operation from business layer like the following:&lt;/p&gt;&lt;pre&gt;DbHelper.Insert&amp;lt;Student&amp;gt;(
    new Student()
    {
        FirstName = “Tanzim”,
        LastName = “Saqib”,
        Email = “me@TanzimSaqib.com”,
        Website = “http://www.TanzimSaqib.com”&lt;/pre&gt;&lt;pre&gt;}, true);    // Use Transaction?&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;To make use of such transactional generic DbHelper, you might want to write a singeton DbHelper class like the following. You might notice that the class is singleton, it’s static and the DataContext is being used is private, and only initialized using the connection string if not yet.&lt;/p&gt;&lt;pre&gt;public static class DbHelper
{
    private const string CONNECTION_CONFIG_NAME = “StudentServerConnectionString”;

    private static StudentServerDataContext _StudentServerDataContext = null;

    public static StudentServerDataContext GetDataContext()
    {
        if(_StudentServerDataContext == null)
            _StudentServerDataContext = new StudentServerDataContext
                (ConfigurationManager.ConnectionStrings
                [CONNECTION_CONFIG_NAME].ConnectionString);

        return _StudentServerDataContext;
    }

    public static void CleanUp()
    {
        _StudentServerDataContext.Dispose();
        _StudentServerDataContext = null;
    }

    // … code edited to save space&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;On application wide error or on end you can dispose the context so CleanUp method is useful here. To implement an Insert method see the following. You will find I have used a TransactionScope which ensures that the transaction is taking place without any interruption. If there is really any error the scope.Complete() method never gets invoked. This is how it ensures that the code inside the TransactionScope is taking place as a transaction. It is available from .NET 2.0 framework.&lt;/p&gt;&lt;pre&gt;public static void Insert&amp;lt;T&amp;gt;(T t, bool isTransactional) where T : class
{
    if (isTransactional)
    {
        using (var scope = new TransactionScope())
        {
            Insert&amp;lt;T&amp;gt;(t);

            // On any Exception, Complete() method won’t be invoked.
            // So, the transaction will be automatically rollbacked.
            scope.Complete();
        }
    }
    else
        Insert&amp;lt;T&amp;gt;(t);
}

public static void Insert&amp;lt;T&amp;gt;(T t) where T : class
{
    using (var db = GetDataContext())
    {
        db.GetTable&amp;lt;T&amp;gt;().InsertOnSubmit(t);

        try
        {
            db.SubmitChanges();
        }
        catch (Exception e)
        {
            // TODO: log Exception
            throw e;
        }
    }
}&lt;/pre&gt;
&lt;p&gt;I did not show other methods as part of the CRUD implementation. The rest is left open for you to implement.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120075"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120075" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Saqib/aggbug/120075.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tanzim Saqib</dc:creator>
            <guid>http://geekswithblogs.net/Saqib/archive/2008/02/29/a-quottransactionalquot-generic-dbhelper-for-linq-to-sql.aspx</guid>
            <pubDate>Fri, 29 Feb 2008 02:29:09 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Saqib/comments/120075.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Saqib/archive/2008/02/29/a-quottransactionalquot-generic-dbhelper-for-linq-to-sql.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Saqib/comments/commentRss/120075.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Saqib/services/trackbacks/120075.aspx</trackback:ping>
        </item>
        <item>
            <title>HttpRequestFactory vs. XMLHttpRequest in Volta</title>
            <link>http://geekswithblogs.net/Saqib/archive/2008/01/25/httprequestfactory-vs.-xmlhttprequest-in-volta.aspx</link>
            <description>&lt;p&gt;HttpRequestFactory was designed for use by tiersplitting internally and was not supposed to be exposed as part of the Volta API as Danny van Velzen from Microsoft Volta team told me today. So, its better if you use XMLHttpRequest instead because this factory class might not show up in the later releases. You will find this class in Microsoft.LiveLabs.Volta.Xml namespace.  As like as JavaScript's one, in this .NET version you can also Open URL, specify method name, and of course pass credentials. You can track response text, xml, status code, status text and also you can abort. &lt;/p&gt; &lt;p&gt;To retrieve your content, you must subscribe to ReadyStateChange event with a HtmlEventHandler which you can find in Microsoft.LiveLabs.Volta.Html namespace and check the status code. If it is 200 that means "HTTP OK", you can take the ResponseText or ResponseXML. See this example:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;string &lt;/span&gt;content = &lt;span style="color: blue"&gt;string&lt;/span&gt;.Empty;
&lt;span style="color: blue"&gt;var &lt;/span&gt;request = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;XMLHttpRequest&lt;/span&gt;();

request.ReadyStateChange += &lt;span style="color: blue"&gt;delegate&lt;/span&gt;()
{
    &lt;span style="color: blue"&gt;if &lt;/span&gt;(request.Status == 200)
        content = request1.ResponseText;
};

request.Open(&lt;span style="color: #a31515"&gt;"POST"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"http://tanzimsaqib.com/feed/"&lt;/span&gt;, &lt;span style="color: blue"&gt;true&lt;/span&gt;);&lt;/pre&gt;However, you cannot fetch cross domain content by XMLHttpRequest. The Volta compiler creates client side JavaScript XMLHttpRequest and lets developers write code in .NET friendly way. So, I do not think there is any way to retrieve cross domain content in Volta, and leaving us on the same old HttpRequest class.&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118909"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118909" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Saqib/aggbug/118909.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tanzim Saqib</dc:creator>
            <guid>http://geekswithblogs.net/Saqib/archive/2008/01/25/httprequestfactory-vs.-xmlhttprequest-in-volta.aspx</guid>
            <pubDate>Fri, 25 Jan 2008 17:12:59 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Saqib/comments/118909.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Saqib/archive/2008/01/25/httprequestfactory-vs.-xmlhttprequest-in-volta.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Saqib/comments/commentRss/118909.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Saqib/services/trackbacks/118909.aspx</trackback:ping>
        </item>
        <item>
            <title>[New Article] Building a Volta Control : A Flickr Widget</title>
            <link>http://geekswithblogs.net/Saqib/archive/2008/01/18/new-article-building-a-volta-control--a-flickr-widget.aspx</link>
            <description>&lt;p&gt;This is my first article which is based on the first CTP of Volta considering its current limitations. You will see how you can create a Volta control that the compiler can convert into an AJAX Widget without requiring us writing a single line of JavaScript code: &lt;a title="http://dotnetslackers.com/articles/aspnet/BuildingAVoltaControlAFlickrWidget.aspx" href="http://dotnetslackers.com/articles/aspnet/BuildingAVoltaControlAFlickrWidget.aspx"&gt;http://dotnetslackers.com/articles/aspnet/BuildingAVoltaControlAFlickrWidget.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118671"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118671" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Saqib/aggbug/118671.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tanzim Saqib</dc:creator>
            <guid>http://geekswithblogs.net/Saqib/archive/2008/01/18/new-article-building-a-volta-control--a-flickr-widget.aspx</guid>
            <pubDate>Fri, 18 Jan 2008 15:38:12 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Saqib/comments/118671.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Saqib/archive/2008/01/18/new-article-building-a-volta-control--a-flickr-widget.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Saqib/comments/commentRss/118671.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Saqib/services/trackbacks/118671.aspx</trackback:ping>
        </item>
        <item>
            <title>Make HTML controls discoverable in Volta Control</title>
            <link>http://geekswithblogs.net/Saqib/archive/2008/01/03/make-html-controls-discoverable-in-volta-control.aspx</link>
            <description>&lt;p&gt;&lt;img src="http://labs.live.com/volta/images/logo-volta.png" /&gt; &lt;/p&gt;  &lt;p&gt;When a Volta control is rendered, the ID attribute of the generated HTML is changed to something like _vcId_1_DivName which is inconvenient to find from code. But the ID attribute stays the same in case of Volta Page, so it is discoverable by ID like this:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;Div &lt;/span&gt;divContent = Document.GetById&amp;lt;&lt;span style="color: #2b91af"&gt;Div&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"divContent"&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;

&lt;p&gt;However, if you add HTML controls to the control like the following, the ID is not changed during the rendering:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;VoltaControl1() : &lt;span style="color: blue"&gt;base&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"VoltaControl1.html"&lt;/span&gt;)
{
    InitializeComponent();

    &lt;span style="color: #2b91af"&gt;Button &lt;/span&gt;btnClick = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Button&lt;/span&gt;();
    btnClick.InnerText = &lt;span style="color: #a31515"&gt;"Click!"&lt;/span&gt;;
    btnClick.Id = &lt;span style="color: #a31515"&gt;"btnClick"&lt;/span&gt;;
    &lt;span style="color: blue"&gt;this&lt;/span&gt;.Add(btnClick);
}&lt;br /&gt;&lt;/pre&gt;

&lt;p&gt;If you don't prefer this way and seriously want to write your own HTML in the control's html page, you might find the following snippet useful. But, remember in this case you will use name attribute of the html element instead of ID.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: green"&gt;// Usage: var element = GetElementByName(Document.GetElementsByTagName("div"), "divWidget");
&lt;/span&gt;&lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;HtmlElement &lt;/span&gt;GetElementByName(&lt;span style="color: #2b91af"&gt;HtmlElementCollection &lt;/span&gt;elements, &lt;span style="color: blue"&gt;string &lt;/span&gt;name)
{
    &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(&lt;span style="color: blue"&gt;var &lt;/span&gt;element &lt;span style="color: blue"&gt;in &lt;/span&gt;elements)
    {
        &lt;span style="color: #2b91af"&gt;DomAttribute &lt;/span&gt;nameAttribute = element.Attributes.GetNamedItem(&lt;span style="color: #a31515"&gt;"name"&lt;/span&gt;);
        &lt;span style="color: blue"&gt;if &lt;/span&gt;(nameAttribute != &lt;span style="color: blue"&gt;null&lt;/span&gt;)
            &lt;span style="color: blue"&gt;if &lt;/span&gt;(nameAttribute.Value == name)
                &lt;span style="color: blue"&gt;return &lt;/span&gt;element;
    }

    &lt;span style="color: blue"&gt;return null&lt;/span&gt;;
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118631"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118631" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Saqib/aggbug/118631.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tanzim Saqib</dc:creator>
            <guid>http://geekswithblogs.net/Saqib/archive/2008/01/03/make-html-controls-discoverable-in-volta-control.aspx</guid>
            <pubDate>Thu, 03 Jan 2008 02:12:42 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Saqib/comments/118631.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Saqib/archive/2008/01/03/make-html-controls-discoverable-in-volta-control.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Saqib/comments/commentRss/118631.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Saqib/services/trackbacks/118631.aspx</trackback:ping>
        </item>
        <item>
            <title>Making cross domain AJAX call using Volta</title>
            <link>http://geekswithblogs.net/Saqib/archive/2008/01/02/making-cross-domain-ajax-call-using-volta.aspx</link>
            <description>&lt;p&gt;&lt;img alt="" src="http://labs.live.com/volta/images/logo-volta.png" /&gt; &lt;/p&gt;
&lt;p&gt;Making a cross domain AJAX call in Volta is piece of cake. Volta compiler generates necessary client codes to make it work. Here is a snippet that can make an AJAX call to some Url and fetch data:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="COLOR: blue"&gt;public void &lt;/span&gt;DownloadPhotos()
{
    &lt;span style="COLOR: #2b91af"&gt;IHttpRequest &lt;/span&gt;request = &lt;span style="COLOR: #2b91af"&gt;HttpRequestFactory&lt;/span&gt;.Create();
    request.AsyncSend(&lt;span style="COLOR: #a31515"&gt;"POST"&lt;/span&gt;, URL, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt;.Empty,
        &lt;span style="COLOR: blue"&gt;delegate&lt;/span&gt;(&lt;span style="COLOR: blue"&gt;string &lt;/span&gt;response)
        {
            OnPhotosLoaded(&lt;span style="COLOR: blue"&gt;new &lt;/span&gt;&lt;span style="COLOR: #2b91af"&gt;PhotosLoadedEventArgs&lt;/span&gt;(response));
        });
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Both IHttpRequest and HttpRequestFactory classes can be found in the Microsoft.LiveLabs.Volta.MultiTier namespace. AsyncSend method performs the asynchronous call and calls back the delegate defined where OnPhotosLoaded event is fired to notify the subscriber of this event that the data has just arrived.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118629"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118629" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Saqib/aggbug/118629.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tanzim Saqib</dc:creator>
            <guid>http://geekswithblogs.net/Saqib/archive/2008/01/02/making-cross-domain-ajax-call-using-volta.aspx</guid>
            <pubDate>Wed, 02 Jan 2008 00:49:15 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Saqib/comments/118629.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Saqib/archive/2008/01/02/making-cross-domain-ajax-call-using-volta.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Saqib/comments/commentRss/118629.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Saqib/services/trackbacks/118629.aspx</trackback:ping>
        </item>
        <item>
            <title>Namespace Alias Qualifier - to get rid of crazy coding</title>
            <link>http://geekswithblogs.net/Saqib/archive/2008/01/01/namespace-alias-qualifier---to-get-rid-of-crazy-coding.aspx</link>
            <description>&lt;p&gt;Let us say somebody in your company loves crazy coding and really do not bother about his/her codes affect others. (S)He put class name System and a constant Console and now wondering how come a simple Console.WriteLine does not compile:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="COLOR: blue"&gt;class &lt;/span&gt;&lt;span style="COLOR: #2b91af"&gt;System
&lt;/span&gt;{
    &lt;span style="COLOR: blue"&gt;int &lt;/span&gt;Console = 10;

    &lt;span style="COLOR: blue"&gt;static void &lt;/span&gt;Main(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;[] args)
    {
        &lt;span style="COLOR: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: #a31515"&gt;"Hello World!"&lt;/span&gt;); &lt;span style="COLOR: green"&gt;// Compile time error
        &lt;/span&gt;&lt;span style="COLOR: #2b91af"&gt;System&lt;/span&gt;.Console.WriteLine(&lt;span style="COLOR: #a31515"&gt;"Hello World!"&lt;/span&gt;); &lt;span style="COLOR: green"&gt;// Compile time error
    &lt;/span&gt;}
}&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;Making use of global::System.Console must solve your problem:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="COLOR: blue"&gt;class &lt;/span&gt;&lt;span style="COLOR: #2b91af"&gt;System
&lt;/span&gt;{
    &lt;span style="COLOR: blue"&gt;int &lt;/span&gt;Console = 10;

    &lt;span style="COLOR: blue"&gt;static void &lt;/span&gt;Main(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;[] args)
    {
        &lt;span style="COLOR: blue"&gt;global&lt;/span&gt;::System.&lt;span style="COLOR: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: #a31515"&gt;"Hello World!"&lt;/span&gt;);
        &lt;span style="COLOR: blue"&gt;global&lt;/span&gt;::System.&lt;span style="COLOR: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: #a31515"&gt;"Hello World!"&lt;/span&gt;); 
    }
}&lt;/pre&gt;
However, ever thought of a scenario where there can be same class name under two different namespaces? Here comes the role of Namespace Alias Qualifier. In namespace declaration by "using", aliases can be assigned to namespaces so that they might be useful in later part of the code as shorthand and most importantly will solve the problem of ambiguity:
&lt;pre class="code"&gt;&lt;span style="COLOR: blue"&gt;using &lt;/span&gt;sys = System;
&lt;span style="COLOR: blue"&gt;using &lt;/span&gt;mine = MyProject.Process;
...
...
sys.Console.WriteLine(mine.Console[&lt;span style="COLOR: #a31515"&gt;"width"&lt;/span&gt;]);&lt;/pre&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118468"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118468" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Saqib/aggbug/118468.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tanzim Saqib</dc:creator>
            <guid>http://geekswithblogs.net/Saqib/archive/2008/01/01/namespace-alias-qualifier---to-get-rid-of-crazy-coding.aspx</guid>
            <pubDate>Tue, 01 Jan 2008 13:00:12 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Saqib/comments/118468.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Saqib/archive/2008/01/01/namespace-alias-qualifier---to-get-rid-of-crazy-coding.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Saqib/comments/commentRss/118468.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Saqib/services/trackbacks/118468.aspx</trackback:ping>
        </item>
    </channel>
</rss>