Welcome to Bilal Haidar [MVP, MCT] Official Blog Sign in | Join | Help

Visual Studio 2008 tips/tricks: Immediate Window Not Showing

Sometimes, the *Immediate Window* doesn't show when working inside the Visual Studio 2008. To show that window, follow these steps:

  1. Right-click on the VS Toolbar.
  2. Click on the *Customize* entry
  3. Go to the *Command* tab
  4. Select the *Debug* under the *Categories* list box.
  5. On the *Command* list box to the right-side, select the *Immediate* entry and drag it to the VS toolbar.

 

Hope this helps,

Regards

Posted by BilalHaidar [MVP] | 0 Comments
Filed under:

Why UpdateProgress Not Showing Sometimes?

I was stuck this afternoon while working on a very simple AJAX task when the UpdateProgress stopped showing for some reason when an asynchronous request is fired!

I browsed a bit online and found this nice blog post: Why the UpdateProgress won't display. I strongly recommend you read that blog post!

The UpdateProgress controls stops showing or displaying when the control that fired the asynchronous event is located outside the UpdatePanel that the UpdateProgress is attached to or when the ChildrenAsTriggers property on the UpdatePanel is set to false.

Why is this? Let us have a look at this sample code from the AJAX library:

     function Sys$UI$_UpdateProgress$_handleBeginRequest(sender, arg) {
        var curElem = arg.get_postBackElement();
        var showProgress = !this._associatedUpdatePanelId;
        while (!showProgress && curElem) {
            if (curElem.id && this._associatedUpdatePanelId === curElem.id) {
                showProgress = true;
            }

            curElem = curElem.parentNode;
        }
        if (showProgress) {
            this._timerCookie = window.setTimeout(this._startDelegate, this._displayAfter);
        }
    }

Without going into too much details look at the line bolded above! The UpdateProgress control hooks to the BeginRequest of the PageRequestManager. What happens inside this handler mainly in the bolded line shows that, only when the event is fired from inside the UpdatePanel associated to the UpdateProgress control, this controls displays its UI.

I have written articles on ASP.NET AJAX and never noticed this :). The more you learn, the more you realize there are still things missing!!!

The solution as proposed by the above link, is to hook yourself to the BeginRequest event of the PageRequestManager and display the UpdateProgress!!

 

Hope this post helped you!
Regards

 

Posted by BilalHaidar [MVP] | 0 Comments
Filed under:

Patterns and Practices: New Pocket Guides

New Pocket Guides are now available from the Patterns and Practices website. The guides include:

  1. Agile Architecture Method Pocket Guide
  2. Web Architecture Pocket Guide
  3. Mobile Architecture Pocket Guide
  4. RIA Architecture Pocket Guide
  5. Rich Client Architecture Pocket Guide
  6. Service Architecture Pocket Guide

To download them, go to the website at: http://www.codeplex.com/AppArch

Thank to Raed for pointing out these guide for me.

 

HTH,
Regards

OpenAccess by Telerik

OpenAccess by Telerik provides the following features:

  • Forward and Reverse Mapping for 6 databases
  • Step-by-step Visual Studio wizards
  • Disconnected API
  • Transparent Persistence, Lazy Loading
  • LINQ support
  • Synchronized distributed Level 2 cache
Make sure to check it out here: OpenAccess by Telerik

Regards

 

Posted by BilalHaidar [MVP] | 0 Comments
Filed under:

URL Rewrite Module for IIS 7.0

I came across the URL Rewrite Module for IIS 7.0. That was released by the IIS Team on November 10th 2008. Check out the release page here:
URL Rewrite Module  - Release to Web

The module has so many important features that any ASP.NET developer should have a look at.

 

Hope this helps,
Regards

Posted by BilalHaidar [MVP] | 0 Comments
Filed under: ,

ASP.NET AJAX's CompositeScript in .NET 3.5 SP 1

The .NET 3,5 SP1 adds several features to the .NET products. One of the major improvements in my opinion regarding the ASP.NET AJAX 3.5 is the CompositeScript.

Usually, when you place a ScriptManager instance on the page, you include several scripts and you place them within the Scripts class collection. This means, if you had like 5 scripts to load, you will have 5 different calls to the server to request the 5 script files.

The improvement in .NET 3.5 SP1 is the addition of the CompositeScript class that allows you to group a collection of script files and have them rendered to the cllient as a single script file and hence instead of requesting 5 script files (according to the example above), you will be requesting a single script and hence minimized the requests to server from 5 to 1.

<asp:ScriptManager ID="ScriptManager1" runat="server">
<CompositeScript>
<Scripts>
<asp:ScriptReference Path="~/Scripts/Script1.js" />
<asp:ScriptReference Path="~/Scripts/Script3.js" />
</Scripts>
</CompositeScript>
</asp:ScriptManager>

 As you can see this has a great improvement in performance since less requests will be issued to the server.

 

Regards

 

My presentation in Barcelona TechEd 2008 - Speaker Idol

For those of you interested in checking out the presentation I delivered during the Speaker Idol competition (where I came second in my heat), here is the link:

http://www.microsoft.com/emea/teched2008/developer/default.aspx

Browse to Page 3, the last bottom-right video!

 

Regards

Microsoft RampUp !!!

Today I had few hours to help the RampUp stand at the Microsoft TechEd 2008 in Barcelona.

Johanna White, the Program Manager for this RampUp was there together with Doug Turnure, it was just great few hours we spent them together!

 

Check out the Ramp Up (http://msdn.microsoft.com/en-us/rampup/default.aspx)

RampUp is a new program from Microsoft to provide >>FREE<<  E-Learning online. Just sign in with your passport account and access so many material there that is updated regularly.

 

And here is the famous Johanna :)

http://aspnetpodcast.com/CS11/photos/random_pics/images/1149/original.aspx

All of luck Johanna with the RampUp!!

 

Regards

Barcelona TechEd Developers 2008 - Speaker Idol

I am participating in the Speaker Idol competition in the TechEd Developers 2008 and my first presentation is tomorrow, Monday November 10th 2008 at 7:00 PM. If you are around, come check Heat 1 ;)

 

Regards

Professional ASP.NET 3.5 Security, Membership, and Role Management with C# and VB.NET In Stock

Old news I guess, my first ASP.NET book is now in stock on www.amazon.com.

Check it out, buy it if you feel it is important for you :)

 

Here is the link: Professional ASP.NET 3.5 Security, Membership, and Role Management with C# and VB.NET

Enjoy it!

Regards

SendKeys in C#

I had a need to execute some Windows Keystrokes in an application we are developing inside Windows Explorer, it is a Shell Namespace Extension, a virtual drive for an in-house EDMS. The keystroke to execute was an "F5" key. In other words, after performing an operation, I wanted to programamtically hit F5.

I posted on one of the forums and they refered me to this article: SendKeys in C++. It happened that this article is also written by a Lebanese guy, Elie :)

So I read this article and tried to search for SendKeys in C# and found a link to the System.Windows.Forms.SendKeys class that you can reach here: SendKeys in C#. Not only this class can be used within Windows Applications, but also within applications developed against Windows operating system itself, mainly a Shell Namespace Extension.

The way to execute a keystroke is simply call the following:

SendKeys.Send("{F5}");

 

That's all what you need to do!

Regards

Posted by BilalHaidar [MVP] | 0 Comments
Filed under:

Windows Azure

My colleague at work had the chance this year to participate in PDC 2008, and she informed us today about the Windows Azure.

Check more information here: www.azure.com

 

It is a new life we have to start now :D

Hope you like it!

 

Regards

 

Creating a Dynamic Data-Driven User Interface

Scott Michelle has an amazing series on building Dynamic Data-Driven User Interfaces with ASP.NET. You can check the series here:

Part 1

Part 2

Part 3

Part 4

 

Enjoy the series!
Regards

Posted by BilalHaidar [MVP] | 2 Comments
Filed under:

XAML Intellisense Broken in VS 2008

I faced a problem today where the XAML Intellisense was broken inside the XAML Browser in VS 2008. I researched a bit on the internet and found the following link that helped me solve the problem. The problem appears when you install the Windows SDK after you have installed VS 2008.


Here is the link: Installing Win SDK after VS2008 breaks XAML Intellisense

 

Hope this helps,
Regards

Posted by BilalHaidar [MVP] | 0 Comments
Filed under: , ,

this.Age++; (2008)


Yes true, today (October 22nd 2008) is my 28th birthday.

I usually don't celebrate this ceremony, doesn't mean much for me in fact, just a date that made me open my eyes on this life. Fine, no problem.

Usually when it is someone's birthday, they say "Happy Birthday". What if that person is not that happy? Will it be "Sad Birthday"? Fair enough

28 years of what?
Childhood during civil war in Lebanon? Fine
Not interesting schools? Fine

Good/Sad/Painful days at university? Fine
Graduating with 3 majors and average of 94/100? Not bad

Bad/Depressing days in my military service? Fine

Working at the first company for one year? Not bad
Working for CCC for the last 3 years? Not bad

Getting an MVP? Good
Nominating others for being MVPs? True

Author, publishing articles? hmmm, well good
Author publishing a book? Again it is better

Person with a caring family? Perfect
Person caring for his family? Again it is perfect

Person helping others? Wow nice
Person getting help from others? Thank you

Person feeling love? Good
Person feeling hatred? Too bad

Person hurting others? Too bad, didn't mean this usually
Person getting hurt from others? It is a fact, but you can be forgotten like anyone else ....

Person breaking others' hearts? True, mistkanes happen sometimes
Person with broken heart? It is ok, what is important others to be happy, you broken heart? Nah, not a big deal.... Stay cool

 

Well, the only thing *Happy* for the above, I tried and always try to live my life on *My Way*. And here I am today, celebrating my birthday on *My Way*, with my own words and thoughts, wishing all those whose birthday is same as mine, a good and happy birthday.

It is not what you own, it is what you give.
It is not what you think, it is what you do.
It is not what they want, it is what you want.
It is not the age, it is the spirit.
It is not the birthday; it is the years passing....
It is not what happenED, it is what WILL happen....

Finally, I would like to dedicate, myself and all those who were born on the same day, the song "I Did It My Way".

------------------------------------------------------------------------------------
And now, the end is here
And so I face the final curtain
My friend, I'll say it clear
I'll state my case, of which I'm certain
I've lived a life that's full
I traveled each and every highway
And more, much more than this, I did it my way

Regrets, I've had a few
But then again, too few to mention
I did what I had to do and saw it through without exemption
I planned each charted course, each careful step along the byway
And more, much more than this, I did it my way

Yes, there were times, I'm sure you knew
When I bit off more than I could chew
But through it all, when there was doubt
I ate it up and spit it out
I faced it all and I stood tall and did it my way

I've loved, I've laughed and cried
I've had my fill, my share of losing
And now, as tears subside, I find it all so amusing
To think I did all that
And may I say, not in a shy way,
"Oh, no, oh, no, not me, I did it my way"

For what is a man, what has he got?
If not himself, then he has naught
To say the things he truly feels and not the words of one who kneels
The record shows I took the blows and did it my way!
-------------------------------------------------------------------------------------

 

Regards,
Posted by BilalHaidar [MVP] | 1 Comments
Filed under:
More Posts Next page »