I'm not an ASP.NET developer, but I guess that like in other programming languages you may use sessions to pass those values. Instead of hardcoding path to Images resource type (type.Dir and type.Url), set it to session variable and you will be able to change this value inside of your application.
Re: Programatically set baseUrl
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+