Thursday, 20 March 2008

Post - .NET User Group 5 - Introduction to the ASP.NET MVC Framework

19032008042aWow! We got 50 people last night! See the crowd, it's really amazing.

This is the first time I met JD and he is a very nice guy. I was shocked that he's younger than me and started programming when he's about 8 (very geeky! :P). He gave us a very good introduction to the MVC Framework, which was not too overwhelming, just right, especially everyone in the room has just finished a whole day of work and looking forward to Easter weekend. JD has presented quite a number of demos and that helped me to absorb the ideas a lot easier (Here you can download the slides and demo). I have to admit that although the MVC concept born before my time, I only have a really high level understand of it. Now I know a bit more and ready to test this .NET MVC framework out.

19032008046a Overall it's a very good night. I saw many old faces and some new faces,  including some girls I've never met before (you know, there are really not many girls around). For some people this is the first time they come to our events, and they asked how often do we have such event and commented it is a very good one because it also allows people from the MS community to meet each other. I was happy to hear that. It's good that everyone's happy. I like to see people are happy.

19032008050bThis time we have vegetarian, chicken, seafood and normal pork pizzas, but I think we should have ordered 1 more vegetarian pizza. Interestingly no matter how many pizzas we order, there are always some leftover. André said people tend to not eat the last few pieces. I asked JD to bring some back to Wellington but he said his bag could not fit them. Ivy took away one, Pedro took some for breakfast (he likes cold pizzas), and we still have about two pizzas left. Oh well, better than not enough. :)  I wasn't very hungry, but still have eaten many pizzas. Dinuka captured a picture of me concentrating, "investigating" the seafood pizzas and try to "calculate" how much more I can eat.

As a conclusion, it's all good! ;)

Friday, 7 March 2008

No more "Click to activate and use this control" (2)

See: No more "Click to activate and use this control"

Actually, I have another approach to this problem.

First of all, create an external js file with the following code:

objects = document.getElementsByTagName("embed");
for (var i = 0; i < objects.length; i++)
{
objects[i].outerHTML = objects[i].outerHTML;
}

OR

objects = document.getElementsByTagName("object");
for (var i = 0; i < objects.length; i++)
{
objects[i].outerHTML = objects[i].outerHTML;
}

Depends on whether you use <OBJECT> tag or <EMBED> directly.

Then at the very bottom of your HTML page, add the script reference in:

<script type="text/javascript" src="objupdate.js"></script>

Remember you need open tag and close tag. Using <script /> sometimes would not work.

Tuesday, 4 March 2008

Starting New WPF App Error: Cannot convert string 'pack://application:,,,/

This error is quite interesting. It appears straight after you create a new WPF project, i.e. Windows1.xaml is empty.

 image

By changing the Device Profile in Color Management to System Default, this problem goes away

 image

image

It is even more interesting that if you have your project open and change the Device Profile back to something else, the error would not reappear. However If you close the project and open it again, it will.

So anyone knows what’s the difference between all these profiles?

image

2008 Summer Road Trip - Slides and Code!

Yes! We do have the code and slides for the summer road trip!

Code: RoadTripCode.zip (3.90MB)
Slides: SummerRoadTrip.pptx (1.35MB)

According to Jeremy,

The Code package contains a quick README on getting things set up, feel free to comment if you have more detail you want to add to this, however be warned you will want to put this in a PRE-PRODUCTION / TEST environment as it makes use of many beta bits such as SQL Server 2008 and the Entity Framework.
If you are looking to build such a VM up from scratch then these instructions may help you out in terms of what you need to install..
1. Windows Server 2008 Enterprise with No Hyper-V operating system installation
    - Roles: Web Server, File Services, Application Server: Enable TCP and Named Pipe Activation and Distributed Transactions  
    - Features: Windows Powershell, Telnet Client
2. Visual Studio 2008
3. SQL Server 2008 CTP 6
    - Install only Database Server, Books Online and Client Tools
    - Execute sp_filestream_configure @enable_level = 2 after server has installed
    - Create C:\FSData directory locally for storing filestream data for the Road Trip database
4. Entity Framework Beta 3
    - Also install Visual Studio hotfix for Entity Framework Beta 3
    - Also install Entity Framework Tools for Visual Studio

Have fun with the code and slides!