Fork me on GitHub

Wednesday, June 10, 2009

Reminder to self: How to use ASP.NET AJAX PageMethods

posted by Lars Hundebøl # 1:45 p.m.

I keep forgetting how to use the ASP.NET AJAX PageMethods (.NET 3.5), so here is a short examples that gets me up to speed:

In Default.aspx.cs insert the following static method declared with the WebMethod attribute:

[WebMethod]
public static Person DoSomethingServerSide(
  string name, string email)
{
  Person p = new Person()
  {
    Name = name,
    Email = email
  };

  return p;
}

...and in the Default.aspx insert some JavaScript that leverage this PageMethod:

function DoSomethingClientSide()
{
  PageMethods.DoSomethingServerSide(
    "Test", "test@test.com", Callback);
}

function Callback(res)
{
  alert(res.Name + " " + res.Email);
}

And that's it... no wonder I keep forgetting how easy it is.

Gravatar of propellerhead

propellerhead

 
Oh yeah: Forgot to mention that an asp:scriptmanager tag also must be on the page (or master).
 

leave comment

Saturday, May 2, 2009

PropellerHead Now Cornified

posted by Lars Hundebøl # 7:48 a.m.

Sunday, April 26, 2009

Installing Ruby on Rails on Windows with SQLite

posted by Lars Hundebøl # 9:12 a.m.

The following is a step-by-step guideline to how I installed Ruby On Rails for Windows with SQLite as the database.

  1. Download the latest version of Ruby One-Click installer for Windows here, and run the installer. This will install Ruby (naturely) and RubyGems, the package manager for Ruby.

    At the time of writting this tutorial, I downloaded and installed Ruby-186-26 (stable).

  2. Update RubyGems by executing the following line in a command prompt:

    gem update --system
    


  3. Now install Rails using RubyGems, by executing the following line in a command prompt:

    gem install rails --include-dependencies
    

    This will install Rails and all relevant dependencies. Please note that this may take some time to install.

  4. Download the lastest SQLite from here, and unzip it into the Ruby bin directory (by default c:\ruby\bin). You'll only need the pre-compiled DLL; at the time of writing, the version I downloaded and unzipped was sqlitedll-3_6_13.zip.

  5. Finally install SQLite3-Ruby using RubyGems, by executing the following line in a command prompt:

    gem install sqlite3-ruby -v 1.2.3
    


    By the time of writing version 1.2.3 was the latest version actually working with Windows.

I've used the installation guideline on Windows Vista and Windows 7 (Build 7000) without any problems. The latest version of Ruby on Rails is preconfigured to use SQLite, and therefore no additional configuration is required after creating a new rails project.

leave comment

Monday, April 20, 2009

Old School Google

posted by Lars Hundebøl # 4:25 p.m.

Back in the days, Google was a little more primitive.

leave comment

Tuesday, April 14, 2009

Bootable USB

posted by Lars Hundebøl # 8:12 a.m.

Links to instructions on how to install Windows, using a bootable USB, on e.g. a netbook without a CD/DVD drive:

http://kmwoley.com/blog/?p=345

http://www.liliputing.com/2008/04/install-windows-xp-on-mini-note-usb.html

leave comment

Friday, March 20, 2009

Viva la MIX

posted by Lars Hundebøl # 9:50 p.m.

This years MIX has just ended, and I've learned a lot of new technologies and methods, that I want to share with the rest of Creuna.

My focus on the conference have primarily been to learn more about the designer-developer workflow, and to learn more about the different Microsoft technologies such as the beta release of Silverlight 3, and the first official release of ASP.NET MVC.

Hopefully these last couple of days here in the meadows, will end up as two presentation; a presentation about workflows and a tech talk about Silverlight 3.

I'll recomend that you check out the visitmix.com/2009 site for all the sessions, which all have been recorded. This year there were roughly 55 session, where I only were able to attend 10 of them.

leave comment

Friday, March 20, 2009

SketchFlow - prototyping by Microsoft

posted by Lars Hundebøl # 4:18 p.m.

At MIX 09 this week, Microsoft released the prototyping tool SketchFlow. SketchFlow allows the designer, to "sketch" up a simple prototype, using a combination of flow diagrams and hand drawn pictures or controls that looks hand drawn.

By using Silverlight, SketchFlow can create a prototype that easily can be shared with the client using the Web, and with annotating tools, the client can comment on different aspects of the prototype.

In that the prototype is a Silvelight application, it is also possible to use animations, within the prototype, to better illustrate different transition within the proposed application. There is also the added benefit of using this tool when developing Silverlight and WPF applications, it that the prototype can easily be used as the base for the actual implementation (check out the MIX 09 day 1 keynote).

Not knowing existing prototyping tools, I can't say whether or not this product is all that different from existing prototyping tools. The SketchFlow will be able for preview later this yaer.

leave comment

Thursday, March 19, 2009

Silverlight 3 - the morning after

posted by Lars Hundebøl # 4:37 p.m.

In all my excitement yesterday, I forgot some of the crucial items on my personal wish list for Silverlight, which still is not supported by Silverlight 3. Unfortunately there is no support for webcams or microphones, as there is in Flash, and most regrettably there is no support for printing.

Microsoft said they working hard to get support for printing, so hopefully we might see this in the RTM release of Silverlight 3.

Gravatar of cheenceTekJax

cheenceTekJax

 
Предлагаем вашему вниманию лучшие футболки рунета
 

Gravatar of plartepiste

plartepiste

 
Hello! My name is Djak. Just recently recently found a very interesting site, a convenient and useful. Here it is CLICK HERE. Savoury!!!
 

Gravatar of groosteAcrort

groosteAcrort

 
tfoulbanbvew jcpenney printable coupons feveoibeeeenopeee
 

leave comment

Thursday, March 19, 2009

SuperPreview

posted by Lars Hundebøl # 4:17 p.m.

SuperPreview screenshot

Yesterday Microsoft announced the SuperPreview feature as part of Expression Web and as a standalone install. The cool thing about SuperPreview is that you can overlay you HTML mockup onto of the actual composition, to see how "pixel perfect" it is, and you can test different browsers (IE 6, 7, 8, Safari, FireFox, e.g.) opposite each, and even without some of them being installed (by leveraging a service on the Net).

Check it out by downloading the trial here.

leave comment

Wednesday, March 18, 2009

Heart Your Silverlight 3

posted by Lars Hundebøl # 7:33 p.m.

Maybe it's the brainwashing drugs they give you here at MIX, or maybe it's just because Microsoft have really listen to the developers, but I'm in love with Microsoft.

The new enhancements made to Silverlight 3 (just released in Beta), can now fully compete with Adobes Air/Flex. Here's the short list of cool new features:

  • GPU accelaration support in both Windows and Mac
  • H.264 support
  • Outside Browser support in both Windows and Mac
  • Perspective 3D support
  • Bitmap+Pixel API
  • Support for Pixel Shaders
  • Improved Deep Zoom
  • Deep Linking
  • Improved Text Quality
  • Multi Touch
  • 100+ Controls (as part of the SDK)
  • Library Caching Support

Check out the Keynote with Scott Gu and the What's new in Silverlight 3 session when available on www.visitmix.com/2009.

leave comment

newer posts older posts