Dear ALL,
I'm using sharepoint object model to develop a web part that gets List items from a list in a different web application, I did that
protected override void CreateChildControls()
{
SPSite site = new SPSite("http://myhost/");
ListViewByQuery lview = new ListViewByQuery();
SPWeb web = site.OpenWeb();
lview.List = web.Lists["Tasks"];
lview.Query= new SPQuery(lview.List.Views["All Tasks"]);
this.Controls.Add(lview);
}
when I use my web part in a web application other than "http://myhost/", I'm going to use it in "http://mysite", it changes all the URLs replaces "myhost" to "mysite", why shrepoint do that and how to walk arrount it.
Thanks for your answers