Wednesday, April 25, 2012

Pass data between pages in Windows Phone

Here's some very useful code to pass data to the second page. I'll add something more about how to get data or selection back.

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
    if (this.NavigationContext.QueryString.ContainsKey("text"))
        this.textBlox2.Text = this.NavigationContext.QueryString["text"];


Friday, April 20, 2012

Create Default root password for Amazon EC2

When I want to change some files that are read-only to my account ec2-user, I will need to login to the root user so I can make change of them.

They way I create root password for Amazon EC2 is to use:

[ec2-user@AWS]#: sudo passwd root