Archive for the ‘Microsoft’ Category

C# Pagination for Facebook iFrame Applications

December 18, 2007

The original PHP code is from Ascanio Colonna (Link)



Cant wait for Linq?

May 11, 2007

If you like me and need Linq-like functionality now, then you have to give Subsonic a try over at CodePlex.

Version 2.0.1 has just been released. I’m a convert!

What SubSonic does for you:

  1. Trim hours from your DEV cycle. This not only happens because the code is generated for you initially, but it’s also maintained by SubSonic whenever you change your database.
  2. Gives you the option to go full-tilt OR/M, or use SPs/Views. We don’t want to tell you what to do, you already know best. We just want to help.
  3. Help your application build itself. With our generators (class, scaffold, and batch-class) your site can build itself in no time. The scaffolding will help you work with your data quickly.
  4. A solid foundation from which to extend. Our starter site comes pre-wired with ASP.NET membership built in, AJAX, full 3-column elastic XHTML theme, and user administration pages from which you can administer your site’s membership. That’s at least a week’s worth of work – already done!
  5. Get your project from idea to prototype in a fraction of the time. That’s the strength of this project – using our starter kit you can have a sharp prototype up and running in the merest fraction of what it used to take.


Remix in South Africa

May 10, 2007

From Ahmed’s blog

Remix in South Africa

Earlier this month we did MIX in Las Vegas and the feedback from the event was very positive. The good news is that we will be doing a lightweight version called Remix in Johannesburg – for free. There will be speakers coming out from Europe for this event.

The event is intended not just for developers but also designers and dev managers.

The tentative topics look like this. Note that the topics can change. In some cases there is some overlap with Devdays (done on purpose as Remix is in Johannesburg only) so you might want to look at what sessions you attend at Devdays if you intend going to both events.

Developer Track:

  1. Understand the future of web development
  2. Gain insight into how Visual studio “Orcas” will enable you to efficiently build AJAX applications
  3. Go deep with Silverlight
  4. Understand how to implement rich UI for web applications
  5. Learn how to mash-up Windows Live capabilities into your own applications.

Designer Track:

  1. Go deep on Expression Studio,
  2. Look at Windows Presentation Foundation in detail
  3. Understand how to design for Silverlight
  4. See how rich media can be used to optimise search engine results
  5. Understand how to work with video production,
  6. See real world examples of WPF in action.

Dates & Venues

Johannesburg: Monte Casino, (Johannesburg), 26th June 2007
To Register, click, Remix ‘07

Silverlight to support Opera

May 9, 2007

From Neowin

A new Silverlight developer reference graphic, displays an Opera icon — adorned with the tag “soon” — alongside the already-supported browsers (you can see it in the lower right-hand corner of the graphic).

Link to the graphic

Visual Studio 2005 SP1 Publish Bug: Index was outside the bounds of the array.

April 24, 2007

This bug which I’ve had to live with for a couple of months turns out to be as result of setting the Virtual Path to /.

Well, a hotfix that correctly fixes the problem was released today.
You can download it here.

Another link to save to your favorites is this one. The site hosts all high-impact hotfixes for Visual Studio and .NET.


ASP.NET Ajax Beta Released

October 1, 2006

There are some significant changes including:

  • $()
    is now $get(): This means that you can play nice with libraries such as
    prototype. It is really interesting that Microsoft took this step
    instead of saying “screw it. why should we change because of you” and
    instead decided to play really nice. If you do not care about prototype
    and co, you may prefer the simplicity of $()
  • Performance:
    “We have spent time optimizing the network traffic size of client
    JavaScript callbacks to the server. Controls like the UpdatePanel,
    UpdateProgress, and Control Toolkit controls no longer emit xml-script
    by default, and instead just emit 1-2 lines of JavaScript (which can
    help significantly reduce the network traffic size on the wire). We
    have also moved from using JavaScript closure-based classes to using
    prototype-defined classes in the core type system, which we’ve found
    reduces memory usage for most common application scenarios.”
  • File size:
    They took time to modularize the JavaScript, and you can download
    various parts and pieces instead of just the kitchen sink. I wonder if
    VisualStudio will be smart and auto include what you really need?
  • Browser Support: Safari is now officially support, with Opera in the works
  • Better Debugging Experience:
    They did a couple of things to help with the hell that can be
    JavaScript debugging: “1) By moving our JavaScript class definitions
    from being closure-based to prototype-based, you can now use the
    existing Visual Studio 2005 script debugger (and/or other existing
    JavaScript debuggers) to better inspect and step through JavaScript
    objects. Closures previously hid a lot of inspection information.2) We invested a lot of time putting together an automated
    JavaScript build environment that enables us to produce two versions of
    all of our JavaScript files: a retail version that is optimized for
    performance and download size, and a fully instrumented debug version
    that is optimized for helping you catch issues with your code during
    development. Every function within the debug version of our script
    files now includes parameter and argument validation code that verifies
    that the function is being passed the correct arguments before running,
    and that will assert with stack trace information if not. This can help
    to more easily pinpoint errors with your JavaScript code early, and
    hopefully significantly improve JavaScript debugging.”
  • Lots of Improvements in the Client Script Library Stack:
    “a) Simpler client JavaScript event model. It is now easier to define
    and attach events on the client. Object events are also now created on
    demand to reduce startup time and the size of the working set. b)
    Simpler Component, Behavior, and Control types. APIs can now be used
    without first needing to instantiate their related objects, and
    on-demand semantics have been added to improve performance. c) Client
    networking improvements. Default callback functions and method-name
    semantics provide a much easier way to perform common asynchronous
    callbacks. d) Membership and Profile APIs. Simpler APIs for interacting
    with the Membership and Profile APIs from client-side JavaScript are
    now supported.”


Prototype.js Framework calling ASP.Net Webserices

May 1, 2006

I’ve recently been stumped by a error I was getting when calling a ASP.Net Webservice from the ProtoType.js JavaScript Framework. The calls all worked great from IE7, Firefox and Opera 9 on my local machine, but failed when testing IE6 on a virtual machine. It turns out that you need to enable the Web Service Protocols your server permits as discribed on this Microsoft Support Page.You can solve the problem by adding the following lines to your web.config file under the system.web section The other issue I found was that the Prototype framework was adding an extra
parameter to all calls. The &_= parameter was added to address a
Safari bug
which had later been resolved with another fix. The
following line is therefore not needed and can be safely removed.

if (parameters.length > 0) parameters += ‘&_=’;