Wednesday, December 2, 2009

How will my site render on all browsers?

I recently was browsing the Mozilla Tools listing, and I cam across another amazing tool created by Adobe called BrowserLab. Browserlab allows you to view any publicly viewable webpage as it would be seen by Firefox (OSX & XP v. 2,3,3.5) Chrome (XP v. 3), IE (XP v. 6,7,8) and Safari (OSX v. 3,4). You can overlay each browser view to see differences, as well as use a rule to measure positioning of elements on page. Check it out! BrowserLab (You have to create an Adobe account, which takes 10 seconds...just do it)

Thursday, November 12, 2009

Mono Visual Studio Plugin

Ars has a great article on the up and coming visual studio plugin which will allow .NET developers to build code locally, deploy it to a Linux server, and debug the code executing (via Mono) on the Linux server. Has anyone out there made the jump to building apps on their Linux machine with Mono? Pros/Cons?

Wednesday, November 11, 2009

Azure Storage Manager

It looks like Cerebrata has created a useful web app for Azure developers. You can visualize your data (Tables, Queues, Blobs) in a great Silverlight interface. You will have to enter your storage account unique name, and Account shared key, but they once you logout, Cerebrata does not keep record of your account info. Check it out! https://onlinedemo.cerebrata.com/Cerebrata.CloudStorage/default.aspx

Access SQL Azure Tables via SSMS 2008 R2

If you have been trying in vain to connect to SQL Azure tables via SQL Server Management Studio 2008 (SSMS) there is hope! SQL Azure Team blog just announced that the R2 release of SSMS 2008 includes features to access SQL Azure in the cloud! Download is currently available for Technet and MSDN subscribers.

Saturday, August 8, 2009

Use thunderbird to Transfer gmail email

I recently made the decision to switch from one gmail account to another. The former was created in college and was more for fun than future use. The second one I created is more appropriately named and professionally sounding. Anyhow, I wanted to transfer all email from one gmail account to the next. There was not a clearly defined way to do this, so I had to hunt around the interwebs to find a solution for myself. Here are the steps I took:
  1. Enable IMAP in both your old and new gmail email accounts.
  2. Download Thunderbird.
  3. Add your old gmail email account to Thunderbird with IMAP protocol options.
  4. Add your new gmail email account to Thunderbird.
  5. In your old gmail email account, expand the [Gmail] folder to view the IMAP folders for your gmail account.
  6. Select the email messages you want to copy to your new gmail account.
  7. Right Click >> Copy To >> new gmail account >> [Gmail] >> whatever location you want the email to be copied to (Inbox, Sent, All Mail)
Let Thunderbird work it's magic. Depending on how many messages you are copying and their size, it can take a while. Thunderbird will download the entire message locally and then copy it to the destination. Hope this helps! -Dave

Friday, August 7, 2009

Running Robot

Check out this cool link for the new Toyota Running Robot (smart-machines blog)

Thursday, August 6, 2009

DataItem Dag-Nabbit!

Recently I was faced with the issue of trying to get multiple data columns from a DataGrid row during the event raised from a link button inside of a TemplatedColumn. When the link button was clicked, I was not able to access the selected item's DataItem. I had to find a work around. Microsoft does not allow access to the selected item's DataItem except during runtime using reflection. But, I needed to access the data item somehow so I created a workaround. Here is my original code:


                    
                        
                            
                                
                            
                        
                        other column 1
                        other column 2
                        other column 3
                     


protected void cmdUpdateContractID_Command(object sender, CommandEventArgs e)
        {
            DateTime RunDate = Convert.ToDateTime(e.CommandArgument.ToString());
            String RunSeq = e.CommandName.ToString();
        }

I wanted to be able to access the data from the other BoundColumns. So, I used an expression on my aspx page, and a custom method in the code behind to get around the DataItem lifecycle issue:


                    
                        
                            
                                
                            
                        
                        other column 1
                        other column 2
                        other column 3
                     


protected string GenerateArgString(object dataItem)
        {
            StringBuilder args = new StringBuilder();
            args.AppendFormat("{0}|", 
                 Convert.ToString(DataBinder.Eval(dataItem, "FIELD_1")));
            args.AppendFormat("{0}|", 
                 Convert.ToString(DataBinder.Eval(dataItem, "FIELD_2")));
            args.AppendFormat("{0}|", 
                 Convert.ToString(DataBinder.Eval(dataItem, "FIELD_3")));
            args.AppendFormat("{0}|", 
                 Convert.ToString(DataBinder.Eval(dataItem, "FIELD_4")));

            return args.ToString();
        }

You can see that I added the CommandArgument attribute to my Linkbutton, which in turn allowed me to generate a string of pipe delimited values from the selected item's DataItem. The expression calls the GenerateArgString method, which evaluates the DataItem using DataBinder.Eval method to retrieve information by column name.