News of the world

This blog is in the first case meant for myself so I don't forget interesting stuff. So you will find lots of useless topics, but there will certainly be also readings that might interest you. Lots of the items will go about my family, things we do or don't do but also about software, cars, gadgets, music, etc ... .

30 nov. 2006

Online IDE

Neat! An online IDE fro writing and testing of Basic, Pascal, C++ and JavaScript code.

Tags:

codeide.com 

21 nov. 2006

Newbie: Posting parameters between ASP.NET 2.0 forms

For a project at work I started of experimenting with ASP.NET 2.0. I decided to use ASP.NET because I needed XHTML compliant forms and I thought ASP.NET was just plain easy dragging and dropping of components onto a form and my application is finished. Well damn that's not the case, although I can call myself a seasoned Java/JSP/Servlet developer I was not able to create an app in five minutes with drag and drop. ASP.NET doesn't give what you expect when you know how to write web applications in some other language / framework. To start with I wasn't able to post parameters from one page to another, it isn't just setting the action parameter on the form tag and creating a submit button ... . It is a bit less straight forward and this is what I did to post my parameters to another form.

I created two ASP.NET pages: page1.aspx and page2.aspx. The first page has two textboxes firstnameTextBox and lastnameTextBox and a button two submit the form. The second page has just a label nameLabel that will display the values of the two textboxes of the first page.

Now the first thing I want to do, is post my parameters on the first page to the second one. Apparently there are two ways for doing this:

  1. Select the submit button, look in the properties for PostBackUrl and select the page you want to submit to.
  2. The other solution is double clicking the button and then writing the following code in the event:

    protected void Submit_Click(object sender, EventArgs e)
    {
        Server.Transfer("Page2.aspx");
    }

Don't knwo yet what the difference between the two is but maybe I will come back to this later or if some of you have suggestions feel free to write me.

Ok, now I am able to navigating from my first page to the second one. Now I want to pass the values of my two textboxes to the second page. The thing is ASP.NET as a close focus on OO-programming so why not try to access the textboxes from my first page when I am on the second page. For this I created two properties in the code-behind file of my firstpage and they look like this:

public string Firstname
{
get
{
return firstnameTextBox.Text;
}
}

public string LastName
{
get
{
return lastnameTextBox.Text;
}
}

Now on my second page I need to be able to access my first page for this I need to add the following directive to the aspx file:

<%@ PreviousPageType VirtualPath="~/Page1.aspx" %>

This directive will give us a strongly typed PreviousPage. And in the Page_Load event of the second page I wrote the following code to access the properties on the first page and assemble them together in the label on the second page:

if(this.PreviousPage != null)
{
nameLabel.Text = this.PreviousPage.Firstname + " " + this.PreviousPage.Lastname;
}

Phew that was hard figuring out how to do parameter passing in ASP.NET but it's a nice programming model once you get the hang of it.

Tags:

20 nov. 2006

'Second Life' hit by worm | News.blog | CNET News.com

Run for your lives a gigantic worm is attacking 'Second Life'. I am imagining an enormous worm destroying buildings and eating avatars and the blood is splashing on the PC screens... . But now apparently it's a computer-kind-of worm leaving golden rings behind in the game. Come on guys when in Rome... . I would have made a 3D worm that is all I wanted to say. 

Link to 'Second Life' hit by worm | News.blog | CNET News.com

Tags:

17 nov. 2006

Microsoft acquires Mozilla Firefox

Microsoft has bought Firefox technology... . You can download it now as Microsoft Firefox 2007!

This is a prank of course but a really good one. When you press the download you will get IE 7.

Link to Microsoft(R) Firefox | We've Made it Better

Tags:

5 nov. 2006

Sponsor animals through your mobile phone.

People who regularily read this blog know that my family loves to visit zoos. In some of the Belgian zoos people can become godfather of a certain animal. Depending on the animal they pay a certain fee and then their name or company name gets displayed, for a year, on the cage of the animal they are sponsoring.

Although we visit a lot of zoos I am not sponsoring one particular animal, but still I've been thinking about how I could implement a system that I call "godfather for a day". With this system people would be able to sponsor an animal they like, for a small amount of money. E.g. today I am passing the cages of the koala bears and I would like to sponsor them for 5 euros. On the cage you can find an RFID-tag, you swipe your GSM over it and 5 euros are taken from your account at your service provider. There is no hastle, and you don't have to type in a phone number are whatever. The only thing you have to is set the amount of money you want to give. And when I leave the zoo, I see my name appearing on a ticker tape above the exit gates: Jan godfather for one day of koala Chico. I think this would really give me a good feeling when going home.

You can do the same thing with buying a coke from a vending machine, buy parking space,... all these small things you do every day. Maybe we can mash the system up with Google maps so you can see where you spend your money during the day.

Your mobile phone you use today can be turned into an RFID capable reader with a special SD card, read the following link for a report on CNN: Link to CNN.com - Your cell phone is so money - Jul 28, 2006

Tags:

3 nov. 2006

De Portables - Now here we stand

Nog nooit gehoord van de Rock formatie De Portables, dan wordt het nu tijd... . De Portables uit Gent bestaan dit jaar 10 jaar (denk ik) en omdat de vieren zijn er tal (?) van festiviteiten, en om deze nog wat kracht bij te zetten werd er een ongelooflijk fantastische documentaire van deze groep gemaakt met als titel Now here we stand. Dit is echt een pareltje met zelfs een gastoptreden van Gorki's Luc De Vos. Jambers eat this, dit is pas echte televisie, maar dan op Internet.

Tags: