Tuesday, June 30, 2009

NotAvailableException was unhandled

Off late I developed another new aspect of my field and I am now challanging myself now into yet another field of programming..... GAME DEVELOPMENT.

Startd off with a very simple yet very effective tutorial found at
http://blogs.msdn.com/coding4fun/archive/2006/11/03/940223.aspx

The moment I had everything set up nicely for my first DirectX application to run, it failed with a very strange exception
"NotAvailableException"

Well after a decent amount of search... I could finally get the solution.. and was really very embarassed to see that to be a problem..

I was using the Generic Video Card Drivers that were being installed by default by windows and all it needed was to install the latest Video Card Drivers from the vendor's site and VIOLA...
It works..

Learning - Before any Dx programming, make sure you are up to date with the Drivers for all your hardware....

Njoy :)

Thursday, May 28, 2009

The changes you have made require the following tables to be dropped and re-created

This morning working on newly installed SQL 2008, I stumbled across this strange problem.

Now at first go, it did not look too severe a problem and I tried to go through the options under tools menu to find out if there was any such option available.

An here is the answer:-








NJoy :)
Ashutosh

Wednesday, April 29, 2009

Adding multiple XAMLs to a single XAP file

Just recently I started learning Silverlight and its pretty cool. I am loving it and trying to find new things everyday out of it.
Today, while working with the XAMLs and XAPs, I noticed that the Silverlight controls when referred onto an ASPX page, uses the XAP as the source.
Now thats where I had an issue.
I had created quite a few UserControls (XAMLs) on a single XAP and had no clue how to distinguish them on the ASPX page.
Here is the solution to it.

For the purpose of differenciating between the two controls, we use its InitParameters property.



As shown in the image above, I had multiple XAMLs for a single XAP

Now I had two ASCX user controls. One of them needed Page.Xaml and the other needed TeamToolbar.xaml.

So to distinguish between the two, I had the following declarations:

On the Page.Ascx -

<asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/AllCoders.xap" InitParameters="ControlID=Page" Width="100%" Height="100%">

And on the TeamToolbar.ascx -

<asp:Silverlight ID="Xaml2" runat="server" Source="~/ClientBin/AllCoders.xap" InitParameters="ControlID=TeamToolBar" Width="100%" Height="100%">



And on the App.xaml.cs, where its all initialized, we need to check which control is to be loaded.



In the Application_Startup method, this is how we need to check for it.: