Blog of a Filipino Developer about C#, VB.NET, ASP.NET, Java, PHP, SQL Server, MySql and Oracle RSS 2.0
# Wednesday, March 05, 2008

My wife and I went to the Heroes Happen {here} event in Los Angeles, CA last month and boy, it was a blast! The event was a fullhouse with hundreds of developers and IT professionals attending this big day. My wife took some photos of me at the event during idle time and this is what came up.

{ Staring at (IT) Heroes }

---

{ Is dot you? }

---

{ Waiting to launch }

---

{ Curly-braced couple }

---

{ I was there! }

---

{ DevPinoy.org was there too! =) }

---

{ Someday, in God's time DevPinoy will be a platinum sponsor in one the Microsoft events. Heheh!
My wife told me to take a picture of this banner and put the DevPinoy logo to it and right there and then I caught a vision. }

---

We had fun that day. I'm really thankful that my wife is a techie like me because we can go to the same conference and enjoy the same technology. I saw Woody at the event and as always he is a cool guy. Hmmm.. I wonder if all MS Developer Evangelist are like him. Hehehe!

The next launch event that we are going to attend is the San Diego launch event which is happening sometime around May. Yipee!

Wednesday, March 05, 2008 3:17:39 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
All about Keith
# Wednesday, February 27, 2008

Heroes Happen Here 

Yup! Me and my wife are coming to the VS 2008 Kickoff event in Los Angeles today. Wohoo! This is the first time we'll see Bill Gates live in person and we are excited about it.

Wohoo!

I'll post some pictures here tommorow to show you guys what transpired at the Nokia Theatre and Los Angeles Convention Center.

See yah at the event!

Wednesday, February 27, 2008 2:27:52 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
All about Keith | Tech News and Issues
# Tuesday, February 26, 2008

I've gotten this question 3 times in different flavors since last week and I've decided that it's time to post the solution in my blog. I've added comments on the code to explain what every line is doing.

The code below will demonstrate how you can read the assembly information in both C# and VB.NET.

[------------------ C# ------------------]

using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.IO;

namespace KeithRull.ReadingAssemblyInformation
{
    /// <summary>
    /// A sample program that demonstrates how to get the
    /// Assembly information. This is useful when you want
    /// to see the version of your class library.
    /// </summary>
    class Program
    {
        static void Main(string[] args)
        {
            //create a new assembly object that would signify
            //the current running assembly
            Assembly currentAssembly = Assembly.GetExecutingAssembly();

            //create the dictionary object that would contain
            //all the information about our assembly
            Dictionary<string, string> dictionaryOfProperties 
                        = GetAssemblyInfoDictionary(currentAssembly);

            //iterate thru each key in the dictionary
            foreach (string key in dictionaryOfProperties.Keys)
            {
                //print the key and its value
                Console.WriteLine("{0}: {1}", key, dictionaryOfProperties[key]);
            }

            //pause
            Console.ReadLine();

        }

        /// <summary>
        /// A method that returns a Dictionary of Assembly properties
        /// </summary>
        /// <param name="selectedAssembly">The assembly to inspect</param>
        /// <returns>The dictrionary containing the assembly information</returns>
        public static Dictionary<string, string> GetAssemblyInfoDictionary(Assembly selectedAssembly)
        {
            //Create the dictionary
            Dictionary<string, string> dictionaryOfProperties 
                                    = new Dictionary<string, string>();

            //get the location of the assembly
            string assemblyPath = selectedAssembly.Location;
            //add the assembly location to out dictionary
            dictionaryOfProperties.Add("AssemblyLocation", assemblyPath);

            //create the AssemblyName object based on our Assembly
            //this will enable us to get the version information
            //and other properties related to our assembly
            AssemblyName assemblyName = selectedAssembly.GetName();

            //add the FullName of out assembly
            dictionaryOfProperties.Add("AssemblyFullName", assemblyName.FullName);
            dictionaryOfProperties.Add("AssemblyName", assemblyName.FullName);

            //add the assembly version information
            dictionaryOfProperties.Add("Version", assemblyName.Version.ToString());
            dictionaryOfProperties.Add("Version.Major", assemblyName.Version.Major.ToString());
            dictionaryOfProperties.Add("Version.Minor", assemblyName.Version.Minor.ToString());
            dictionaryOfProperties.Add("Version.Build", assemblyName.Version.Build.ToString());
            dictionaryOfProperties.Add("Version.Revision", assemblyName.Version.Revision.ToString());
            
            //add the creation time
            DateTime creationTime = File.GetCreationTime(assemblyPath);
            dictionaryOfProperties.Add("CreationTime", creationTime.ToString());

            //add the last write time
            DateTime lastWriteTime = File.GetLastWriteTime(assemblyPath);
            dictionaryOfProperties.Add("LastWriteTime", creationTime.ToString());

            //return our dictionary obeject
            return dictionaryOfProperties;
        }
    }
}

[------------------ VB.NET ------------------]

Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Reflection
Imports System.IO

Namespace KeithRull.ReadingAssemblyInformation
    ''' <summary> 
    ''' A sample program that demonstrates how to get the 
    ''' Assembly information. This is useful when you want 
    ''' to see the version of your class library. 
    ''' </summary> 
    Module Program
        Sub Main(ByVal args As String())
            'create a new assembly object that would signify 
            'the current running assembly 
            Dim currentAssembly As Assembly = Assembly.GetExecutingAssembly()

            'create the dictionary object that would contain 
            'all the information about our assembly 
            Dim dictionaryOfProperties As Dictionary(Of String, String) = GetAssemblyInfoDictionary(currentAssembly)

            'iterate thru each key in the dictionary 
            For Each key As String In dictionaryOfProperties.Keys
                'print the key and its value 
                Console.WriteLine("{0}: {1}", key, dictionaryOfProperties(key))
            Next

            'pause 
            Console.ReadLine()

        End Sub

        ''' <summary> 
        ''' A method that returns a Dictionary of Assembly properties 
        ''' </summary> 
        ''' <param name="selectedAssembly">The assembly to inspect</param> 
        ''' <returns>The dictrionary containing the assembly information</returns> 
        Public Function GetAssemblyInfoDictionary(ByVal selectedAssembly As Assembly) As Dictionary(Of String, String)
            'Create the dictionary 
            Dim dictionaryOfProperties As New Dictionary(Of String, String)()

            'get the location of the assembly 
            Dim assemblyPath As String = selectedAssembly.Location
            'add the assembly location to out dictionary 
            dictionaryOfProperties.Add("AssemblyLocation", assemblyPath)

            'create the AssemblyName object based on our Assembly 
            'this will enable us to get the version information 
            'and other properties related to our assembly 
            Dim assemblyName As AssemblyName = selectedAssembly.GetName()

            'add the FullName of our assembly 
            dictionaryOfProperties.Add("AssemblyFullName", assemblyName.FullName)
            'add the Name of the assembly
            dictionaryOfProperties.Add("AssemblyName", assemblyName.Name)

            'add the assembly version information 
            dictionaryOfProperties.Add("Version", assemblyName.Version.ToString())
            dictionaryOfProperties.Add("Version.Major", assemblyName.Version.Major.ToString())
            dictionaryOfProperties.Add("Version.Minor", assemblyName.Version.Minor.ToString())
            dictionaryOfProperties.Add("Version.Build", assemblyName.Version.Build.ToString())
            dictionaryOfProperties.Add("Version.Revision", assemblyName.Version.Revision.ToString())

            'add the creation time 
            Dim creationTime As DateTime = File.GetCreationTime(assemblyPath)
            dictionaryOfProperties.Add("CreationTime", creationTime.ToString())

            'add the last write time 
            Dim lastWriteTime As DateTime = File.GetLastWriteTime(assemblyPath)
            dictionaryOfProperties.Add("LastWriteTime", creationTime.ToString())

            'return our dictionary obeject 
            Return dictionaryOfProperties
        End Function
    End Module
End Namespace

HTH ;)

 

Tuesday, February 26, 2008 5:16:53 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
.NET | Tutorial
# Monday, February 25, 2008

I've been working on ASP.NET AJAX eversince it's beta days and the UpdateProgress and UpdatePanel has been my bestfriend since day one. I've learned a few tricks while using ASP.NET and today I'd like to share with you several ways to customize the look and feel of you UpdateProgress control with this sample solution. I have created a sample application that would demonstrate different ways to position your UpdateProgress control in the web browser. 

The samples included in the solution is as follows:

  • Sample 1

    The usual ASP.NET AJAX UpdateProgress control usage. This demonstrates the typical use of the UpdateProgress control in an application

  • Sample 2

    An ASP.NET AJAX UpdateProgress control positioned in the top right of the browser. (GMAIL like behavior)

  • Sample 3

    An ASP.NET AJAX UpdateProgress control positioned in the top right of the browser with a transparent gray background. (GMAIL like behavior)

  • Sample 4

    An ASP.NET AJAX UpdateProgress control positioned in the top right of the browser with a transparent gray background and the notification following the scrollbar position (fixed position).

  • Sample 5

    An ASP.NET AJAX UpdateProgress control positioned in the middle of the browser with a transparent gray background.

  • Sample 6

    An ASP.NET AJAX UpdateProgress control positioned in the middle of the browser with a transparent gray background and the notification following the scrollbar position (fixed position).

  • Sample 7

    An ASP.NET AJAX UpdateProgress control that uses the AlwaysVisibleControlExtender trick to place the progress notification at the top right of the browser.

  • Sample 8

    An ASP.NET AJAX UpdateProgress control that uses the AlwaysVisibleControlExtender trick to place the progress notification at the middle of the browser.

The project includes all aspx files, images and stylesheets that demonstrates effective UpdateProgress notifications. You can checkout the running sample of this ASP.NET AJAX project at the DevPinoy.org demo site

I hope what I shared with you can be useful in your daily life as a .NET developer. If you are interested you can download the source code for the whole project here: KeithRull.BuildingABetterAJAXLoadingNotification.zip (191.48 KB)

Monday, February 25, 2008 11:13:42 PM (GMT Standard Time, UTC+00:00)  #    Comments [4] -
.NET | AJAX | ASP.NET | Tutorial
# Saturday, February 23, 2008

Never use your computer when you are sleepy. Period.

I woke up this morning and I immediately saw my pc with some Internet Explorer windows open so I immediately sat down and tried to delete the cookies and form data from machine but instead of deleting the cache I accidentally deleted the IE icon in my desktop. Imagine how absolutely annoyed I felt at myself that time, so early in the morning. I've got top of the line hardware and I have what could be the world's most seamless Internet speed in the form of O2 broadband, but somehow I got myself stuck in blackhole thanks to a minor mistake I made while half awake.

Anyway, I need to restore it and found this link that show you how you can do it.

Basically, all you need to do is run regedit.exe

Navigate to: HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ HideDesktopIcons \ NewStartPanel

and change the value of the key {871C5380-42A0-1069-A2EA-08002B30309D} to 0

And that should do the trick ;)

Note to self: Never use the computer when you are sleepy.

Saturday, February 23, 2008 6:40:37 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Vista Tweaks
Archive
<March 2008>
SunMonTueWedThuFriSat
2425262728291
2345678
9101112131415
16171819202122
23242526272829
303112345
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Keith Rull
Sign In
Statistics
Total Posts: 271
This Year: 0
This Month: 0
This Week: 0
Comments: 182
Themes
Pick a theme:
All Content © 2010, Keith Rull
DasBlog theme 'Business' created by Christoph De Baene (delarou)