Windows Mobile 6 SDK gives Empty Toolbox in Visual Studio

May 24, 2007

I finally got around to installing the SDK for WM6. Turned out that my Toolbox (in Visual Studio) was completely empty when I started a new WM6 project afterwards.

The solution was to right-click the toolbox and select “Reset Toolbox” from the context menu. This was highly annoying because it of course removed my custom tools (e.g. the Ajax Toolkit). Anyway, at least it’s working.

Advertisements

File upload with ASP.NET AJAX UpdatePanel

May 15, 2007

I’ve been working with the Microsoft AJAX toolkit recently (and not so much Windows Mobile – hence lack of update 🙂 . It’s an amazing framework for people who don’t know much JavaScript but still would like to do some AJAX style web programming (like me). However since it involves a combination of .NET server side programming, HTML and client side JavaScript figuring out what’s wrong when something doesn’t work can be tricky. I’ll try to post a few tricks I found (mostly on ajax.asp.net  🙂 even though it’s not directly related to mobile programming.

The ASP.NET FileUpload control doesn’t work within an AJAX UpdatePanel by default (when the upload button you create is inside the same panel). This is because a file cannot be uploaded asynchronously. To be able to upload a file the easiest solution is to make a complete postback when the user uploads a file. To do this add a PostBackTrigger on the button:

<asp:UpdatePanel> 
  <ContentTemplate> 
<asp:Button ID="ButtonUploadFile" 
    runat="server" Text="Upload" /> 
</ContentTemplate> 
  <Triggers> 
<asp:PostBackTrigger ControlID="ButtonUploadFile" /> 
  </Triggers> 
</asp:UpdatePanel>

(note that it is not an AsyncPostBackTrigger)


Setting MP3s as ringtone

May 9, 2007

Finally I got around to changing the ringtone on my Windows Mobile device. A quick search on how to use a MP3 as ringtone only turned up ads for applications that would do that for you. As I suspected you don’t need any special software for this – it’s actually embarrassingly easy:

Use the file explorer and navigate to the file you want to use. Tap and hold on it to the context menu appears and select “Set as Ringtone” 🙂

Note: This will copy the file to the Windows\Rings folder (i.e. using internal RAM). This is a good idea because there is a gotcha:
 the storage card will usually power down, meaning that if you put it on the card it may take quite a while before the ringtone is heard when someone calls you!