How can I find out what carrier an iPhone 3gs is locked to?
There is a small app which can show you the carrier with which your iPhone is associated. 



The app itself is not free but the sole function of displaying the iphone information you require is free.