I am using the following code to read a picture library:
SPList list = SPContext.Current.Web.GetList("http://win-12/sites/mysite/ImageLibrary")
Problem is, in above code "win-12" is my machine name and if I move this web part to some other server, I don't think it will work!?
So I want to know how to use dynamic or relative path instead of hard coded one?
Or before moving this web part to new server, I will have to change its URL then recompile?