Execution of 'Telerik.Sitefinity.Taxonomies.Model.OrganizerBase:TaxonExists(String,Guid)' on the database server side currently not implemented. exception
here is the picec of the code.
i m trying to fatch the imgaes inside the herarchial texanomy. please provide the solution or any other way out to get the image in side the herarchial texanomy.waiting
string maincatname = drpbussiness.SelectedItem.Text;
string subcat = drpcountry.SelectedItem.Text;
var images = App.WorkWith().Images()
.Where(
(w) => w.Organizer.TaxonExists("Category", Guid.Parse(drpcountry.SelectedValue)) && w.Title.Contains(searchText)).Get();
Int32 s= images.Count();
foreach (Telerik.Sitefinity.Libraries.Model.Image v in images)
var url = App.WorkWith().Image(v.Id).Get().MediaUrl;
// this.ImageControl.ImageUrl = url + "&size=300";
imagepath = url + "&size=300";
ImagesTable.Rows.Add(i, imagepath, v.Parent.Title, "", " 0");
i++;
Hi Monika,
You can get images with specific taxonomy set to them by getting the taxonomy first and then checking which image have this taxonomy as a value of their field (category for example). Note that we're using the GetValue() method to retrieve the value of a field.Take a look at the sample below:
string maincatname = "TaxName";//drpbussiness.SelectedItem.Text; // string subcat = drpcountry.SelectedItem.Text; var searchText = "myetxt"; var manager = TaxonomyManager.GetManager(); var myCat = manager.GetTaxa<HierarchicalTaxon>().Where(t => t.Name.Contains("maincatname")).SingleOrDefault(); var images = App.WorkWith().Images() .Where(im => im.GetValue<TrackedList<Guid>>("Category").Contains(myCat.Id) && im.Title.Contains(searchText)).Get(); foreach (var img in images)